curl --request POST \
--url https://api.beta.suby.fi/v3/checkout/sessions \
--header 'Content-Type: application/json' \
--header 'X-Suby-Api-Key: <api-key>' \
--data '
{
"successUrl": "<string>",
"cancelUrl": "<string>",
"productId": "pro_abc123",
"lineItems": [
{
"productId": "pro_abc123",
"quantity": 1,
"adjustable": true,
"min": 499,
"max": 500
}
],
"priceCents": "1999",
"currency": "<string>",
"displayName": "<string>",
"displayDescription": "<string>",
"customer": {
"id": "cus_abc123",
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>"
},
"discountCode": "<string>",
"savePaymentMethod": false,
"metadata": {},
"customFields": [
{
"key": "<string>",
"label": "<string>",
"required": true,
"placeholder": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>"
}
],
"validation": {
"regex": "<string>",
"errorMessage": "<string>"
},
"defaultValue": "<string>"
}
],
"expiresIn": 302430
}
'import requests
url = "https://api.beta.suby.fi/v3/checkout/sessions"
payload = {
"successUrl": "<string>",
"cancelUrl": "<string>",
"productId": "pro_abc123",
"lineItems": [
{
"productId": "pro_abc123",
"quantity": 1,
"adjustable": True,
"min": 499,
"max": 500
}
],
"priceCents": "1999",
"currency": "<string>",
"displayName": "<string>",
"displayDescription": "<string>",
"customer": {
"id": "cus_abc123",
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>"
},
"discountCode": "<string>",
"savePaymentMethod": False,
"metadata": {},
"customFields": [
{
"key": "<string>",
"label": "<string>",
"required": True,
"placeholder": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>"
}
],
"validation": {
"regex": "<string>",
"errorMessage": "<string>"
},
"defaultValue": "<string>"
}
],
"expiresIn": 302430
}
headers = {
"X-Suby-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Suby-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
successUrl: '<string>',
cancelUrl: '<string>',
productId: 'pro_abc123',
lineItems: [{productId: 'pro_abc123', quantity: 1, adjustable: true, min: 499, max: 500}],
priceCents: '1999',
currency: '<string>',
displayName: '<string>',
displayDescription: '<string>',
customer: {
id: 'cus_abc123',
email: 'jsmith@example.com',
firstName: '<string>',
lastName: '<string>'
},
discountCode: '<string>',
savePaymentMethod: false,
metadata: {},
customFields: [
{
key: '<string>',
label: '<string>',
required: true,
placeholder: '<string>',
options: [{value: '<string>', label: '<string>'}],
validation: {regex: '<string>', errorMessage: '<string>'},
defaultValue: '<string>'
}
],
expiresIn: 302430
})
};
fetch('https://api.beta.suby.fi/v3/checkout/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beta.suby.fi/v3/checkout/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'successUrl' => '<string>',
'cancelUrl' => '<string>',
'productId' => 'pro_abc123',
'lineItems' => [
[
'productId' => 'pro_abc123',
'quantity' => 1,
'adjustable' => true,
'min' => 499,
'max' => 500
]
],
'priceCents' => '1999',
'currency' => '<string>',
'displayName' => '<string>',
'displayDescription' => '<string>',
'customer' => [
'id' => 'cus_abc123',
'email' => 'jsmith@example.com',
'firstName' => '<string>',
'lastName' => '<string>'
],
'discountCode' => '<string>',
'savePaymentMethod' => false,
'metadata' => [
],
'customFields' => [
[
'key' => '<string>',
'label' => '<string>',
'required' => true,
'placeholder' => '<string>',
'options' => [
[
'value' => '<string>',
'label' => '<string>'
]
],
'validation' => [
'regex' => '<string>',
'errorMessage' => '<string>'
],
'defaultValue' => '<string>'
]
],
'expiresIn' => 302430
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Suby-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.beta.suby.fi/v3/checkout/sessions"
payload := strings.NewReader("{\n \"successUrl\": \"<string>\",\n \"cancelUrl\": \"<string>\",\n \"productId\": \"pro_abc123\",\n \"lineItems\": [\n {\n \"productId\": \"pro_abc123\",\n \"quantity\": 1,\n \"adjustable\": true,\n \"min\": 499,\n \"max\": 500\n }\n ],\n \"priceCents\": \"1999\",\n \"currency\": \"<string>\",\n \"displayName\": \"<string>\",\n \"displayDescription\": \"<string>\",\n \"customer\": {\n \"id\": \"cus_abc123\",\n \"email\": \"jsmith@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\n },\n \"discountCode\": \"<string>\",\n \"savePaymentMethod\": false,\n \"metadata\": {},\n \"customFields\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {\n \"regex\": \"<string>\",\n \"errorMessage\": \"<string>\"\n },\n \"defaultValue\": \"<string>\"\n }\n ],\n \"expiresIn\": 302430\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Suby-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.beta.suby.fi/v3/checkout/sessions")
.header("X-Suby-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"successUrl\": \"<string>\",\n \"cancelUrl\": \"<string>\",\n \"productId\": \"pro_abc123\",\n \"lineItems\": [\n {\n \"productId\": \"pro_abc123\",\n \"quantity\": 1,\n \"adjustable\": true,\n \"min\": 499,\n \"max\": 500\n }\n ],\n \"priceCents\": \"1999\",\n \"currency\": \"<string>\",\n \"displayName\": \"<string>\",\n \"displayDescription\": \"<string>\",\n \"customer\": {\n \"id\": \"cus_abc123\",\n \"email\": \"jsmith@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\n },\n \"discountCode\": \"<string>\",\n \"savePaymentMethod\": false,\n \"metadata\": {},\n \"customFields\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {\n \"regex\": \"<string>\",\n \"errorMessage\": \"<string>\"\n },\n \"defaultValue\": \"<string>\"\n }\n ],\n \"expiresIn\": 302430\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beta.suby.fi/v3/checkout/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Suby-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"successUrl\": \"<string>\",\n \"cancelUrl\": \"<string>\",\n \"productId\": \"pro_abc123\",\n \"lineItems\": [\n {\n \"productId\": \"pro_abc123\",\n \"quantity\": 1,\n \"adjustable\": true,\n \"min\": 499,\n \"max\": 500\n }\n ],\n \"priceCents\": \"1999\",\n \"currency\": \"<string>\",\n \"displayName\": \"<string>\",\n \"displayDescription\": \"<string>\",\n \"customer\": {\n \"id\": \"cus_abc123\",\n \"email\": \"jsmith@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\n },\n \"discountCode\": \"<string>\",\n \"savePaymentMethod\": false,\n \"metadata\": {},\n \"customFields\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {\n \"regex\": \"<string>\",\n \"errorMessage\": \"<string>\"\n },\n \"defaultValue\": \"<string>\"\n }\n ],\n \"expiresIn\": 302430\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "cs_abc123",
"organizationId": "<string>",
"mode": "payment",
"productId": "<string>",
"lineItems": [
{
"productId": "<string>",
"quantity": 123,
"adjustable": true,
"min": 123,
"max": 123
}
],
"amount": 123,
"currency": "<string>",
"displayName": "<string>",
"taxBehavior": "inclusive",
"allowPromo": true,
"customerId": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerLastName": "<string>",
"successUrl": "<string>",
"cancelUrl": "<string>",
"discountCode": "<string>",
"metadata": {},
"customFields": [
{
"key": "<string>",
"label": "<string>",
"type": "input",
"required": true,
"placeholder": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>"
}
],
"validation": {
"regex": "<string>",
"errorMessage": "<string>"
},
"defaultValue": "<string>"
}
],
"status": "OPEN",
"token": "cs_abc123.eyJpZCI6….Kx9f…",
"url": "<string>",
"expiresAt": 123,
"createdAt": 123
},
"message": "<string>"
}{
"success": false,
"error": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}{
"success": false,
"error": "NOT_FOUND",
"message": "Resource not found",
"data": "<unknown>"
}Create a checkout session
Mint a signed hosted-checkout token (cs_…). The returned url is the page you
send the payer to · the only place a card is ever collected.
mode=payment · a one-time charge.
mode=subscription · opens a subscription and bills its first cycle. Needs a
billingMode: subscription product
(CHECKOUT_SUBSCRIPTION_REQUIRES_RECURRING_PRODUCT), and is required to open one ·
a recurring product sold as payment is charged once and never renews. Renewals
are then driven by Suby.
mode=setup · stores a card without charging, for later off-session debits
(POST /v3/payments/off-session). No Payment is created. Requires a pay_as_you_go
productId, which names what the payer authorises without pricing the page. A
priced product here is refused (CHECKOUT_SETUP_REQUIRES_PER_USE_PRODUCT), a
per-use one on any other mode too (PRODUCT_PRICED_PER_USE).
curl --request POST \
--url https://api.beta.suby.fi/v3/checkout/sessions \
--header 'Content-Type: application/json' \
--header 'X-Suby-Api-Key: <api-key>' \
--data '
{
"successUrl": "<string>",
"cancelUrl": "<string>",
"productId": "pro_abc123",
"lineItems": [
{
"productId": "pro_abc123",
"quantity": 1,
"adjustable": true,
"min": 499,
"max": 500
}
],
"priceCents": "1999",
"currency": "<string>",
"displayName": "<string>",
"displayDescription": "<string>",
"customer": {
"id": "cus_abc123",
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>"
},
"discountCode": "<string>",
"savePaymentMethod": false,
"metadata": {},
"customFields": [
{
"key": "<string>",
"label": "<string>",
"required": true,
"placeholder": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>"
}
],
"validation": {
"regex": "<string>",
"errorMessage": "<string>"
},
"defaultValue": "<string>"
}
],
"expiresIn": 302430
}
'import requests
url = "https://api.beta.suby.fi/v3/checkout/sessions"
payload = {
"successUrl": "<string>",
"cancelUrl": "<string>",
"productId": "pro_abc123",
"lineItems": [
{
"productId": "pro_abc123",
"quantity": 1,
"adjustable": True,
"min": 499,
"max": 500
}
],
"priceCents": "1999",
"currency": "<string>",
"displayName": "<string>",
"displayDescription": "<string>",
"customer": {
"id": "cus_abc123",
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>"
},
"discountCode": "<string>",
"savePaymentMethod": False,
"metadata": {},
"customFields": [
{
"key": "<string>",
"label": "<string>",
"required": True,
"placeholder": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>"
}
],
"validation": {
"regex": "<string>",
"errorMessage": "<string>"
},
"defaultValue": "<string>"
}
],
"expiresIn": 302430
}
headers = {
"X-Suby-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Suby-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
successUrl: '<string>',
cancelUrl: '<string>',
productId: 'pro_abc123',
lineItems: [{productId: 'pro_abc123', quantity: 1, adjustable: true, min: 499, max: 500}],
priceCents: '1999',
currency: '<string>',
displayName: '<string>',
displayDescription: '<string>',
customer: {
id: 'cus_abc123',
email: 'jsmith@example.com',
firstName: '<string>',
lastName: '<string>'
},
discountCode: '<string>',
savePaymentMethod: false,
metadata: {},
customFields: [
{
key: '<string>',
label: '<string>',
required: true,
placeholder: '<string>',
options: [{value: '<string>', label: '<string>'}],
validation: {regex: '<string>', errorMessage: '<string>'},
defaultValue: '<string>'
}
],
expiresIn: 302430
})
};
fetch('https://api.beta.suby.fi/v3/checkout/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beta.suby.fi/v3/checkout/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'successUrl' => '<string>',
'cancelUrl' => '<string>',
'productId' => 'pro_abc123',
'lineItems' => [
[
'productId' => 'pro_abc123',
'quantity' => 1,
'adjustable' => true,
'min' => 499,
'max' => 500
]
],
'priceCents' => '1999',
'currency' => '<string>',
'displayName' => '<string>',
'displayDescription' => '<string>',
'customer' => [
'id' => 'cus_abc123',
'email' => 'jsmith@example.com',
'firstName' => '<string>',
'lastName' => '<string>'
],
'discountCode' => '<string>',
'savePaymentMethod' => false,
'metadata' => [
],
'customFields' => [
[
'key' => '<string>',
'label' => '<string>',
'required' => true,
'placeholder' => '<string>',
'options' => [
[
'value' => '<string>',
'label' => '<string>'
]
],
'validation' => [
'regex' => '<string>',
'errorMessage' => '<string>'
],
'defaultValue' => '<string>'
]
],
'expiresIn' => 302430
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Suby-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.beta.suby.fi/v3/checkout/sessions"
payload := strings.NewReader("{\n \"successUrl\": \"<string>\",\n \"cancelUrl\": \"<string>\",\n \"productId\": \"pro_abc123\",\n \"lineItems\": [\n {\n \"productId\": \"pro_abc123\",\n \"quantity\": 1,\n \"adjustable\": true,\n \"min\": 499,\n \"max\": 500\n }\n ],\n \"priceCents\": \"1999\",\n \"currency\": \"<string>\",\n \"displayName\": \"<string>\",\n \"displayDescription\": \"<string>\",\n \"customer\": {\n \"id\": \"cus_abc123\",\n \"email\": \"jsmith@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\n },\n \"discountCode\": \"<string>\",\n \"savePaymentMethod\": false,\n \"metadata\": {},\n \"customFields\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {\n \"regex\": \"<string>\",\n \"errorMessage\": \"<string>\"\n },\n \"defaultValue\": \"<string>\"\n }\n ],\n \"expiresIn\": 302430\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Suby-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.beta.suby.fi/v3/checkout/sessions")
.header("X-Suby-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"successUrl\": \"<string>\",\n \"cancelUrl\": \"<string>\",\n \"productId\": \"pro_abc123\",\n \"lineItems\": [\n {\n \"productId\": \"pro_abc123\",\n \"quantity\": 1,\n \"adjustable\": true,\n \"min\": 499,\n \"max\": 500\n }\n ],\n \"priceCents\": \"1999\",\n \"currency\": \"<string>\",\n \"displayName\": \"<string>\",\n \"displayDescription\": \"<string>\",\n \"customer\": {\n \"id\": \"cus_abc123\",\n \"email\": \"jsmith@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\n },\n \"discountCode\": \"<string>\",\n \"savePaymentMethod\": false,\n \"metadata\": {},\n \"customFields\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {\n \"regex\": \"<string>\",\n \"errorMessage\": \"<string>\"\n },\n \"defaultValue\": \"<string>\"\n }\n ],\n \"expiresIn\": 302430\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beta.suby.fi/v3/checkout/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Suby-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"successUrl\": \"<string>\",\n \"cancelUrl\": \"<string>\",\n \"productId\": \"pro_abc123\",\n \"lineItems\": [\n {\n \"productId\": \"pro_abc123\",\n \"quantity\": 1,\n \"adjustable\": true,\n \"min\": 499,\n \"max\": 500\n }\n ],\n \"priceCents\": \"1999\",\n \"currency\": \"<string>\",\n \"displayName\": \"<string>\",\n \"displayDescription\": \"<string>\",\n \"customer\": {\n \"id\": \"cus_abc123\",\n \"email\": \"jsmith@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\n },\n \"discountCode\": \"<string>\",\n \"savePaymentMethod\": false,\n \"metadata\": {},\n \"customFields\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"placeholder\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {\n \"regex\": \"<string>\",\n \"errorMessage\": \"<string>\"\n },\n \"defaultValue\": \"<string>\"\n }\n ],\n \"expiresIn\": 302430\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "cs_abc123",
"organizationId": "<string>",
"mode": "payment",
"productId": "<string>",
"lineItems": [
{
"productId": "<string>",
"quantity": 123,
"adjustable": true,
"min": 123,
"max": 123
}
],
"amount": 123,
"currency": "<string>",
"displayName": "<string>",
"taxBehavior": "inclusive",
"allowPromo": true,
"customerId": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerLastName": "<string>",
"successUrl": "<string>",
"cancelUrl": "<string>",
"discountCode": "<string>",
"metadata": {},
"customFields": [
{
"key": "<string>",
"label": "<string>",
"type": "input",
"required": true,
"placeholder": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>"
}
],
"validation": {
"regex": "<string>",
"errorMessage": "<string>"
},
"defaultValue": "<string>"
}
],
"status": "OPEN",
"token": "cs_abc123.eyJpZCI6….Kx9f…",
"url": "<string>",
"expiresAt": 123,
"createdAt": 123
},
"message": "<string>"
}{
"success": false,
"error": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}{
"success": false,
"error": "NOT_FOUND",
"message": "Resource not found",
"data": "<unknown>"
}Authorizations
Secret API key. sk_live_… (production) or sk_sandbox_… (sandbox).
Headers
Optional key (≤255 chars, e.g. a UUID v4) making this POST safe to retry · the response is cached 24h and a retry with the SAME key replays it instead of re-executing. The same key with a different body → 422 IDEMPOTENCY_KEY_CONFLICT; a retry while the first is in flight → 409.
255"5f3b9c2e-1a4d-4f2b-9c31-7e2a1b6d8c04"
Body
mode=payment takes exactly ONE pricing intent · productId, lineItems (no recurring product in a basket) or priceCents + currency. mode=subscription takes productId alone. mode=setup takes none and rejects lineItems, priceCents, currency, discountCode and taxBehavior · its productId names, it does not price.
payment one-time charge · subscription opens a subscription and bills cycle 1 · setup stores a card without charging.
payment, subscription, setup Redirect after a successful payment.
Redirect if the payer cancels.
Pricing intent A · a single product. Exclusive with lineItems / priceCents. On mode=setup it names rather than prices.
"pro_abc123"
Pricing intent B · 1–20 product lines charged as one Payment. Exclusive with productId / priceCents.
1 - 20 elementsShow child attributes
Show child attributes
Pricing intent C · ad-hoc amount in minor units, string of digits. Requires currency. Exclusive with productId / lineItems.
^[1-9]\\d*$"1999"
ISO 4217. Required with priceCents.
^[A-Z]{3}$Label on the hosted page + Payment snapshot. Defaults to the product's (or the payment link's).
200Copy under the label. Same fallback as displayName.
500MoR VAT · exclusive adds VAT on top, inclusive extracts it. Signed into the session. Defaults to the product's; with lineItems or a bare priceCents, to exclusive · a basket consults none of its lines, so a bundle of TTC prices must say inclusive. Inert on crypto.
inclusive, exclusive Optional · the hosted page collects the identity otherwise. id binds the session to a known customer, email only pre-fills.
Show child attributes
Show child attributes
Pre-apply a promo code. Validated here and again at pay · an unknown, deactivated, expired, exhausted, wrong-currency or non-applicable code is rejected 422 DISCOUNT_CODE_* rather than signed into the session and silently dropped at payment time.
40Store the card once the charge captures, for later off-session debits. mode=payment only · a setup session does this by definition.
Key-value pairs. ≤50 keys, keys ≤40 chars, values are
strings ≤500 chars (or null to clear). Nested structures must be
JSON-stringified into a single string value.
Show child attributes
Show child attributes
Extra fields collected on the hosted checkout page (max 10).
10Show child attributes
Show child attributes
Session TTL in seconds (default 24h, max 7d).
60 <= x <= 604800Was this page helpful?

