Skip to main content
POST
cURL
Cancel immediately or at period end and return the updated subscription.

Authorizations

x-api-key
string
header
required

Headers

Idempotency-Key
string

Unique key used to safely retry this write for 24 hours without applying it twice.

Required string length: 1 - 200
Commet-Version
string
default:2026-08-27

API version used by this reference. Send this header to select this contract explicitly.

Path Parameters

id
string
required

Body

application/json
reason
string
immediate
boolean

Response

Success

id
string
required
customerId
string
required
plan
object
required
name
string
required
description
string | null
required
status
enum<string>
required
Available options:
draft,
pending_payment,
trialing,
active,
past_due,
paused,
canceled
billingInterval
enum<string> | null
required
Available options:
weekly,
monthly,
quarterly,
semiannual,
yearly,
one_time
trialEndsAt
string<date-time> | null
required
currentPeriod
object | null
required
cancellation
object | null
required
cancelAtPeriodEnd
boolean
required
scheduledPlanChange
object | null
required
startDate
string<date-time>
required
endDate
string<date-time> | null
required
billingDayOfMonth
integer | null
required
Required range: -9007199254740991 <= x <= 9007199254740991
nextBillingDate
string<date-time> | null
required
checkoutUrl
string | null
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
offerApplications
object[]
required
pause
object
required
consumptionModel
enum<string> | null
required
Available options:
metered,
credits,
balance
features
object[]
required
credits
object | null
required
balance
object | null
required
priceId
string | null
required
object
string
required
Allowed value: "subscription"
livemode
boolean
required
planGrant
object