Skip to main content
POST
JavaScript

Authorizations

X-API-KEY
string
header
required

Server API Key

Headers

X-ACCOUNT-ID
string

Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.

X-ENVIRONMENT-ID
string

Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).

Body

application/json

Provision a subscription. Returns subscription or checkout URL.

customerId
string
required

Customer ID to provision the subscription for

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$
planId
string
required

Plan ID to provision

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
id
string

Unique identifier for the subscription

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
payingCustomerId
string | null

Optional paying customer ID for split billing scenarios

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$
resourceId
string | null

Optional resource ID for multi-instance subscriptions

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
billingPeriod
enum<string>

Billing period (MONTHLY or ANNUALLY)

Available options:
MONTHLY,
ANNUALLY
addons
SubscriptionAddon · object[]
charges
SubscriptionCharge · object[]
startDate
string<date-time>

Subscription start date

cancellationDate
string<date-time>

Subscription cancellation date

billingInformation
object
billingId
string | null

External billing system identifier

Maximum string length: 255
billingCountryCode
string | null

The ISO 3166-1 alpha-2 country code for billing

Maximum string length: 255
entitlements
(SubscriptionFeatureEntitlementRequest · object | SubscriptionCreditEntitlementRequest · object)[]

Feature entitlement configuration for a subscription

trialOverrideConfiguration
object

Trial period override settings

scheduleStrategy
enum<string>

Strategy for scheduling subscription changes

Available options:
END_OF_BILLING_PERIOD,
END_OF_BILLING_MONTH,
IMMEDIATE
checkoutOptions
object

Checkout page configuration for payment collection

metadata
object

Additional metadata for the subscription

salesforceId
string | null

Salesforce ID

Maximum string length: 255
budget
object | null
minimumSpend
object | null

Minimum spend amount

priceOverrides
object[]
paymentCollectionMethod
enum<string>
default:CHARGE

How payments should be collected for this subscription

Available options:
CHARGE,
INVOICE,
NONE
appliedCoupon
SubscriptionCoupon · object

Coupon configuration

awaitPaymentConfirmation
boolean
default:true

Whether to wait for payment confirmation before returning the subscription

unitQuantity
integer

Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).

Required range: x >= 0
billingCycleAnchor
enum<string>

Billing cycle anchor behavior for the subscription

Available options:
UNCHANGED,
NOW

Response

The newly created subscription object.

Response object

data
ProvisionSubscriptionResult · object
required

Provisioning result with status and subscription or checkout URL.