Get Subscription
Retrieve detailed information about a specific Subscription.
Authorization
Public key In: header
Path Parameters
Subscription ID or order number
Response Body
application/json
application/json
curl -X GET "https://example.com/v0/subscriptions/string"{ "status": "success", "data": { "subscription": { "object": "subscription", "id": "string", "status": "all", "createdAt": 0, "currentIntervalEnd": 0, "currentIntervalStart": 0, "cancelAtIntervalEnd": false, "canceledAt": null, "userId": null, "user": null, "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5", "orderNumber": "string", "order": { "object": "order", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "number": "string", "status": "PENDING" }, "lastPaymentId": null, "lastPaymentNumber": null, "lastPayment": null }, "lastPayment": { "object": "payment", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "one_time", "number": "string", "status": "PENDING", "value": 0, "tax": 0, "fee": 0, "currency": "AFN", "currencyDecimals": null, "createdAt": 0, "userId": null, "user": null, "orderId": null, "orderNumber": null, "order": null, "subscriptionId": null, "subscription": null, "checkoutId": null, "discount": null, "invoiceNumber": null, "invoiceUrl": null, "charges": null }, "items": [ { "object": "item", "quantity": 0, "value": 0, "currency": "AFN", "name": "string", "variant": null, "plan": null, "product": { "object": "product", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "DigitalDownload", "internalId": null }, "offer": { "object": "offer", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "internalId": null }, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "customFields": null } ], "user": { "object": "user", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "username": null, "email": null, "details": null, "internalId": null } }}Create Subscription POST
Create a new Subscription for a User. User must have a valid customer ID of Payment Provider set. Requires billing details with at least a country code and postal code if country is one of US, CA, UA, IN. Multiple items (up to 20) can be billed on a single Subscription — for example a base plan plus add-ons — and each line is preserved on the invoice and outbound webhooks. Because one Subscription maps to a single billing arrangement, every item must be on the same cadence: - Currency: all items must resolve to the same currency (from the item or its Offer). - Billing period: all Offers must share the same recurring interval and interval count (e.g. all monthly); mixing intervals (monthly + yearly) returns a 400. - Every item must reference a recurring Offer via offerId. - Trial: a trial (trialEnd / the Offer trial) is only applied to single-item Subscriptions. Multi-item Subscriptions start billing immediately (no trial). - Discount codes are not supported for multi-item Subscriptions. Note: User must have a valid customer ID of Payment Provider set and this customer must have a valid default payment method set (Payment Provider dashboard).
Get Upcoming Subscription Payment GET
Preview the amount and date of the Subscription's next renewal charge. Returns null when the Subscription is not active or is set to cancel at the end of the current interval — in both cases there is no upcoming charge to preview. The amount reflects Stripe's live invoice preview at request time and can still change before the charge actually happens (e.g. proration from a mid-cycle plan change, a coupon expiring, or tax recalculation) — it is a forecast, not a guarantee.