Skip to main content
POST
Execute cross-chain relay payment

Headers

X-PAYMENT
string

x402 payment header (include on second call after getting payment instructions)

X-TIMEOUT
number

Client timeout in milliseconds

Query Parameters

format
enum<string>
default:text

Response mode. When set to "json", wraps the proxied response as JSON; otherwise returns the raw proxied response as text.

Available options:
json,
text

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"

json
object

JSON body — serialized with Content-Type: application/json. Mirrors Python requests(json=...).

data

Form-encoded body (object) or raw string body (string). Mirrors Python requests(data=...).

body
string

Pre-serialized body string passed through unchanged — Content-Type is NOT set automatically. If you pass an object it will be JSON-stringified, but you must set Content-Type: application/json via headers yourself. Use json instead for automatic Content-Type handling.

payload
object

Deprecated alias for json. Use json instead.

params
object

Query parameters appended to the target URL

headers
object

Custom headers forwarded to the target API

Example:
auth
object

Basic auth shorthand — converted to Authorization: Basic . Mirrors Python requests(auth=(...)).

cookies
object

Cookie shorthand — merged into the Cookie header. Mirrors Python requests(cookies={...}).

Example:
network
enum<string>

Blockchain network to use for payment

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

"base"

Response

Relay payment successful. Response headers (included only when applicable):

  • X-Client-Payment: Transaction hash of the user's payment to HTTPayer after settlement (e.g., 0x123...)
  • X-HTTPayer-Webhook: Webhook ID to track async operation status (payment verification or refund)
  • X-Payment-Response: Details of HTTPayer's payment to the target API (v1, base64-encoded JSON)

Response from target API