Payments
API ReferencePaymentsCapture
Capture Payment
Captures funds on a previously authorized payment. Use this when the payment was created with capture_method: "manual" (or manual_multiple) and you are ready to settle.
POST /payments/:payment_id/capture
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_id | string | Yes | The ID of the authorized payment to capture. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount_to_capture | integer | No | Amount to capture in the lowest currency denomination. Must be less than or equal to the payment's amount_capturable. Defaults to the full authorized amount when omitted. |
statement_descriptor_prefix | string | No | Prefix prepended to the customer's card statement (overrides the default merchant prefix). |
statement_descriptor_suffix | string | No | Suffix appended to the prefix on the customer's card statement. Combined length should not exceed 22 characters. |
Request Example
curl -X POST 'https://api.v2.paychtec.com/payments/pay_1234567890abcdef/capture' \ -H "Content-Type: application/json" \ -H "api-key: snd_YOUR_API_KEY" \ -d '{ "amount_to_capture": 6540, "statement_descriptor_suffix": "Order123"}'Response
{
"payment_id": "pay_1234567890abcdef",
"status": "succeeded",
"amount": 6540,
"amount_received": 6540,
"amount_capturable": 0,
"currency": "USD",
"capture_method": "manual",
"captured_at": "2024-01-22T14:00:00Z"
}Errors
| Status | When |
|---|---|
400 | amount_to_capture is greater than amount_capturable, or the payment is not in a capturable state. |
404 | Payment id does not exist. |
409 | Payment is already fully captured or has been cancelled. |