POST /payments/capture-payment

Changed on

Captures a payment that was previously authorized by creating an intent with manualCapture set to true.

Request

  • Base URL
    https://api.xpaycheckout.com
  • URL
    https://api.xpaycheckout.com/payments/capture-payment
  • Auth
    HTTP basic

Headers

Idempotency-Keystring

A unique key for making the request idempotent. Must match pattern: ^[a-zA-Z0-9\-_:\.]+$. See Idempotent Requests for more details.

Request body

intentIdstring required

Unique identifier of the previously authorized payment intent

Example request

{
  "intentId": "in_fooBOwYsaK50AEfK"
}

Response

Capture Payment response

statusstring

Current status of the payment intent. Refer to payment statuses.

errorCodestring nullable

Machine-readable error code when the capture is unsuccessful. Refer to error codes.

errorMessagestring nullable

Human-readable error message when the capture is unsuccessful.

Example response

{
  "status": "SUCCESS"
}

Changes