Reactivate a scheduled-cancel paid subscription
const url = 'http://localhost:8000/api/billing/subscription/reactivate/';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/api/billing/subscription/reactivate/ \ --header 'Authorization: Bearer <token>'Owner-only. Clears cancel_at_period_end on the team’s paid Subscription, undoing a prior Cancel click while the buyer still has paid access. Stripe fires customer.subscription.updated; the webhook clears the flag locally on next delivery.
When this 400s
not_canceled— the sub is active withcancel_at_period_end=false. Nothing to reactivate; the FE shouldn’t have surfaced the Reactivate button.subscription_terminated—statusiscanceledorunpaid. The period already elapsed (or dunning failed) and the team is on the fallback Free row. Route to Checkout for a fresh paid sub.
Idempotency: calling Reactivate twice in quick succession is safe — the first call clears the flag, the second hits not_canceled (which is the correct FE state).
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”object
Stripe accepted the modify call. The webhook will clear cancel_at_period_end locally on the next delivery.
reactivated- Cancel cleared
Examples
{ "status": "reactivated"}not_canceled (nothing scheduled to reactivate), subscription_terminated (period elapsed / Stripe terminal — fresh Checkout required), stripe_reactivate_failed.
object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examplegenerated
{ "detail": "example"}Caller is not the team owner. Also returned to a partner aik_… API key: billing writes require the Firebase scheme (billing is read-only for keys).
no_paid_subscription.