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

Autorizaciones

x-api-key
string
header
requerido

Encabezados

Commet-Version
string
predeterminado:2026-05-25

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

Cuerpo

application/json
code
string
requerido
Minimum string length: 1
discountType
enum<string>
requerido
Opciones disponibles:
percentage,
amount
discountValue
integer
requerido
Rango requerido: x <= 9007199254740991
durationCycles
integer
Rango requerido: x <= 9007199254740991
billingInterval
enum<string> | null
Opciones disponibles:
weekly,
monthly,
quarterly,
semiannual,
yearly,
one_time
maxRedemptions
integer
Rango requerido: x <= 9007199254740991
expiresAt
string<date-time>
planIds
string[]
firstPurchaseOnly
boolean

Whether the code only applies to a customer's first purchase: one with no paid invoice above zero and no paid subscription. Defaults to false.

Respuesta

Success

success
any
requerido
data
object
requerido