Create a payment request
curl --request POST \
--url https://merchant.zahlo.eu/api/v1/payments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amountMinor": 4990,
"currency": "EUR"
}
'import requests
url = "https://merchant.zahlo.eu/api/v1/payments"
payload = {
"amountMinor": 4990,
"currency": "EUR"
}
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({amountMinor: 4990, currency: 'EUR'})
};
fetch('https://merchant.zahlo.eu/api/v1/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "pay_demo_1001",
"amountMinor": 4990,
"currency": "EUR",
"status": "pending",
"reference": "order_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"
}{
"error": "invalid_request",
"message": "amountMinor must be positive",
"requestId": "req_demo_1001"
}Payments
Create a payment request
Create a payment request. Use the response status and request ID to decide whether to retry, reconcile, or ask the customer for action.
POST
/
api
/
v1
/
payments
Create a payment request
curl --request POST \
--url https://merchant.zahlo.eu/api/v1/payments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amountMinor": 4990,
"currency": "EUR"
}
'import requests
url = "https://merchant.zahlo.eu/api/v1/payments"
payload = {
"amountMinor": 4990,
"currency": "EUR"
}
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({amountMinor: 4990, currency: 'EUR'})
};
fetch('https://merchant.zahlo.eu/api/v1/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "pay_demo_1001",
"amountMinor": 4990,
"currency": "EUR",
"status": "pending",
"reference": "order_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"
}{
"error": "invalid_request",
"message": "amountMinor must be positive",
"requestId": "req_demo_1001"
}Authorizations
Server-side merchant API key. Never expose it in browser code.
Headers
Retry-safe key for create operations.
Body
application/json
Amount in the smallest currency unit
Required range:
x >= 1Required string length:
3Eligible method families to consider
Show child attributes
Show child attributes
Response
Payment created
Available options:
created, pending, confirmed, partially_refunded, refunded, cancelled, expired Show child attributes
Show child attributes