Create subscription

Create a subscription for a customer on-session.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
int32
required

The unique identifier of the site associated with your account.

Body Params
int32
required

The unique identifier of plan. If you associated a customer segment to the plan, a validation will be performed. Therefore, it is recommended to validate against eligible plans for the customer first. Always required.

string
enum
Defaults to stripe

The optional payment gateway, one of stripe, braintree, vantiv, tap or cybersource. Always defaults to stripe.

Allowed:
string

The single-use token that represents the payment method details. Typically generated using the payment gateway's tools and libraries. This payment method will be used to attempt payments for the subscription.

int32

The unique identifier of an existing chargeable payment method already attached to the customer, which will be used to attempt payments for this subscription.

int32

The identifier of the shipping address to associate with the subscription. Required if related product requires an address, if product is available only in certain countries, or if tax feature is enabled under your account.

string

An optional coupon code to apply a discount to the subscription. If you associated a customer segment to the coupon, a validation will be performed. Therefore, it is recommended to validate against eligible coupons for the customer first.

boolean

Pay your subscription via send_invoice option

metadata
array of objects

Set of key-value pairs that can be saved on subscription level. This can be useful for storing additional information about the object in a structured format.

metadata
string

An optional campaign key associated to the subscription. If the key does not already exist, it will be created. The campaign key must be between 3 and 191 characters in length and include only letters, numbers, dashes and underscores without space.

string

An arbitrary string specifying the origin of the subscription request. (ex: web, bobile, blow-in/letter, phone, API, imported, etc.)

int32
Defaults to 1

Quantity for this subscription, always 1 by default.

string

The Apple in-app purchase receipt. Typically populated by leveraging our iOS SDK.

ip_addresses
array of strings

IP addresses that will identify end-users as members of this subscription upon registration/login. This attribute can only be set when the subscription plan type is membership. Two format are accepted for strings:

A single public IP address
This should be a valid public IP address following the standard IPv4 format (e.g., 192.168.1.100).

A range of public IP addresses
This should be a range of public IP addresses following the CIDR notation (e.g., 198.51.100.0/24).

You can use this tool calculate the appropriate CIDR notation for your needs.

ip_addresses
domains
array of strings

Email domains that will allow end-users with these domains to be members of this subscription upon registration/login. This attribute can only be set when the subscription plan type is membership.

domains
Headers
string
required
Defaults to Bearer eyJ***
string
Defaults to application/json
Responses

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