Skip to main content
DELETE
Cancel Subscription
Base URL: https://api.nozle.app/engine/api/v1. Cancel a subscription immediately or schedule cancellation for the next renewal boundary. Use this endpoint only from an authenticated merchant backend. Derive the customer from the logged-in user or team; never accept an authoritative customer_id from browser input. Auth: secret key only. Publishable keys are always rejected.
string
required
The external subscription ID to cancel, not the Core internal UUID.
string
required
External customer ID derived by the trusted merchant backend. The subscription must belong to that customer and organization.
string
default:"immediate"
end_of_period keeps the subscription active until its next renewal boundary. immediate terminates it now. The raw HTTP API defaults to immediate for backward compatibility; the Node.js, Python, and Go SDK methods default to end_of_period.
For customer-facing Cancel/Keep with a confirmed ending date, use the transition preview/apply flow. It supports the atomic expected_effective_at guard and the uncancel operation.

Response

For end_of_period, the subscription remains active and ending_at contains the next renewal boundary. An open paid upgrade checkout of the subscription is canceled, and its Stripe Checkout Session or Razorpay order is expired. Engine access checks deny access at that boundary; the termination worker updates the subscription row according to its schedule and handles renewal termination. Repeating the request does not extend an earlier scheduled ending. For immediate, the response contains the terminated subscription.