Fetches an action

Builds the actions the wallet must complete to pay with the selected payment option (optionId). Select each action by its type, not by its position in actions.

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

Authorization

headerApi-Key<token>

Path Parameters

id*string

Payment ID

Header Parameters

Api-Key?string|null
App-Id?string|null
Client-Id?string|null
WCP-Version?string|null
Sdk-Name?string|null
Sdk-Version?string|null
Sdk-Platform?string|null

Request Body

application/json
  1. body
collectedData?||null
data*string

Extra build payload

optionId*string

ID of the option to build an action for

Response Body

Action built successfully

application/json
  1. response
actions*array<||>

What the wallet has to do, never empty. Select an action by its type, not by its position: a push option returns a transfer alongside its walletRpc transaction on EVM, and on Solana returns the transfer alone, because a Solana transaction cannot be built without knowing the payer.

curl -X POST 'https://api.pay.walletconnect.com/v1/gateway/payment/pay_7fa2ecc101ARZ3NDEKTSV4RRFFQ69G5FAV/fetch' \  -H 'Content-Type: application/json' \  -d '{  "data": "string",  "optionId": "string"}'
{  "actions": [    {      "data": {        "chain_id": "string",        "method": "string",        "params": [          null        ]      },      "type": "walletRpc"    }  ]}