POST
/
subscriptions

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Body

application/json
billing_cadence
enum<string>
required
Available options:
RECURRING,
ONETIME
billing_period
enum<string>
required
Available options:
MONTHLY,
ANNUAL,
WEEKLY,
DAILY
billing_period_count
integer
required
Required range: x > 1
currency
string
required
customer_id
string
required
invoice_cadence
enum<string>
required
Available options:
ARREAR,
ADVANCE
plan_id
string
required
start_date
string
required
end_date
string
lookup_key
string
metadata
object
trial_end
string
trial_start
string

Response

201 - application/json
billing_anchor
string

BillingAnchor is the reference point that aligns future billing cycle dates. It sets the day of week for week intervals, the day of month for month and year intervals, and the month of year for year intervals. The timestamp is in UTC format.

billing_cadence
any
billing_period
any
billing_period_count
integer

BillingPeriodCount is the total number units of the billing period.

cancel_at
string

CancelAt is the date the subscription will be canceled

cancel_at_period_end
boolean

CancelAtPeriodEnd is whether the subscription was canceled at the end of the current period

cancelled_at
string

CanceledAt is the date the subscription was canceled

created_at
string
created_by
string
currency
string

Currency is the currency of the subscription in lowercase 3 digit ISO codes

current_period_end
string

CurrentPeriodEnd is the end of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.

current_period_start
string

CurrentPeriodStart is the end of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.

customer
object
customer_id
string

CustomerID is the identifier for the customer in our system

end_date
string

EndDate is the end date of the subscription

id
string

ID is the unique identifier for the subscription

invoice_cadence
any
line_items
object[]
lookup_key
string

LookupKey is the key used to lookup the subscription in our system

metadata
object

Metadata is a map of key-value pairs that can be attached to the subscription

plan
object
plan_id
string

PlanID is the identifier for the plan in our system

start_date
string

StartDate is the start date of the subscription

status
enum<string>
Available options:
published,
deleted,
archived
subscription_status
any
tenant_id
string
trial_end
string

TrialEnd is the end date of the trial period

trial_start
string

TrialStart is the start date of the trial period

updated_at
string
updated_by
string
version
integer

Version is used for optimistic locking