cancel_subscription
Cancel a subscription. By default it cancels at period end (credits already issued stay; no further renewals). at_period_end: false cancels immediately with no refund. With user_id/email instead of subscription_id, every live subscription of that customer is canceled. Costs 1 CRD (platform credit) per call, charged even when the call is then rejected (a 429 RATE_LIMITED costs nothing). Error results include request_id; quote it to support.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | Customer email (alternative to subscription_id) | ||
| api_key | No | Cred API key (optional if set via the x-api-key header) | |
| user_id | No | External user ID (alternative to subscription_id) | |
| project_id | No | Cred project ID (optional; the API key already identifies the project) | |
| x402_payment | No | Base64 x402 PaymentPayload, only when a previous call failed with an x402 PaymentRequired because the account is out of CRD | |
| at_period_end | No | Default true; false cancels now | |
| subscription_id | No | Cred subscription ID or Stripe sub_… ID |