Cancel the caller's own subscription for a client app.
Unlike the previous admin-only flip, this handler is a **user self-service** endpoint mounted on the browser-token router. It calls the **payment provider cancel API** (Stripe/Creem) and does **NOT** touch the local subscription row — local status is updated exclusively by the subsequent provider webhook (`customer.subscription.deleted` / `subscription.canceled`). If the provider call fails the error is surfaced to the caller and the local state is left untouched. Apple / Google in-app purchases cannot be canceled via a developer API (only via the App Store / Play Store by the user); this endpoint rejects them with 400.
Unlike the previous admin-only flip, this handler is a user self-service
endpoint mounted on the browser-token router. It calls the payment provider
cancel API (Stripe/Creem) and does NOT touch the local subscription
row — local status is updated exclusively by the subsequent provider webhook
(customer.subscription.deleted / subscription.canceled). If the provider
call fails the error is surfaced to the caller and the local state is left
untouched.
Apple / Google in-app purchases cannot be canceled via a developer API (only via the App Store / Play Store by the user); this endpoint rejects them with 400.
Authorization
bearer_auth In: header
Path Parameters
Client App ID
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/bill/client/497f6eca-6276-4993-bfeb-53cbbbba6f08/subscription/cancel" \ -H "Content-Type: application/json" \ -d '{ "cancelAtPeriodEnd": true }'{ "canceledAt": "string", "message": "string", "subscriptionId": "string"}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}