curl "https://api-sandbox.paywithsoap.com/api/v1/subscriptions/sub_7Hn2Kq9Wx4Lm8Pz3Rt6Vb1Ys5JdCfEaG" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": "sub_7Hn2Kq9Wx4Lm8Pz3Rt6Vb1Ys5JdCfEaG",
"customer_id": "cus_3Lm8Pz3Rt6Vb1Ys5JdCfE7Hn2Kq9WxaG",
"status": "incomplete",
"interval": "day",
"interval_count": 1,
"line_items": [
{
"product_id": "<string>",
"sku": "<string>",
"product_name": "<string>",
"product_url": "<string>",
"quantity": 123,
"price_cents": 123,
"total_amount_cents": 123
}
],
"line_items_total_amount_cents": 4200,
"current_period_end": "2023-11-07T05:31:56Z",
"next_billing_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "API key not found.",
"hint": "Send an active API key in the Authorization header as a Bearer token.",
"code": "invalid_api_key"
}{
"error": "Subscription not found.",
"hint": "<string>"
}Subscriptions
Retrieve a Subscription
Returns one of your subscriptions by its public id: its status, billing interval, line items and billing dates. Cancel, pause and resume return the same object.
GET
/
api
/
v1
/
subscriptions
/
{id}
curl "https://api-sandbox.paywithsoap.com/api/v1/subscriptions/sub_7Hn2Kq9Wx4Lm8Pz3Rt6Vb1Ys5JdCfEaG" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": "sub_7Hn2Kq9Wx4Lm8Pz3Rt6Vb1Ys5JdCfEaG",
"customer_id": "cus_3Lm8Pz3Rt6Vb1Ys5JdCfE7Hn2Kq9WxaG",
"status": "incomplete",
"interval": "day",
"interval_count": 1,
"line_items": [
{
"product_id": "<string>",
"sku": "<string>",
"product_name": "<string>",
"product_url": "<string>",
"quantity": 123,
"price_cents": 123,
"total_amount_cents": 123
}
],
"line_items_total_amount_cents": 4200,
"current_period_end": "2023-11-07T05:31:56Z",
"next_billing_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "API key not found.",
"hint": "Send an active API key in the Authorization header as a Bearer token.",
"code": "invalid_api_key"
}{
"error": "Subscription not found.",
"hint": "<string>"
}curl "https://api-sandbox.paywithsoap.com/api/v1/subscriptions/sub_7Hn2Kq9Wx4Lm8Pz3Rt6Vb1Ys5JdCfEaG" \
-H "Authorization: Bearer YOUR_API_KEY"
Authorizations
Path Parameters
Response
The subscription.
A subscription as the merchant API returns it.
Derived from the billing dates each time you read it. incomplete until the first payment succeeds. active while billing runs, when the first payment went through while renewals were off for your account, and for a subscription canceled for the end of its paid period, until ends_at. past_due after a renewal failed, or while a declined renewal waits for its retry. paused while the merchant has paused billing: nothing renews until it is resumed. canceled once a canceled subscription's ends_at has passed.
Available options:
incomplete, active, past_due, paused, canceled 
