Skip to main content
POST
/
relay
/
sim
Simulate relay payment
curl --request POST \
  --url https://api.httpayer.com/relay/sim \
  --header 'Content-Type: application/json' \
  --data '
{
  "api_url": "https://demo.httpayer.com/base-weather",
  "method": "GET",
  "payload": {},
  "params": {},
  "headers": {
    "X-API-KEY": "your-target-api-key",
    "Authorization": "Bearer token123"
  },
  "network": "base"
}
'
{
  "requiresPayment": true,
  "targetPaymentRequirements": {
    "scheme": "exact",
    "network": "base",
    "payTo": "<string>",
    "asset": "<string>",
    "maxAmountRequired": "<string>",
    "resource": "<string>",
    "description": "<string>",
    "mimeType": "application/json",
    "maxTimeoutSeconds": 180
  },
  "relayFeeBreakdown": {
    "targetAmount": 123,
    "relayFee": 123,
    "totalAmount": 123,
    "relayFeePercentage": 3,
    "relayFeeMinUSDC": 0.002,
    "feeModel": "3% with $0.002 minimum"
  },
  "message": "<string>"
}

Body

application/json
api_url
string
required

The target API URL to call via the relay

Example:

"https://demo.httpayer.com/base-weather"

method
enum<string>
required

HTTP method for the target API

Available options:
GET,
POST,
PUT,
DELETE,
PATCH
Example:

"GET"

payload
object

Request body to send to the target API (for POST/PUT/PATCH)

params
object

Query parameters to send to the target API

headers
object

Custom headers to send to the target API (e.g., API keys, authorization tokens)

Example:
{
"X-API-KEY": "your-target-api-key",
"Authorization": "Bearer token123"
}
network
enum<string>

Blockchain network to use for payment

Available options:
base,
base-sepolia,
skale-base,
skale-base-sepolia,
solana-mainnet,
solana-devnet
Example:

"base"

Response

Simulation completed successfully

requiresPayment
boolean

Whether the target API requires payment

targetPaymentRequirements
object
relayFeeBreakdown
object
message
string