POST
/api/Subscriptions/{id}/cancel
const url = 'https://example.com/api/Subscriptions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/Subscriptions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "reason": "example" }'Cancels a subscription permanently. This cannot be undone. To re-enrol the member, create a new subscription. The matching subscription at the payment gateway is archived.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
The subscription’s unique identifier.
Request Body
Section titled “Request Body ”Optional cancellation reason.
object
id
string format: uuid
reason
string
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "reason": "example"}object
id
string format: uuid
reason
string
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "reason": "example"}object
id
string format: uuid
reason
string
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "reason": "example"}Responses
Section titled “ Responses ”Subscription cancelled.
Media type application/json
object
id
string format: uuid
merchantId
string format: uuid
memberId
string format: uuid
memberName
string
planId
string format: uuid
planName
string
planFrequency
string
planPrice
number format: double
paymentMethodId
string format: uuid
status
string
startDate
string format: date-time
trialEndsAt
string format: date-time
nextBillingDate
string format: date-time
nextBillingAmount
number format: double
pausedAt
string format: date-time
cancelledAt
string format: date-time
cancellationReason
string
createdAt
string format: date-time
updatedAt
string format: date-time
Example
{ "planFrequency": "OneOff", "status": "Trial"}No subscription with the given ID exists.
Media type application/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}