Prepare pending subscription

Body Params
string

Customer handle of existing customer. Customer can also be provided in same operation by supplying the parameter create_customer.

string
required

Plan handle

int32
≥ 0

Optional custom per quantity plan price. If provided the plan price billed for each billing period will be overridden by this price.

int32
≥ 1

Optional quantity of the plan product for this subscription. If not provided the default is the default plan quantity defined for the plan.

boolean

Test flag. If given it will be verified that the account state matches the intended create state.

string

Per account unique handle for the subscription. Max length 255 with allowable characters [a-zA-Z0-9_.-@]. Must be provided if generate_handle not defined.

metadata
object

Custom metadata.

create_customer
object

Create customer object

int32
≥ 1

Optional plan version, default is to use newest version of plan

boolean

Whether the optional amount is including VAT. Defaults to true.

boolean

Auto generate handle on the form sub-[sequence_number]

string

Date and time on the form yyyy-MM-dd, yyyyMMdd, yyyy-MM-ddTHH:mm and yyyy-MM-ddTHH:mm:ss from which the subscription is eligible to schedule first invoice. If no time part is given start of day will be used. A start date in the past can be used, but no more than one period length in the past. A start date in the past can result in an instant invoice for a past billing period start. Default value is current date and time.

string

Fixed date and time on the form yyyy-MM-dd, yyyyMMdd, yyyy-MM-ddTHH:mm and yyyy-MM-ddTHH:mm:ss where the subscription will automatically cancel. The subscription will expire at the end of the billing period containing the end date. Default is no fixed end date.

int64
≥ 0

A grace duration in seconds from the creation of a subscription where no dunning process is started for a failing invoice. This allows a certain amount of time for the customer to sign up with a payment method.

boolean

Override plan trial settings and disable trial

boolean

Override plan setup fee settings and disable fee

string

Optional custom trial period overriding the setting on the subscription plan. Defined in ISO 8601 duration. See https://en.wikipedia.org/wiki/ISO_8601#Durations. E.g. P7D for seven days or P1M for one month.

subscription_discounts
array of objects
length between 0 and 100

Discounts to attach to subscription. A maximum of 100 discounts is allowed.

subscription_discounts
coupon_codes
array of strings

Coupon codes to redeem for subscription

coupon_codes
add_ons
array of objects
length between 0 and 100

Add-ons to attach to subscription. The same add-on can only be attached to subscription once unless unique handles are supplied for the subscription add-on. A maximum of 100 add-ons is allowed.

add_ons
additional_costs
array of objects
length between 0 and 100

Additional costs to add to subscription at creation time. A maximum of 100 additional costs is allowed.

additional_costs
additional_entitlements
array of strings

Additional entitlements to add to subscription at creation time.

additional_entitlements
excluded_entitlements
array of strings

Entitlements to exclude from subscription at creation time.

excluded_entitlements
metered_billing_products
array of objects

Usage-based billing products to attach to subscription.

metered_billing_products
string

Date and time on the form yyyy-MM-dd, yyyyMMdd, yyyy-MM-ddTHH:mm and yyyy-MM-ddTHH:mm:ss which represents the earliest possible cancellation date

int32
0 to 12000

Optional number of notice periods for a cancel. The subscription will be cancelled for this number of full periods before expiring. Either from the cancellation date, or from the end of the the current period. See notice_periods_after_current. The default is to expire at the end of current period (0). A value of 1 (and notice_periods_after_current set to true) will for example result in a scenario where the subscription is cancelled until the end of current period, and then for the full subsequent period before expiring.

string
enum

Time unit used in conjunction with notice periods

Allowed:
string

Contract start date for the subscription

string

Contract period end date for the subscription

int32
0 to 12000

Contract period after renewal for the subscription.

string
enum

Time unit used in conjunction with contract period after renewal.

Allowed:
string

Cost center for accounting invoices, will be applied to all future invoices on this subscription

string

Purchase order number for accounting invoices, will be applied to all future invoices on this subscription

Responses

Language
Credentials
Basic
base64
:
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json