Cancel subscription
Cancels a subscription. By default, access continues until the end of the current billing period (cancel_at_period_end=true). A subscription.canceled webhook is sent and the returned subscription has status 'canceled'. For past_due subscriptions, cancellation is immediate: a single subscription.expired webhook is sent and the returned subscription has status 'expired'.
Bearer token authentication for client-side SDK operations. Format: 'Authorization: Bearer '
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/sdk/subscriptions/string/cancel" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "externalAccountId": "string", "planId": "string", "status": "string", "period": { "value": 0, "unit": "string" }, "trialEnd": "2019-08-24T14:15:22Z", "accessEndDate": "2019-08-24T14:15:22Z", "currentPeriodEnd": "2019-08-24T14:15:22Z", "nextBillingDate": "2019-08-24T14:15:22Z", "cancelAtPeriodEnd": true, "canceledAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "checkoutLinkMetadata": { "property1": "string", "property2": "string" }}How is this guide?
List plans GET
Lists all available subscription plans for a shop. By default returns only active plans. Use the status filter to include archived or deprecated plans.
Get payments by subscription ID GET
Retrieves payments associated with a subscription with pagination support. Returns a list of payment objects including payment ID, amount, currency, a succeeded indicator, and timestamps. Use the `next_page_token` from the response to fetch the next page.