Skip to Content

Capture Payment

POST/payments/:paymentId/capture

Description

Capture an authorized payment transferring funds to your settlement address. This endpoint is only available for payments created with payment_method: "two_step".

Requires a signed request to authorize the fund movement.

🔐

Your signature is verified before the capture executes. Use signCapture() from the @exodus/checkout-signer SDK.

Headers

HeaderDescriptionRequired
AuthorizationBearer token with your API keyyes
Content-Typeapplication/jsonyes
X-SignatureSignature from signCapture(), signed with your signing key.yes

Path Parameters

NameTypeDescriptionRequired
paymentIdstringThe unique identifier of the payment to capture.yes

Request Body

No request body required. The payment is identified by the :paymentId path parameter.

Example Request

import { signCapture } from '@exodus/checkout-signer'
 
// paymentId: system identifier for the payment (used in the URL path)
const paymentId = 'pay_0987654321fedcba'
// The following values come from the payment.escrow_confirmed webhook:
const onChainId =
  '0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b' // on_chain_id
const depositAddress = '0x5fbdb2315678afecb367f032d93f642f64180aa3' // deposit_address
const chain = 'eip155:1' // detected_chain (CAIP-2)
 
const signature = signCapture({
  chain,
  paymentId: onChainId, // SDK field holds the on-chain id, not the pay_... URL id
  depositAddress,
  mnemonic: process.env.SIGNING_MNEMONIC,
})
 
const response = await fetch(
  `https://checkout-api.exodus-int.com/payments/${paymentId}/capture`,
  {
    method: 'POST',
    headers: {
      Authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxx',
      'Content-Type': 'application/json',
      'X-Signature': signature,
    },
  },
)

Response

SUCCESSFUL CAPTURE
{
  "id": "pay_0987654321fedcba",
  "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
  "status": "settled",
  "tx_hash": "0x8a9c67b2d1e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9"
}

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"
  }
}
🛡️

Captures run a compliance screen before releasing funds. If the screen blocks the payment or the screening provider is temporarily unavailable, the API returns 422 with error.type: "cannot_process".

SCREENING BLOCKED (422)
{
  "error": {
    "type": "cannot_process",
    "message": "Payment cannot be processed",
    "code": "flagged",
    "data": { "payment_id": "pay_0987654321fedcba" }
  }
}

error.code is flagged when the payment is permanently blocked, or screening_pending when the screening provider is temporarily unavailable (retry later).

Start building

XO

Request Demo

Schedule a call with our team

Select a product
Arrow right

Start building
Grateful

Contact Us

We're here to help