> ## Documentation Index
> Fetch the complete documentation index at: https://walletconnect-pay-docs-wcagent-pay-docs-add-sofiusd-usat.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Confirm a payment

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



## OpenAPI

````yaml api/2026-02-19.preview.json POST /v1/gateway/payment/{id}/confirm
openapi: 3.1.0
info:
  title: WalletConnect Pay API
  version: 2026-02-19.preview
servers:
  - url: https://api.pay.walletconnect.com
security:
  - API Key: []
  - ApiKey: []
  - AppId: []
tags:
  - name: Gateway
  - name: Payments
  - name: Refunds
  - name: Merchant Management
  - name: Settlements
  - name: Crypto Settlement
paths:
  /v1/gateway/payment/{id}/confirm:
    post:
      tags:
        - Gateway
      summary: Confirm a payment
      description: >-
        This endpoint confirms a payment and submits it to the blockchain for
        processing.
      operationId: confirm_payment_handler
      parameters:
        - name: Api-Key
          in: header
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: App-Id
          in: header
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: Client-Id
          in: header
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: WCP-Version
          in: header
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: Sdk-Name
          in: header
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: Sdk-Version
          in: header
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: Sdk-Platform
          in: header
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: id
          in: path
          description: Payment ID
          required: true
          schema:
            $ref: '#/components/schemas/PaymentId'
        - name: maxPollMs
          in: query
          description: Maximum time to long-poll for payment status, in milliseconds.
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
            minimum: 0
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmPaymentRequest'
        required: true
      responses:
        '200':
          description: Payment confirmed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmPaymentResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Payment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PaymentId:
      type: string
      description: Payment ID
      examples:
        - pay_7fa2ecc101ARZ3NDEKTSV4RRFFQ69G5FAV
    ConfirmPaymentRequest:
      type: object
      required:
        - optionId
        - results
      properties:
        collectedData:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CollectDataResult'
        optionId:
          type: string
          description: ID of the option to confirm
        results:
          type: array
          items:
            $ref: '#/components/schemas/ConfirmPaymentResult'
      example:
        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
    ConfirmPaymentResponse:
      type: object
      required:
        - status
        - isFinal
      properties:
        info:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/GatewayPaymentInformation'
              description: |-
                Payment information (transaction hash). Present when status is
                Succeeded, null otherwise.
        isFinal:
          type: boolean
          description: >-
            True if the payment is in a final state and no longer requires
            polling
        pollInMs:
          type:
            - integer
            - 'null'
          format: int64
          description: |-
            Time to poll for payment status, in milliseconds. Not present if the
            payment is in a final state.
          minimum: 0
        status:
          $ref: '#/components/schemas/PaymentStatus'
          description: Payment status
      example:
        info: null
        isFinal: true
        pollInMs: null
        status: succeeded
    ErrorResponse:
      type: object
      description: Standard error response structure for API errors.
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
    CollectDataResult:
      type: object
      required:
        - fields
      properties:
        fields:
          type: array
          items:
            $ref: '#/components/schemas/CollectDataFieldResult'
      example:
        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
    ConfirmPaymentResult:
      oneOf:
        - type: object
          required:
            - data
            - type
          properties:
            data:
              type: array
              items: {}
            type:
              type: string
              enum:
                - walletRpc
      example:
        data:
          - '0x123'
        type: walletRpc
    GatewayPaymentInformation:
      type: object
      description: Payment information returned when a gateway payment succeeds.
      required:
        - txId
        - optionAmount
      properties:
        optionAmount:
          $ref: '#/components/schemas/Amount'
          description: Amount paid in token units
        txId:
          type: string
          description: Transaction identifier (hash)
    PaymentStatus:
      type: string
      description: |-
        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).
      enum:
        - requires_action
        - processing
        - succeeded
        - failed
        - expired
        - cancelled
    ErrorCode:
      type: string
      description: |-
        Standard error codes for API responses.

        This prevents typos like "invlaid_params" from reaching production.
      enum:
        - rate_limited
        - invalid_params
        - params_validation
        - payment_not_found
        - idempotency_conflict
        - internal_error
        - invalid_api_key
        - unauthorized
        - forbidden
        - invalid_state
        - payment_expired
        - quote_expired
        - missing_api_key
        - missing_merchant_api_key
        - missing_merchant_id
        - header_not_ascii
        - not_sandbox_api_key
        - merchant_not_found
        - merchant_exists
        - api_key_not_found
        - partner_not_found
        - customer_not_found
        - wallet_not_found
        - executor_not_found
        - missing_app_id
        - missing_client_id
        - invalid_app_id
        - conflicting_auth_headers
        - missing_auth_headers
        - invalid_api_version
        - unknown_api_version
        - api_version_downgrade
        - sanctioned_user
        - payment_not_succeeded
        - already_refunded
    CollectDataFieldResult:
      type: object
      required:
        - id
        - value
      properties:
        id:
          type: string
        value:
          type: string
      example:
        id: fullName
        value: John
    Amount:
      type: object
      required:
        - unit
        - value
        - display
      properties:
        display:
          $ref: '#/components/schemas/AmountDisplay'
          description: Display information for the amount
        unit:
          type: string
          description: Currency unit, prefixed with either "iso4217/" or "caip19/"
          example: iso4217/USD
        value:
          type: string
          description: Amount value, in the currency unit's minor units
      example:
        display:
          assetName: USD Coin
          assetSymbol: USDC
          decimals: 6
          iconUrl: https://assets.walletconnect.com/usdc.png
          networkIconUrl: https://assets.walletconnect.com/base.png
          networkName: Base
        unit: caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000
        value: '1000000'
    AmountDisplay:
      type: object
      required:
        - assetSymbol
        - assetName
        - decimals
      properties:
        assetName:
          type: string
          description: Full name of the asset
        assetSymbol:
          type: string
          description: Ticker/symbol of the asset
        decimals:
          type: integer
          format: int32
          description: Number of minor decimals of the asset
          minimum: 0
        iconUrl:
          type:
            - string
            - 'null'
          description: URL of the icon of the asset (if token)
        networkIconUrl:
          type:
            - string
            - 'null'
          description: URL of the icon of the network (if token)
        networkName:
          type:
            - string
            - 'null'
          description: Name of the network of the asset (if token)
      example:
        assetName: USD Coin
        assetSymbol: USDC
        decimals: 6
        iconUrl: https://assets.walletconnect.com/usdc.png
        networkIconUrl: https://assets.walletconnect.com/base.png
        networkName: Base
  securitySchemes:
    API Key:
      type: apiKey
      in: header
      name: Api-Key
    ApiKey:
      type: apiKey
      in: header
      name: Api-Key
      description: Private API key for wallet authentication
    AppId:
      type: apiKey
      in: header
      name: App-Id
      description: >-
        Public App ID for wallet authentication. When using this auth mode, the
        Client-Id header is also required.

````