Skip to content

Create a subscription for the current customer using a saved payment method

POST
/cms/customer/payment/subscribe

Initiates a recurring subscription for the current customer entirely on-site, using a payment method previously saved via /customer/payment/setup. No redirect to the payment provider is performed. Only supported by payment methods that implement createSubscription() (e.g. stripe_subscription). The request can specify a cart, product, product item, or article to purchase.

object
cartId

Cart ID for existing cart

string
productId

Product ID for direct purchase

integer
id

Product item ID for direct purchase

integer
articleId

Article ID or array of article IDs

integer
price

Custom price for product

number format: float
quantity

Quantity for product item

integer
currency

Payment currency

string
payment_method

Payment method, must support on-site subscription creation

string
address

Billing address

object
shipping_address

Shipping address

object
shipping_provider

Shipping provider

string
vat_country

VAT country

string
ip_address

Customer IP address. Do not send this if the client is directly communicating with the API, such as from your mobile app.

string
country

2-letter ISO code of the country (only send when ip_address is filled)

string
source

Source (web, app, etc.)

string
page

Source page URL

string
button

Source button

string
properties

Additional properties to save for this payment, such as UTM parameters, coupon code, affiliate info, etc.

object
custom_price

Custom price for article

number format: float

Subscription created successfully. If the response object has requires_action = true, the frontend must call stripe.confirmCardPayment(client_secret) to complete SCA/3DS authentication.

object
payment
Payment

API representation of a payment

object
id

Payment ID

price

Order amount

number format: float
currency

Order currency

string
price_baseCurrency

Order amount in base currency

number format: float
status

Payment status

string
responseMessage

Response message

string
lastUpdate

Last update timestamp

string format: date-time
timestamp

Payment timestamp

string format: date-time
userId

User ID

paymentMethod

Payment method

string
renewal_id

Renewal ID

integer
nullable
cart

Cart items

Array<object>
object
item
Pricing Tier

API representation of an ecommerce pricing tier (product item)

object
id

Item ID

description

Description

string
productId

Product ID

product

Product name

string
price

Price

currency

Currency

string
available

Available

item_order

Item order

shippable

Shippable

weight

Weight

installments

Installments

oncePerUser

Once per user

isUpgrade

Is upgrade

upgradeType

Upgrade type

string
upgradeFrom

Upgrade from

string
upgradeExcludeItems

Upgrade exclude items

string
upgradePriceWeb

Upgrade price web

upgradePriceMobile

Upgrade price mobile

settings

Settings

object
hasImage

Has image

additional_label_1

Additional label 1

string
additional_label_2

Additional label 2

string
additional_label_3

Additional label 3

string
diameter

Diameter

length

Length

depth

Depth

width

Width

recurrent

Recurrent

recurrentPrice

Recurrent price

recurrentStart

Recurrent start

string
recurrentSchedule

Recurrent schedule

string
sku

SKU

string
prices

Prices

object
stock_enabled

Stock enabled

stock_available

Stock available

packageQuantity

Package quantity

relatedItems

Related items

Array<object>
object
images

Images

Array<string>
files

Files

Array<string>
product_details

Product details. Deprecated to avoid circular references. Use productId instead.

object
translations

Translations

Example
{
"en": {
"name": "Name",
"subtitle": "Subtitle"
},
"fr": {
"name": "Nom",
"subtitle": "Sous-titre"
}
}
actionData

Action data to be executed when a pricing tier is bought

Array<object>
object
function
string
Example
registerSubscription
param
string
Example
365
group
string
Example
subscription
Example
[
{
"function": "registerSubscription",
"param": "365",
"group": "subscription"
}
]
actionDataRenew

Action data to be executed when a pricing tier is bought as a renewal

Array<object>
object
function
string
Example
registerSubscription
param
string
Example
365
group
string
Example
subscription
Example
[
{
"function": "registerSubscription",
"param": "365",
"group": "subscription"
}
]
quantity
integer
price
number format: float
price_matrix

Price matrix

object
subtotal

Subtotal amount

number
shipping

Shipping amount

number
tax

Tax amount

number
discount

Discount amount

number
total

Total amount

number
shippingStatus

Shipping status

string
authorization

Authorization

string
address

Address

object
shipping_address

Shipping address

object
shipping_price

Shipping price

tax_price

Tax price

referenceOrderId

Reference order ID

integer
nullable
source

Source of the payment (such as website or mobile app store)

string
response

Subscription creation response: subscription_id, status, requires_action, client_secret

object

Bad Request

Unauthorized

Forbidden