Schedule cancellation at the end of the current period.
POST
/billing/cancel
const url = 'https://api.siteqwality.com/billing/cancel';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"idempotency_key":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
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://api.siteqwality.com/billing/cancel \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "idempotency_key": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
idempotency_key
required
string format: uuid
Example generated
{ "idempotency_key": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “ Responses ”Cancellation scheduled
Media type application/json
object
cancel_at
Unix seconds at which access ends, or null if Stripe has not set a
date yet.
integer | null format: int64
cancel_at_period_end
required
boolean
Example generated
{ "cancel_at": 1, "cancel_at_period_end": true}No active subscription
Missing or invalid authentication
Caller is not a super admin
Internal server error