Skip to content

Search API reference

Find an endpoint or a guide of the Sovgate API reference and jump straight to it.

The subscription object

A customer billed the same items every period, by saved card or by invoice.

A subscription bills a customer the same items every period, from your catalog's recurring prices. Each period is billed when it starts: charged to the customer's saved card, or invoiced to them. A failed charge is retried 3, 5 and 7 days after the billing date; if the last retry fails, the subscription is canceled.

Attributes

NameTypeDescription
idstringUnique identifier, starting sub_.
objectstringAlways subscription.
livemodebooleantrue in live mode.
customerstringWho it bills, cust_....
namestringWhat the customer sees.
statusenumscheduled, trialing, incomplete (waiting for a card), active, past_due, paused, canceled or ended.
currencystringusd.
line_itemsarrayWhat each period bills: each a recurring price and a quantity.
amountintegerWhat each period comes to, in cents, tax included.
intervalobjectThe billing cycle: unit (day, week, month or year) and count.
collectionenumcharge_automatically (the saved card) or send_invoice.
days_until_dueinteger or nullFor send_invoice: 0, 7, 14 or 30.
start_datedateWhen it started, or starts.
trial_enddate or nullWhen its trial ends.
end_datedate or nullWhen it ends on its own.
next_billing_datedate or nullIts next billing date.
cancel_at_period_endbooleanSet to cancel when the period ends.
canceled_attimestamp or nullWhen it was canceled.
paused_attimestamp or nullWhen billing was paused.
resumes_ondate or nullWhen a pause ends on its own.
createdtimestampWhen it was created.

Example

json
{  "id": "sub_2924bc30f433418e621960a1",  "object": "subscription",  "livemode": false,  "customer": "cust_13ed3f69adfcfcb6289a5491",  "name": "Studio membership",  "status": "active",  "currency": "usd",  "line_items": [    {      "price": "price_d2fcc8475d89f661d674185c",      "quantity": 1    }  ],  "amount": 2900,  "interval": {    "unit": "month",    "count": 1  },  "collection": "charge_automatically",  "days_until_due": null,  "start_date": "2026-11-01",  "trial_end": null,  "end_date": null,  "next_billing_date": "2026-12-01",  "cancel_at_period_end": false,  "canceled_at": null,  "paused_at": null,  "resumes_on": null,  "created": "2026-11-01T10:12:00Z"}

Endpoints

EndpointWhat it does
POST /v1/subscriptionsStart billing a customer on a schedule.
GET /v1/subscriptions/{id}Get a subscription by its ID.
POST /v1/subscriptions/{id}Change its name, description, items, tax or notes, from the next billing date.
POST /v1/subscriptions/{id}/pauseStop billing until you resume it, or until a date.
POST /v1/subscriptions/{id}/resumeStart billing a paused subscription again.
POST /v1/subscriptions/{id}/cancelCancel now, or at the end of the current period.
POST /v1/subscriptions/{id}/keepTake back a cancel set for the end of the period.
GET /v1/subscriptionsList your subscriptions, newest first.