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",
"json": {},
"data": {},
"body": "<string>",
"payload": {},
"params": {},
"headers": {
"X-API-KEY": "your-target-api-key",
"Authorization": "Bearer token123"
},
"auth": {
"username": "<string>",
"password": "<string>"
},
"cookies": {
"session": "abc123"
},
"network": "base"
}
'import requests
url = "https://api.httpayer.com/relay/sim"
payload = {
"api_url": "https://demo.httpayer.com/base-weather",
"method": "GET",
"json": {},
"data": {},
"body": "<string>",
"payload": {},
"params": {},
"headers": {
"X-API-KEY": "your-target-api-key",
"Authorization": "Bearer token123"
},
"auth": {
"username": "<string>",
"password": "<string>"
},
"cookies": { "session": "abc123" },
"network": "base"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
api_url: 'https://demo.httpayer.com/base-weather',
method: 'GET',
json: {},
data: {},
body: JSON.stringify('<string>'),
payload: {},
params: {},
headers: {'X-API-KEY': 'your-target-api-key', Authorization: 'Bearer token123'},
auth: {username: '<string>', password: '<string>'},
cookies: {session: 'abc123'},
network: 'base'
})
};
fetch('https://api.httpayer.com/relay/sim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.httpayer.com/relay/sim",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'api_url' => 'https://demo.httpayer.com/base-weather',
'method' => 'GET',
'json' => [
],
'data' => [
],
'body' => '<string>',
'payload' => [
],
'params' => [
],
'headers' => [
'X-API-KEY' => 'your-target-api-key',
'Authorization' => 'Bearer token123'
],
'auth' => [
'username' => '<string>',
'password' => '<string>'
],
'cookies' => [
'session' => 'abc123'
],
'network' => 'base'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.httpayer.com/relay/sim"
payload := strings.NewReader("{\n \"api_url\": \"https://demo.httpayer.com/base-weather\",\n \"method\": \"GET\",\n \"json\": {},\n \"data\": {},\n \"body\": \"<string>\",\n \"payload\": {},\n \"params\": {},\n \"headers\": {\n \"X-API-KEY\": \"your-target-api-key\",\n \"Authorization\": \"Bearer token123\"\n },\n \"auth\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"cookies\": {\n \"session\": \"abc123\"\n },\n \"network\": \"base\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.httpayer.com/relay/sim")
.header("Content-Type", "application/json")
.body("{\n \"api_url\": \"https://demo.httpayer.com/base-weather\",\n \"method\": \"GET\",\n \"json\": {},\n \"data\": {},\n \"body\": \"<string>\",\n \"payload\": {},\n \"params\": {},\n \"headers\": {\n \"X-API-KEY\": \"your-target-api-key\",\n \"Authorization\": \"Bearer token123\"\n },\n \"auth\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"cookies\": {\n \"session\": \"abc123\"\n },\n \"network\": \"base\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.httpayer.com/relay/sim")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_url\": \"https://demo.httpayer.com/base-weather\",\n \"method\": \"GET\",\n \"json\": {},\n \"data\": {},\n \"body\": \"<string>\",\n \"payload\": {},\n \"params\": {},\n \"headers\": {\n \"X-API-KEY\": \"your-target-api-key\",\n \"Authorization\": \"Bearer token123\"\n },\n \"auth\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"cookies\": {\n \"session\": \"abc123\"\n },\n \"network\": \"base\"\n}"
response = http.request(request)
puts response.read_body{
"requiresPayment": true,
"targetPaymentRequirements": {
"scheme": "exact",
"network": "base",
"payTo": "<string>",
"asset": "<string>",
"maxAmountRequired": "<string>",
"resource": "<string>",
"description": "<string>",
"mimeType": "application/json",
"maxTimeoutSeconds": 180
},
"relayFeeBreakdown": {
"targetAmount": 0.01,
"relayFee": 0.0003,
"totalAmount": 0.0103,
"relayFeePercentage": 3,
"relayFeeMinUSDC": 0.002,
"feeModel": "3% with $0.002 minimum"
},
"message": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Simulate relay payment
Dry-run simulation that returns relay payment requirements including fees without executing payment.
Fee Model:
- Flat 3%
- This ensures gas costs are covered while remaining competitive with Web2 payment processors
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",
"json": {},
"data": {},
"body": "<string>",
"payload": {},
"params": {},
"headers": {
"X-API-KEY": "your-target-api-key",
"Authorization": "Bearer token123"
},
"auth": {
"username": "<string>",
"password": "<string>"
},
"cookies": {
"session": "abc123"
},
"network": "base"
}
'import requests
url = "https://api.httpayer.com/relay/sim"
payload = {
"api_url": "https://demo.httpayer.com/base-weather",
"method": "GET",
"json": {},
"data": {},
"body": "<string>",
"payload": {},
"params": {},
"headers": {
"X-API-KEY": "your-target-api-key",
"Authorization": "Bearer token123"
},
"auth": {
"username": "<string>",
"password": "<string>"
},
"cookies": { "session": "abc123" },
"network": "base"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
api_url: 'https://demo.httpayer.com/base-weather',
method: 'GET',
json: {},
data: {},
body: JSON.stringify('<string>'),
payload: {},
params: {},
headers: {'X-API-KEY': 'your-target-api-key', Authorization: 'Bearer token123'},
auth: {username: '<string>', password: '<string>'},
cookies: {session: 'abc123'},
network: 'base'
})
};
fetch('https://api.httpayer.com/relay/sim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.httpayer.com/relay/sim",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'api_url' => 'https://demo.httpayer.com/base-weather',
'method' => 'GET',
'json' => [
],
'data' => [
],
'body' => '<string>',
'payload' => [
],
'params' => [
],
'headers' => [
'X-API-KEY' => 'your-target-api-key',
'Authorization' => 'Bearer token123'
],
'auth' => [
'username' => '<string>',
'password' => '<string>'
],
'cookies' => [
'session' => 'abc123'
],
'network' => 'base'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.httpayer.com/relay/sim"
payload := strings.NewReader("{\n \"api_url\": \"https://demo.httpayer.com/base-weather\",\n \"method\": \"GET\",\n \"json\": {},\n \"data\": {},\n \"body\": \"<string>\",\n \"payload\": {},\n \"params\": {},\n \"headers\": {\n \"X-API-KEY\": \"your-target-api-key\",\n \"Authorization\": \"Bearer token123\"\n },\n \"auth\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"cookies\": {\n \"session\": \"abc123\"\n },\n \"network\": \"base\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.httpayer.com/relay/sim")
.header("Content-Type", "application/json")
.body("{\n \"api_url\": \"https://demo.httpayer.com/base-weather\",\n \"method\": \"GET\",\n \"json\": {},\n \"data\": {},\n \"body\": \"<string>\",\n \"payload\": {},\n \"params\": {},\n \"headers\": {\n \"X-API-KEY\": \"your-target-api-key\",\n \"Authorization\": \"Bearer token123\"\n },\n \"auth\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"cookies\": {\n \"session\": \"abc123\"\n },\n \"network\": \"base\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.httpayer.com/relay/sim")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_url\": \"https://demo.httpayer.com/base-weather\",\n \"method\": \"GET\",\n \"json\": {},\n \"data\": {},\n \"body\": \"<string>\",\n \"payload\": {},\n \"params\": {},\n \"headers\": {\n \"X-API-KEY\": \"your-target-api-key\",\n \"Authorization\": \"Bearer token123\"\n },\n \"auth\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"cookies\": {\n \"session\": \"abc123\"\n },\n \"network\": \"base\"\n}"
response = http.request(request)
puts response.read_body{
"requiresPayment": true,
"targetPaymentRequirements": {
"scheme": "exact",
"network": "base",
"payTo": "<string>",
"asset": "<string>",
"maxAmountRequired": "<string>",
"resource": "<string>",
"description": "<string>",
"mimeType": "application/json",
"maxTimeoutSeconds": 180
},
"relayFeeBreakdown": {
"targetAmount": 0.01,
"relayFee": 0.0003,
"totalAmount": 0.0103,
"relayFeePercentage": 3,
"relayFeeMinUSDC": 0.002,
"feeModel": "3% with $0.002 minimum"
},
"message": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}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=(...)).
Show child attributes
Show child attributes
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"

