Subscriptions

Cancel a subscription

Cancels the subscription; no further invoices are created. Invoices already sent stay payable. Rate limit: 60 per minute per API key, shared with the other endpoints that have this limit.

DELETE
/api/v1/subscriptions/{id}

Authorization

bearerAuth
headerAuthorizationBearer <token>

A live API key, sk_live_ followed by 32 base58 characters.

Path Parameters

id*string

Subscription id (starts with sub_).

Response Body

The subscription, now with status canceled.

application/json
  1. response
id*string
object*string
status*string
Value in"active""canceled"
customer_email*string
amount*string
currency*Currency
Value in"USD""EUR""INR"
interval*string
Value in"week""month"
description*string|null
next_invoice_at*string
Formatdate-time
created_at*string
Formatdate-time
Example Request
curl -X DELETE 'https://example.com/api/v1/subscriptions/string'
Example Response
{  "id": "sub_2mQ8vT4kW9xL3pN7rB5s",  "object": "subscription",  "status": "active",  "customer_email": "string",  "amount": "string",  "currency": "USD",  "interval": "week",  "description": "string",  "next_invoice_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z"}