Skip to content

Create a checkout session for the current customer

POST
/cms/customer/payment/checkout
curl --request POST \
--url https://api.example.com/cms/customer/payment/checkout \
--header 'API-Key: <API-Key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Token: <Token>' \
--data '{ "cartId": "example", "productId": 1, "id": 1, "articleId": 1, "price": 1, "quantity": 1, "currency": "example", "payment_method": "example", "address": {}, "shipping_address": {}, "shipping_provider": "example", "vat_country": "NL", "ip_address": "example", "country": "example", "source": "example", "page": "example", "button": "example", "properties": {}, "token_id": "example", "custom_price": 1 }'

Initiates a payment for the current customer. No existing payment token is used. The user is required to interactively approve the purchase. The request can specify a cart, product, product item, or article to purchase. Handles shipping, VAT, and payment method selection.

Media typeapplication/json
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

string
address

Billing address

object
shipping_address

Shipping address

object
shipping_provider

Shipping provider

string
vat_country

2-letter ISO code of the country the customer pays VAT in, as listed under Countries (e.g. NL). Required for VAT calculation: without it the tax in the price matrix is 0. Prices already include VAT, so this sets how much of the total is VAT; it does not change the total.

string

Example

NL
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. For the stripe payment method: set “stripe_mode” to “subscription” to bill via Stripe Subscriptions instead of a one-off charge (default “oneoff”); set “payment_method_types” (array, e.g. [“fpx”], [“grabpay”], [“card”]) to restrict the Checkout Session to a specific rail instead of whatever is enabled in the Stripe dashboard - restricting to a local rail like fpx/grabpay also skips saving a reusable card; set “fpx_bank” to the FPX bank code to skip Stripe’s hosted bank-selection page and redirect the customer straight to their bank (only used when payment_method_types is exactly [“fpx”]).

object
token_id

Payment token ID for charge action

string
custom_price

Custom price for article

number format: float

Payment created successfully

Media typeapplication/json
object
payment
Payment

API representation of a payment

object
id

Payment ID

price

Order amount (DB decimal serialized as a string)

string
currency

Order currency

string
price_baseCurrency

Order amount in base currency (DB decimal serialized as a string)

string
status

Payment status

string
responseMessage

Response message

string
nullable
lastUpdate

Last update timestamp, MySQL datetime (Y-m-d H:i:s)

string
timestamp

Payment timestamp, MySQL datetime (Y-m-d H:i:s)

string
userId

User ID

nullable
paymentMethod

Payment method

string
renewal_id

Renewal ID

integer
nullable
cart

Cart items

Array<object>
object
item

Purchased product item. Currently serialized as a string reference of the form “WhiteBeard\ECommerce\ProductItems:” (see items_details for full objects).

One of:
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

sale_price

The price it sells at today: its timed offer’s price while one runs, otherwise 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
nullable
upgradeFrom

Upgrade from

string
upgradeExcludeItems

Upgrade exclude items

string
nullable
upgradePriceWeb

Upgrade price web

upgradePriceMobile

Upgrade price mobile

settings

Field values, keyed by field key (each {name, value, type}), e.g. {“size”: {“name”: “Size”, “value”: “large”, “type”: “list”}}: the same keys the product search takes in settings; an empty array when there are none

One of:
object
key
additional properties
object
name
string
value
string
type
string
hasImage

Has image

additional_label_1

Additional label 1

string
nullable
additional_label_2

Additional label 2

string
nullable
additional_label_3

Additional label 3

string
nullable
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 per currency code, or an empty array when none

One of:
object
key
additional properties
object
price
One of:
string
recurrentPrice
One of:
string
stock_enabled

Stock enabled

stock_available

Stock available

allow_backorder

Whether orders are accepted when out of stock

packageQuantity

Package quantity

relatedItems

Related items

Array<object>
object
images

Images (attachments)

Array<object>
object
id
string
name
string
description
string
url

High resolution URL

string
url_original
string
url_thumbnail
string
focal
string
image_width
integer
nullable
image_height
integer
nullable
video

Video (only for video attachments)

object
type
string
duration

Duration (only when present in metadata)

integer
files

Files (attachments)

Array<object>
object
id
string
name
string
description
string
url
string
type
string
duration

Duration (only when present in metadata)

integer
product_details

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

object
translations

Translations

action_data

Action data to be executed when a pricing tier is bought

Array<object>
nullable
object
function
string
param
string
group
string
action_data_renew

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

Array<object>
nullable
object
function
string
param
string
group
string
quantity
integer
price
One of:
number
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. “delivered” means digitally delivered (no physical product); “shipped_delivered” is a physical shipment that arrived.

string
Allowed values: waiting backordered shipped shipped_delivered delivered
shippingTrackingNumber

Shipment tracking number: from the shipping provider when it created the shipment, or set by hand on the order. Null when there is none.

string
nullable
authorization

Authorization

string
nullable
address

Address. An empty address is serialized as the string “[]”.

nullable
One of:
object
shipping_address

Shipping address. An empty address may be serialized as the string “[]” or null.

nullable
One of:
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
properties

Payment properties: those sent when the payment was created (such as UTM parameters, coupon code, affiliate info, stripe_mode), and those the system keeps on it (such as renewal_id, or payment method and CRM sync details)

object
key
additional properties
any
response

Payment provider response

object
success

Payment success status (for charge action). success=true with payment.status “unpaid” means the charge is still in progress: poll GET /cms/customer/payment/{payment_id}. For Touch’n Go, a responseMessage starting with https:// is a risk-challenge URL the customer must open first.

boolean

Example

{
"payment": {
"price": "12",
"price_baseCurrency": "12",
"lastUpdate": "2026-09-29 13:22:40",
"timestamp": "2026-09-18 14:46:39",
"cart": [
{
"item": "WhiteBeard\\ECommerce\\ProductItems:133",
"price": 12
}
],
"shippingStatus": "waiting",
"shippingTrackingNumber": "1Z999AA10123456784",
"address": "[]",
"shipping_address": "[]",
"properties": {
"utm_source": "newsletter",
"renewal_id": 3
}
}
}

Bad Request

Unauthorized

Forbidden