Execute cross-chain relay payment
HTTPayer relay service for x402 cross-chain payments.
Flow:
- First call (no X-Payment header): Returns 402 with payment instructions
- Second call (with X-Payment header): Executes relay payment flow
Supports:
- Cross-chain payments (EVM ↔ Solana)
- Same-chain payments (EVM → EVM, Solana → Solana)
- Automatic network selection based on target API (mainnet/testnet)
Fee Structure:
- HTTPayer charges a flat 3% relay fee on top of the target API’s requested payment amount.
- Example: For a $0.10 target payment, fee = $0.003, total = $0.103
- Daily limits: $100 per wallet, $1000 system-wide
Documentation Index
Fetch the complete documentation index at: https://docs.httpayer.com/llms.txt
Use this file to discover all available pages before exploring further.
Headers
x402 payment header (include on second call after getting payment instructions)
Client timeout in milliseconds
Query Parameters
Response mode. When set to "json", wraps the proxied response as JSON; otherwise returns the raw proxied response as text.
json, text Body
The target API URL to call via the relay
"https://demo.httpayer.com/base-weather"
HTTP method for the target API
GET, POST, PUT, DELETE, PATCH "GET"
JSON body — serialized with Content-Type: application/json. Mirrors Python requests(json=...).
Form-encoded body (object) or raw string body (string). Mirrors Python requests(data=...).
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.
Deprecated alias for json. Use json instead.
Query parameters appended to the target URL
Custom headers forwarded to the target API
{
"X-API-KEY": "your-target-api-key",
"Authorization": "Bearer token123"
}Basic auth shorthand — converted to Authorization: Basic . Mirrors Python requests(auth=(...)).
Cookie shorthand — merged into the Cookie header. Mirrors Python requests(cookies={...}).
{ "session": "abc123" }Blockchain network to use for payment
base, base-sepolia, skale-base, skale-base-sepolia, solana, solana-mainnet-beta, solana-devnet "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

