Cancel subscription
Create Cancelation
You can cancel only subscription, not the one-time-order. If you want to cancel a subscription please use a request similar to this one:
curl -i -X POST \
'https://stage-api.payments.ai/v1/public-api/organizations/:organizationId/subscriptions/:subscriptionId/cancel' \
-H 'Content-Type: application/json' \
-H 'Authorization: ApiKey <keyValue>' \
-d '{
reason: "did-not-use",
cancelAt: "2023-11-03T14:45:04.536Z"
}' -v
READ Cancelations
To get list of subscription cancelations related to your organization please use a request similar to this one:
curl -X 'GET' \
'https://stage-api.payments.ai/v1/public-api/organizations/:organizationId/subscriptions-cancellations' \
-H 'accept: application/json' \
-H 'Authorization: ApiKey <keyValue>'
READ Cancelation by Id
To get a particular subscription cancelation please use a request similar to this one:
curl -X 'GET' \
'https://stage-api.payments.ai/v1/public-api/organizations/:organizationId/subscriptions-cancellations/:subscriptionCancelationId' \
-H 'accept: application/json' \
-H 'Authorization: ApiKey <keyValue>'
UPDATE Cancelation
To update a particular subscription cancelation please use a request similar to this one:
curl -i -X PATCH \
'https://stage-api.payments.ai/v1/public-api/organizations/:organizationId/subscriptions/:subscriptionId/:subscriptionCancelationId' \
-H 'Content-Type: application/json' \
-H 'Authorization: ApiKey <keyValue>' \
-d '{
reason: "did-not-want"
}' -v
DELETE Cancelation by Id
To delete a particular subscription cancelation please use a request similar to this one:
curl -X 'DELETE' \
'https://stage-api.payments.ai/v1/public-api/organizations/:organizationId/subscriptions-cancellations/:subscriptionCancelationId' \
-H 'accept: application/json' \
-H 'Authorization: ApiKey <keyValue>'