Create price
curl --request POST \
--url https://merchant.zahlo.eu/api/v1/prices \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"productId": "prod_demo_1001",
"amountMinor": 1900,
"currency": "EUR"
}
'import requests
url = "https://merchant.zahlo.eu/api/v1/prices"
payload = {
"productId": "prod_demo_1001",
"amountMinor": 1900,
"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({productId: 'prod_demo_1001', amountMinor: 1900, currency: 'EUR'})
};
fetch('https://merchant.zahlo.eu/api/v1/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "price_demo_1001",
"productId": "prod_demo_1001",
"amountMinor": 1900,
"currency": "EUR",
"recurring": {
"interval": "month",
"intervalCount": 1
}
}{
"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"
}Catalog
Create price
Create price. Use the response status and request ID to decide whether to retry, reconcile, or ask the customer for action.
POST
/
api
/
v1
/
prices
Create price
curl --request POST \
--url https://merchant.zahlo.eu/api/v1/prices \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"productId": "prod_demo_1001",
"amountMinor": 1900,
"currency": "EUR"
}
'import requests
url = "https://merchant.zahlo.eu/api/v1/prices"
payload = {
"productId": "prod_demo_1001",
"amountMinor": 1900,
"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({productId: 'prod_demo_1001', amountMinor: 1900, currency: 'EUR'})
};
fetch('https://merchant.zahlo.eu/api/v1/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "price_demo_1001",
"productId": "prod_demo_1001",
"amountMinor": 1900,
"currency": "EUR",
"recurring": {
"interval": "month",
"intervalCount": 1
}
}{
"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
Required range:
x >= 1Show child attributes
Show child attributes
Compatibility alias for recurring.interval
Available options:
day, week, month, year Compatibility alias for recurring.intervalCount
Required range:
x >= 1Show child attributes
Show child attributes