Skip to main content
POST
/
proxy
Execute x402 payment-gated API call
curl --request POST \
  --url https://api.httpayer.com/proxy \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "api_url": "https://www.x402.org/protected",
  "method": "GET",
  "payload": {
    "city": "San Francisco"
  },
  "data": {},
  "params": {
    "limit": "10",
    "offset": "0"
  },
  "headers": {
    "Accept": "application/json"
  },
  "timeout": 30
}
'
{}

Authorizations

x-api-key
string
header
required

API key for authentication

Headers

X-TIMEOUT
number

Client timeout in milliseconds (max 120000ms / 2 minutes)

Body

application/json
api_url
string
required

Target API URL to call via proxy

Example:

"https://www.x402.org/protected"

method
enum<string>
required

HTTP method for target API

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

"GET"

payload
object

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

Example:
{ "city": "San Francisco" }
data
object

Alias for payload (either payload or data can be used)

params
object

Query parameters to send to target API

Example:
{ "limit": "10", "offset": "0" }
headers
object

Custom headers to send to target API

Example:
{ "Accept": "application/json" }
timeout
number

Request timeout in seconds (converted to milliseconds)

Example:

30

Response

Target API request successful

Response from target API (pass-through)