Saltar al contenido principal
POST
Create subscription
This reference describes API version 2026-05-12. Send Commet-Version: 2026-05-12 with your request.

Autorizaciones

x-api-key
string
header
requerido

Encabezados

Commet-Version
string
predeterminado:2026-05-12

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

Cuerpo

application/json
customerId
string
requerido
Required string length: 1 - 200
skipTrial
boolean
predeterminado:false
requerido
planId
string
Minimum string length: 1
planCode
string
billingInterval
enum<string> | null
Opciones disponibles:
weekly,
monthly,
quarterly,
semiannual,
yearly,
one_time
initialSeats
object
customTrialDays
integer
Rango requerido: 0 <= x <= 9007199254740991
promoCode
string
Minimum string length: 1
provider

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

Opciones disponibles:
stripe,
commet,
dlocal
paymentMethodTypes
enum<string>[]

Payment methods the initial checkout may offer. Restricts what the checkout already offers for the buyer's country, currency and payment connection; it never enables a method the connection does not have and never changes routing. When none of them is available to the buyer, the checkout shows that it cannot accept payments.

Minimum array length: 1
Opciones disponibles:
card,
oxxo,
mercado_pago,
google_pay,
smartpix
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.

Rango requerido: 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.

planVersionId
string

Public ID of a published version of the plan, current or not, including an experiment's versions. The subscription is created on that version and stays on it: checkout charges its price and activation grants its credits, add-ons and credit packs. When omitted, the subscription gets the current version, or the version an experiment code (planCode <plan code>:<experiment code>) sells.

Minimum string length: 1
customIntroOffer
object
externalId
string

Respuesta

Success

success
any
requerido
data
object
requerido