> ## Documentation Index
> Fetch the complete documentation index at: https://docs.walletconnect.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetches an action

> This endpoint fetches an action for a payment.



## OpenAPI

````yaml api/2026-02-18.json POST /v1/gateway/payment/{id}/fetch
openapi: 3.1.0
info:
  title: WalletConnect Pay API
  version: '2026-02-18'
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}/fetch:
    post:
      tags:
        - Gateway
      summary: Fetches an action
      description: This endpoint fetches an action for a payment.
      operationId: fetch_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'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchRequest'
        required: true
      responses:
        '200':
          description: Action built successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchResponse'
        '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
    FetchRequest:
      type: object
      required:
        - optionId
        - data
      properties:
        data:
          type: string
          description: Extra build payload
        optionId:
          type: string
          description: ID of the option to build an action for
      example:
        data: ...
        optionId: opt_123
    FetchResponse:
      type: object
      required:
        - actions
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/Action'
      example:
        actions:
          - data:
              chain_id: eip155:8453
              method: eth_signTypedData_v4
              params:
                - '0x0000000000000000000000000000000000000000'
                - >-
                  {"domain":{"name":"USD
                  Coin","version":"2","chainId":"0x2105","verifyingContract":"0x0000000000000000000000000000000000000000"},"types":{"EIP712Domain":[{"type":"string","name":"name"},{"type":"string","name":"version"},{"type":"uint256","name":"chainId"},{"type":"address","name":"verifyingContract"}],"ReceiveWithAuthorization":[{"type":"address","name":"from"},{"type":"address","name":"to"},{"type":"uint256","name":"value"},{"type":"uint256","name":"validAfter"},{"type":"uint256","name":"validBefore"},{"type":"bytes32","name":"nonce"}]},"primaryType":"ReceiveWithAuthorization","message":{"from":"0x0000000000000000000000000000000000000000","nonce":"0x0000000000000000000000000000000000000000000000000000000000000000","to":"0x0000000000000000000000000000000000000000","validAfter":"0x0","validBefore":"0x0","value":"0x0"}}
            type: walletRpc
    ErrorResponse:
      type: object
      description: Standard error response structure for API errors.
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
    Action:
      oneOf:
        - type: object
          description: An action that requires a wallet RPC call to complete
          required:
            - data
            - type
          properties:
            data:
              $ref: '#/components/schemas/WalletRpcAction'
              description: An action that requires a wallet RPC call to complete
            type:
              type: string
              enum:
                - walletRpc
        - type: object
          description: An action that requires building to complete
          required:
            - data
            - type
          properties:
            data:
              $ref: '#/components/schemas/Build'
              description: An action that requires building to complete
            type:
              type: string
              enum:
                - build
      example:
        data:
          chain_id: eip155:8453
          method: eth_signTypedData_v4
          params:
            - '0x0000000000000000000000000000000000000000'
            - >-
              {"domain":{"name":"USD
              Coin","version":"2","chainId":"0x2105","verifyingContract":"0x0000000000000000000000000000000000000000"},"types":{"EIP712Domain":[{"type":"string","name":"name"},{"type":"string","name":"version"},{"type":"uint256","name":"chainId"},{"type":"address","name":"verifyingContract"}],"ReceiveWithAuthorization":[{"type":"address","name":"from"},{"type":"address","name":"to"},{"type":"uint256","name":"value"},{"type":"uint256","name":"validAfter"},{"type":"uint256","name":"validBefore"},{"type":"bytes32","name":"nonce"}]},"primaryType":"ReceiveWithAuthorization","message":{"from":"0x0000000000000000000000000000000000000000","nonce":"0x0000000000000000000000000000000000000000000000000000000000000000","to":"0x0000000000000000000000000000000000000000","validAfter":"0x0","validBefore":"0x0","value":"0x0"}}
        type: walletRpc
    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
    WalletRpcAction:
      type: object
      required:
        - chain_id
        - method
        - params
      properties:
        chain_id:
          type: string
        method:
          type: string
        params:
          type: array
          items: {}
      example:
        chain_id: eip155:8453
        method: eth_signTypedData_v4
        params:
          - '0x0000000000000000000000000000000000000000'
          - >-
            {"domain":{"name":"USD
            Coin","version":"2","chainId":"0x2105","verifyingContract":"0x0000000000000000000000000000000000000000"},"types":{"EIP712Domain":[{"type":"string","name":"name"},{"type":"string","name":"version"},{"type":"uint256","name":"chainId"},{"type":"address","name":"verifyingContract"}],"ReceiveWithAuthorization":[{"type":"address","name":"from"},{"type":"address","name":"to"},{"type":"uint256","name":"value"},{"type":"uint256","name":"validAfter"},{"type":"uint256","name":"validBefore"},{"type":"bytes32","name":"nonce"}]},"primaryType":"ReceiveWithAuthorization","message":{"from":"0x0000000000000000000000000000000000000000","nonce":"0x0000000000000000000000000000000000000000000000000000000000000000","to":"0x0000000000000000000000000000000000000000","validAfter":"0x0","validBefore":"0x0","value":"0x0"}}
    Build:
      type: object
      required:
        - data
      properties:
        data:
          type: string
      example:
        data: ...
  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.

````