v1

latestOpenAPI 3.1.02026-07-262343124.1 KB
Gateway

Confirm a payment

This endpoint confirms a payment and submits it to the blockchain for processing.

post/v1/gateway/payment/{id}/confirm

Path parameters

idstring required

Payment ID

Example:pay_7fa2ecc101ARZ3NDEKTSV4RRFFQ69G5FAV

Payment ID

Query parameters

maxPollMsinteger nullable

Maximum time to long-poll for payment status, in milliseconds.

Headers

Api-Keystring nullable
App-Idstring nullable
Client-Idstring nullable
WCP-Versionstring nullable
Sdk-Namestring nullable
Sdk-Versionstring nullable
Sdk-Platformstring nullable

Request body

optionIdstring required

ID of the option to confirm

Example request

{
  "collectedData": {
    "fields": [
      {
        "id": "fullName",
        "value": "John Smith"
      },
      {
        "id": "dob",
        "value": "1990-01-01"
      },
      {
        "id": "tosConfirmed",
        "value": "true"
      },
      {
        "id": "pobCountry",
        "value": "US"
      },
      {
        "id": "pobAddress",
        "value": "New York, NY"
      }
    ]
  },
  "excludeFromRelayer": null,
  "optionId": "opt_123",
  "results": [
    {
      "data": [
        "0x123"
      ],
      "type": "walletRpc"
    }
  ]
}

Response

Payment confirmed successfully

isFinalboolean required

True if the payment is in a final state and no longer requires polling

pollInMsinteger nullable

Time to poll for payment status, in milliseconds. Not present if the payment is in a final state.

status'requires_action' | 'processing' | 'succeeded' | 'failed' | 'expired' | 'cancelled' required

Payment status representing the lifecycle of a payment.

Payments progress through these states from creation to terminal status. Some states are specific to the payment source (pull vs push).

Example response

{
  "info": null,
  "isFinal": true,
  "pollInMs": null,
  "status": "succeeded"
}