Capture Payment
POST/payments/:paymentId/captureDescription
Capture an authorized payment, transferring funds to your settlement wallet. This endpoint is only available for payments created with payment_mode: "two_step".
Requires a signed request to authorize the fund movement.
🔐
The API validates the request fields and verifies your signature before executing the capture.
Headers
| Header | Description | Required |
|---|---|---|
| Authorization | Bearer token with your API key | yes |
| Content-Type | application/json | yes |
| X-Signature | ECDSA signature of the JSON-serialized request body, signed with your signing key. | yes |
Path Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| paymentId | string | The unique identifier of the payment to capture. | yes |
Request Body
The request body is signed with your signing key and the signature is sent in the X-Signature header.
| Name | Type | Description | Required |
|---|---|---|---|
| action | string | Must be "capture". | yes |
| payment_id | string | The ID of the payment to capture. Must match the path parameter. | yes |
Example Request
const body = {
action: 'capture',
payment_id: 'pay_0987654321fedcba',
};
const signature = signRequest(body, process.env.SIGNING_PRIVATE_KEY);
const response = await fetch(
'https://checkout.exodus.com/payments/pay_0987654321fedcba/capture',
{
method: 'POST',
headers: {
Authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxx',
'Content-Type': 'application/json',
'X-Signature': signature,
},
body: JSON.stringify(body),
}
);Response
SUCCESSFUL CAPTURE
{
"id": "pay_0987654321fedcba",
"object": "payment",
"amount": 5000,
"currency": "USD",
"status": "captured",
"payment_mode": "two_step",
"checkout_id": "chk_1234567890abcdef",
"stablecoin": "USDC",
"network": "ethereum",
"tx_hash": "0x8a9c67b2d1e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9",
"created_at": "2024-01-15T12:30:00Z",
"captured_at": "2024-01-15T14:00:00Z"
}Error Responses
INVALID PAYMENT MODE
{
"error": {
"type": "invalid_request",
"message": "Capture is only available for two-step payments"
}
}INVALID SIGNATURE
{
"error": {
"type": "authorization_error",
"message": "Invalid signature"
}
}ALREADY CAPTURED
{
"error": {
"type": "invalid_request",
"message": "Payment has already been fully captured"
}
}