Cancel subscription
Cancels a subscription. Access continues until the end of the current billing period (cancel_at_period_end=true).
Authorization<token>
Bearer token authentication for client-side SDK operations. Format: 'Authorization: Bearer '
In: header
Path Parameters
idstring
Empty Object
Response Body
curl -X POST "https://test-api.stash.gg/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"
}
}{
"code": 0,
"message": "string",
"details": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}How is this guide?
Create a subscription checkout link POST
Creates a checkout link for purchasing a subscription plan. The link can be shared with users to complete their subscription purchase.
Get subscription by ID GET
Retrieves a subscription by its unique identifier. Returns the full subscription object including status, billing period, and dates.