Cancel Subscription
Stripe Subscriptions
Cancel Subscription
Cancel the user’s active Stripe subscription
POST
Cancel Subscription
Cancel the authenticated user’s active subscription. Can cancel immediately or at the end of the current billing period.Documentation Index
Fetch the complete documentation index at: https://devkit4ai.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
This endpoint requires end user authentication via HTTP Bearer Token with project scope.
Query Parameters
Use test mode credentials. Set to
false for production.Request Body
If
true, cancels the subscription immediately and revokes access. If false, cancels at the end of the current billing period (user retains access until then).Response
Stripe subscription ID
New subscription status:
canceled or active (will cancel at period end)When the subscription will be canceled (if scheduled)
When the cancellation was processed
Human-readable confirmation message
Example Request
Cancel at Period End (Recommended)
Cancel Immediately
Example Response
Cancel at Period End
Immediate Cancellation
Cancellation Options
Integration Example
Handling Scheduled Cancellations
When a subscription is scheduled to cancel, update your UI accordingly:Reactivating Canceled Subscriptions
Error Responses
| Status | Description |
|---|---|
401 | Unauthorized - Invalid or missing authentication |
404 | No active subscription to cancel |
404 | Project not found or Stripe not configured |
Related Pages
Get My Subscription
Check subscription status
Update Subscription
Change plans instead
Customer Portal
Let user manage cancellation
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Use test mode
Body
application/json
Request to cancel a subscription.
If true, cancels immediately. Otherwise cancels at period end.

