Execute x402 payment-gated API call
HTTPayer proxy service for x402 payment-gated API calls.
Flow:
- Proxy detects 402 Payment Required from target API
- HTTPayer wallet executes payment to target API
- Proxy retries request with payment proof
- Returns target API response to client
Error Handling:
- 502 Bad Gateway: Target API errors (unreachable, malformed, 5xx)
- 500 Internal Server Error: Proxy configuration errors
- 4xx Pass-through: Client errors from target API
- Timeout detection with configurable limits
Authorizations
API key for authentication
Headers
Client timeout in milliseconds (max 120000ms / 2 minutes)
Body
Target API URL to call via proxy
"https://www.x402.org/protected"
HTTP method for target API
GET, POST, PUT, DELETE, PATCH "GET"
JSON body ā serialized and sent with Content-Type: application/json. Mirrors Python requests(json=...) / fetch(body: JSON.stringify(...)).
Form-encoded body when an object, raw string body when a string. Mirrors Python requests(data=...). Object ā Content-Type: application/x-www-form-urlencoded. String ā passed through as-is; set Content-Type via headers.
Pre-serialized body string ā passed through unchanged, without setting Content-Type. If you pass an object it will be JSON-stringified, but you must manually set Content-Type: application/json via headers. 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
Basic auth shorthand ā converted to Authorization: Basic . Mirrors Python requests(auth=("user", "pass")).
Cookie shorthand ā merged into the Cookie header. Mirrors Python requests(cookies={...}).
Per-request timeout in seconds (server default applies if omitted; also accepts X-TIMEOUT header in ms)
30
Response
Target API request successful
Response from target API (pass-through)

