---
title: "Fetches an action"
method: POST
path: "/v1/gateway/payment/{id}/fetch"
tags: ["Gateway"]
---

# Fetches an action

`POST /v1/gateway/payment/{id}/fetch`

This endpoint fetches an action for a payment.

## Path parameters

- `id` string, required — Payment ID

## Headers

- `Api-Key` string, nullable
- `App-Id` string, nullable
- `Client-Id` string, nullable
- `WCP-Version` string, nullable
- `Sdk-Name` string, nullable
- `Sdk-Version` string, nullable
- `Sdk-Platform` string, nullable

## Request body

- FetchRequest
  - `data` string, required — Extra build payload
  - `optionId` string, required — ID of the option to build an action for

## Response `200`

Action built successfully

- FetchResponse
  - `actions` Action[], required
    - union
      - object — An action that requires a wallet RPC call to complete
        - `data` WalletRpcAction, required
          - `chain_id` string, required
          - `method` string, required
          - `params` unknown[], required
            - unknown
        - `type` 'walletRpc', required
      - object — An action that requires building to complete
        - `data` Build, required
          - `data` string, required
        - `type` 'build', required

## Other responses

- `400` — Invalid request
- `401` — Invalid API key
- `404` — Payment not found
- `500` — Internal error

---

[API](https://skmtc.net/walletconnect/apis/walletconnect-pay-api.md) · [All operations](https://skmtc.net/walletconnect/apis/walletconnect-pay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/walletconnect/walletconnect-pay-api/versions/8e5708191dde/schema)
