Capture an authorized payment intent
curl --request POST \
--url https://merchant-demo.zahlo.eu/api/v1/payment-intents/{id}/capture \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://merchant-demo.zahlo.eu/api/v1/payment-intents/{id}/capture"
payload = {}
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({})
};
fetch('https://merchant-demo.zahlo.eu/api/v1/payment-intents/{id}/capture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "pi_demo_1001",
"amountMinor": 4990,
"currency": "EUR",
"status": "requires_action",
"captureMethod": "automatic",
"paymentId": "pay_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"
}{
"error": "invalid_request",
"message": "amountMinor must be positive",
"requestId": "req_demo_1001"
}Payments
Capture an authorized payment intent
Capture an authorized payment intent. Use the response status and request ID to decide whether to retry, reconcile, or ask the customer for action.
POST
/
api
/
v1
/
payment-intents
/
{id}
/
capture
Capture an authorized payment intent
curl --request POST \
--url https://merchant-demo.zahlo.eu/api/v1/payment-intents/{id}/capture \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://merchant-demo.zahlo.eu/api/v1/payment-intents/{id}/capture"
payload = {}
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({})
};
fetch('https://merchant-demo.zahlo.eu/api/v1/payment-intents/{id}/capture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "pi_demo_1001",
"amountMinor": 4990,
"currency": "EUR",
"status": "requires_action",
"captureMethod": "automatic",
"paymentId": "pay_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"
}{
"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.
Path Parameters
The resource identifier returned by the merchant API.
Body
application/json
Amount to capture in minor units; omit to capture the full authorized amount.
Required range:
x >= 1Response
Payment intent captured
Available options:
requires_payment_method, requires_action, requires_capture, processing, succeeded, cancelled Available options:
automatic, manual Required range:
x >= 0Show child attributes
Show child attributes