Create a customer self-service portal session
curl --request POST \
--url https://merchant.zahlo.eu/api/v1/customer-portal/sessions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"customerId": "cus_demo_1001",
"returnUrl": "https://app.example.com/settings/billing"
}
'import requests
url = "https://merchant.zahlo.eu/api/v1/customer-portal/sessions"
payload = {
"customerId": "cus_demo_1001",
"returnUrl": "https://app.example.com/settings/billing"
}
headers = {
"x-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-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: 'cus_demo_1001',
returnUrl: 'https://app.example.com/settings/billing'
})
};
fetch('https://merchant.zahlo.eu/api/v1/customer-portal/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "cps_demo_1001",
"url": "https://portal.zahlo.eu/cps_demo_1001",
"expiresAt": "2026-09-02T12:30:00Z"
}{
"error": "invalid_request",
"message": "amountMinor must be positive",
"requestId": "req_demo_1001"
}{
"error": "invalid_request",
"message": "amountMinor must be positive",
"requestId": "req_demo_1001"
}{
"error": "invalid_request",
"message": "amountMinor must be positive",
"requestId": "req_demo_1001"
}{
"error": "invalid_request",
"message": "amountMinor must be positive",
"requestId": "req_demo_1001"
}Billing
Create a customer self-service portal session
Create a customer self-service portal session. Use the response status and request ID to decide whether to retry, reconcile, or ask the customer for action.
POST
/
api
/
v1
/
customer-portal
/
sessions
Create a customer self-service portal session
curl --request POST \
--url https://merchant.zahlo.eu/api/v1/customer-portal/sessions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"customerId": "cus_demo_1001",
"returnUrl": "https://app.example.com/settings/billing"
}
'import requests
url = "https://merchant.zahlo.eu/api/v1/customer-portal/sessions"
payload = {
"customerId": "cus_demo_1001",
"returnUrl": "https://app.example.com/settings/billing"
}
headers = {
"x-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-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: 'cus_demo_1001',
returnUrl: 'https://app.example.com/settings/billing'
})
};
fetch('https://merchant.zahlo.eu/api/v1/customer-portal/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "cps_demo_1001",
"url": "https://portal.zahlo.eu/cps_demo_1001",
"expiresAt": "2026-09-02T12:30:00Z"
}{
"error": "invalid_request",
"message": "amountMinor must be positive",
"requestId": "req_demo_1001"
}{
"error": "invalid_request",
"message": "amountMinor must be positive",
"requestId": "req_demo_1001"
}{
"error": "invalid_request",
"message": "amountMinor must be positive",
"requestId": "req_demo_1001"
}{
"error": "invalid_request",
"message": "amountMinor must be positive",
"requestId": "req_demo_1001"
}