Skip to main content
POST
/
api
/
v1
/
subscriptions
/
{subscription_id}
/
cancel
Cancel Subscription
curl --request POST \
  --url https://api.example.com/api/v1/subscriptions/{subscription_id}/cancel \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "cancel_at_period_end": false
}
'
{
  "subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "cancelled_at": "2023-11-07T05:31:56Z",
  "cancel_at_period_end": true,
  "refund": {
    "refund_amount": 123,
    "reason": "",
    "policy_name": "<string>",
    "refund_type": "<string>",
    "remaining_ratio": 123,
    "period_start": "<string>",
    "period_end": "<string>",
    "cancellation_fee": 123
  }
}

Headers

x-api-key
string
required

Path Parameters

subscription_id
string
required

Body

application/json
cancel_at_period_end
boolean
default:false

Response

Successful Response

subscription_id
string<uuid>
required
status
string
required
cancelled_at
string<date-time> | null
required
cancel_at_period_end
boolean
required
refund
RefundInfo · object | null