Cancel a subscription at the end of the current billing period
POST
/v1/portal/subscriptions/{id}/cancel
const url = 'https://api.extport.dev/api/v1/portal/subscriptions/example/cancel';const options = { method: 'POST', headers: {cookie: 'extport_buyer_session=<extport_buyer_session>'}};
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.extport.dev/api/v1/portal/subscriptions/example/cancel \ --cookie extport_buyer_session=<extport_buyer_session>Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “ Responses ”Scheduled for cancellation at period end
Subscription cannot be canceled or Stripe account not connected
No buyer session
Subscription not found
Stripe API unavailable