Skip to main content
POST
cURL
Create a subscription for a customer. Commet selects the default price when priceId is omitted and resolves its market from the customer’s billing country. Without an offer override, Commet applies the price’s automatic introductory Offer. Pass offerId to apply an active compatible Offer directly, or cardPromotionId to preselect a card-eligible Promotional Offer for the initial checkout when card promotions are enabled for the organization. For the initial checkout, provider accepts either a processor name or an exact payment connection ID.

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.

Body

application/json
customerId
string
required
Required string length: 1 - 200
planId
string
required
Minimum string length: 1
billingInterval
enum<string> | null
Available options:
weekly,
monthly,
quarterly,
semiannual,
yearly,
one_time
priceId
string

Public price ID. When omitted, Commet selects the default price for the billing interval and still applies its market pricing.

Minimum string length: 1
initialSeats
object
provider

Payment provider name or exact public payment connection ID for the initial checkout. Overrides country routing when present.

Available options:
stripe,
commet,
dlocal
name
string
startDate
string<date-time>
successUrl
string<uri>
prepaidPeriods
integer

Billing periods of the subscription's interval paid with the first payment, including the current one. Defaults to 1. The interval does not change: each paid period renews at zero and the subscription renews normally after the last one unless cancelAtPeriodEnd is true.

Required range: 1 <= x <= 60
cancelAtPeriodEnd
boolean

Schedules the cancellation from creation so the subscription ends after its last paid period and never renews with any payment method.

offerId
any
promoCode
string
Minimum string length: 1
customTrialDays
integer
Required range: 0 <= x <= 9007199254740991
skipTrial
boolean
default:false

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
checkoutProvider
enum<string> | null
required

Payment provider resolved for this checkout when the subscription response was created. This is an informational snapshot and may differ when the checkout is loaded if its country or the organization's routing changes.

Available options:
stripe,
commet,
dlocal
priceId
string | null
required
object
string
required
Allowed value: "subscription"
livemode
boolean
required