Create Subscription
Create a subscription for a customer.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Request payload for creating a new subscription
This struct represents the data required to create a new subscription in the system. It includes details about the product, quantity, customer information, and billing details.
Unique identifier of the product to subscribe to
Number of units to subscribe for. Must be at least 1.
x >= 0
List of payment methods allowed during checkout.
Customers will never see payment methods that are not in this list. However, adding a method here does not guarantee customers will see it. Availability still depends on other factors (e.g., customer location, merchant settings).
credit
, debit
, upi_collect
, upi_intent
, apple_pay
, cashapp
, google_pay
, multibanco
, bancontact_card
, eps
, ideal
, przelewy24
, affirm
, klarna
, sepa
, ach
, amazon_pay
AED
, ALL
, AMD
, ANG
, AOA
, ARS
, AUD
, AWG
, AZN
, BAM
, BBD
, BDT
, BGN
, BHD
, BIF
, BMD
, BND
, BOB
, BRL
, BSD
, BWP
, BYN
, BZD
, CAD
, CHF
, CLP
, CNY
, COP
, CRC
, CUP
, CVE
, CZK
, DJF
, DKK
, DOP
, DZD
, EGP
, ETB
, EUR
, FJD
, FKP
, GBP
, GEL
, GHS
, GIP
, GMD
, GNF
, GTQ
, GYD
, HKD
, HNL
, HRK
, HTG
, HUF
, IDR
, ILS
, INR
, IQD
, JMD
, JOD
, JPY
, KES
, KGS
, KHR
, KMF
, KRW
, KWD
, KYD
, KZT
, LAK
, LBP
, LKR
, LRD
, LSL
, LYD
, MAD
, MDL
, MGA
, MKD
, MMK
, MNT
, MOP
, MRU
, MUR
, MVR
, MWK
, MXN
, MYR
, MZN
, NAD
, NGN
, NIO
, NOK
, NPR
, NZD
, OMR
, PAB
, PEN
, PGK
, PHP
, PKR
, PLN
, PYG
, QAR
, RON
, RSD
, RUB
, RWF
, SAR
, SBD
, SCR
, SEK
, SGD
, SHP
, SLE
, SLL
, SOS
, SRD
, SSP
, STN
, SVC
, SZL
, THB
, TND
, TOP
, TRY
, TTD
, TWD
, TZS
, UAH
, UGX
, USD
, UYU
, UZS
, VES
, VND
, VUV
, WST
, XAF
, XCD
, XOF
, XPF
, YER
, ZAR
, ZMW
Discount Code to apply to the subscription
If true, generates a payment link. Defaults to false if not specified.
Optional URL to redirect after successful subscription creation
Display saved payment methods of a returning customer False by default
Tax ID in case the payment is B2B. If tax id validation fails the payment creation will fail
Optional trial period in days If specified, this value overrides the trial period set in the product's price Must be between 0 and 10000 days
Response
Tax will be added to the amount and charged to the customer on each billing cycle
x >= 0
Unique identifier for the subscription
Client secret used to load Dodo checkout SDK NOTE : Dodo checkout SDK will be coming soon
The discount id if discount is applied
URL to checkout page