Skip to main content
POST
Create subscription

Body

application/json
invoice_items
SubscriptionInvoiceItem · object[]
required
start_date
string<date>
end_date
string<date> | null

if specified, subscrition will be revoked on this date.

coupon_code
string | null
is_prepaid
boolean
default:false

Refers to a pricing model where customers are charged based on their actual usage of a service. Usage based billing works for digital products.

usage_based_billing
boolean
default:false

Refers to a pricing model where customers are charged based on their actual usage of a service. Usage based billing works for digital products.

usage_based_tiers
object[]

Refers to a pricing structure where customers are charged based on their usage, but the cost per unit of usage decreases or changes as they move into higher usage levels.

grace_period_days
integer
default:0

The number of days after a failed payment to retry before canceling.

is_cancellation_allowed
boolean
default:true

Indcates whether the next billing cancellation is allowed or not.

days_until_cancellation_allowed
integer
default:3

Specifies the number of days the customer has to cancel before the next billing.

Response

OK

message
string
required
success
boolean
required
content
object
required