Buy a 30-day plan with x402
curl --request POST \
--url https://api.ironflow.sh/x402/v1/plans/{plan}/buy \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]"
}
'import requests
url = "https://api.ironflow.sh/x402/v1/plans/{plan}/buy"
payload = { "email": "[email protected]" }
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({email: '[email protected]'})
};
fetch('https://api.ironflow.sh/x402/v1/plans/{plan}/buy', 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.ironflow.sh/x402/v1/plans/{plan}/buy",
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([
'email' => '[email protected]'
]),
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.ironflow.sh/x402/v1/plans/{plan}/buy"
payload := strings.NewReader("{\n \"email\": \"[email protected]\"\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.ironflow.sh/x402/v1/plans/{plan}/buy")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ironflow.sh/x402/v1/plans/{plan}/buy")
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 \"email\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_body{
"status": "paid",
"plan": "<string>",
"plan_name": "<string>",
"tier": "<string>",
"days": 123,
"email": "<string>",
"request_id": "<string>",
"status_url": "<string>",
"message": "<string>"
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 60 seconds.",
"upgrade": {},
"ironbox": {
"why": "No rate limits inside an Ironbox: your agent runs next to Hyperliquid with the data on the box.",
"create": "POST https://api.ironflow.sh/v1/ironbox",
"url": "https://ironflow.sh/ironbox?utm_source=api"
},
"stream": "GET https://api.ironflow.sh/v1/liquidations/stream (no daily limit for keyless streams)"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 60 seconds.",
"upgrade": {},
"ironbox": {
"why": "No rate limits inside an Ironbox: your agent runs next to Hyperliquid with the data on the box.",
"create": "POST https://api.ironflow.sh/v1/ironbox",
"url": "https://ironflow.sh/ironbox?utm_source=api"
},
"stream": "GET https://api.ironflow.sh/v1/liquidations/stream (no daily limit for keyless streams)"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 60 seconds.",
"upgrade": {},
"ironbox": {
"why": "No rate limits inside an Ironbox: your agent runs next to Hyperliquid with the data on the box.",
"create": "POST https://api.ironflow.sh/v1/ironbox",
"url": "https://ironflow.sh/ironbox?utm_source=api"
},
"stream": "GET https://api.ironflow.sh/v1/liquidations/stream (no daily limit for keyless streams)"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 60 seconds.",
"upgrade": {},
"ironbox": {
"why": "No rate limits inside an Ironbox: your agent runs next to Hyperliquid with the data on the box.",
"create": "POST https://api.ironflow.sh/v1/ironbox",
"url": "https://ironflow.sh/ironbox?utm_source=api"
},
"stream": "GET https://api.ironflow.sh/v1/liquidations/stream (no daily limit for keyless streams)"
}
}Keys and billing
Buy an Ironflow plan with x402
POST /x402/v1/plans//buy buys a 30-day API plan in one call with x402, USDC on Base, no account. The plan starts once the payment settles.
POST
/
x402
/
v1
/
plans
/
{plan}
/
buy
Buy a 30-day plan with x402
curl --request POST \
--url https://api.ironflow.sh/x402/v1/plans/{plan}/buy \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]"
}
'import requests
url = "https://api.ironflow.sh/x402/v1/plans/{plan}/buy"
payload = { "email": "[email protected]" }
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({email: '[email protected]'})
};
fetch('https://api.ironflow.sh/x402/v1/plans/{plan}/buy', 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.ironflow.sh/x402/v1/plans/{plan}/buy",
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([
'email' => '[email protected]'
]),
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.ironflow.sh/x402/v1/plans/{plan}/buy"
payload := strings.NewReader("{\n \"email\": \"[email protected]\"\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.ironflow.sh/x402/v1/plans/{plan}/buy")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ironflow.sh/x402/v1/plans/{plan}/buy")
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 \"email\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_body{
"status": "paid",
"plan": "<string>",
"plan_name": "<string>",
"tier": "<string>",
"days": 123,
"email": "<string>",
"request_id": "<string>",
"status_url": "<string>",
"message": "<string>"
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 60 seconds.",
"upgrade": {},
"ironbox": {
"why": "No rate limits inside an Ironbox: your agent runs next to Hyperliquid with the data on the box.",
"create": "POST https://api.ironflow.sh/v1/ironbox",
"url": "https://ironflow.sh/ironbox?utm_source=api"
},
"stream": "GET https://api.ironflow.sh/v1/liquidations/stream (no daily limit for keyless streams)"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 60 seconds.",
"upgrade": {},
"ironbox": {
"why": "No rate limits inside an Ironbox: your agent runs next to Hyperliquid with the data on the box.",
"create": "POST https://api.ironflow.sh/v1/ironbox",
"url": "https://ironflow.sh/ironbox?utm_source=api"
},
"stream": "GET https://api.ironflow.sh/v1/liquidations/stream (no daily limit for keyless streams)"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 60 seconds.",
"upgrade": {},
"ironbox": {
"why": "No rate limits inside an Ironbox: your agent runs next to Hyperliquid with the data on the box.",
"create": "POST https://api.ironflow.sh/v1/ironbox",
"url": "https://ironflow.sh/ironbox?utm_source=api"
},
"stream": "GET https://api.ironflow.sh/v1/liquidations/stream (no daily limit for keyless streams)"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 60 seconds.",
"upgrade": {},
"ironbox": {
"why": "No rate limits inside an Ironbox: your agent runs next to Hyperliquid with the data on the box.",
"create": "POST https://api.ironflow.sh/v1/ironbox",
"url": "https://ironflow.sh/ironbox?utm_source=api"
},
"stream": "GET https://api.ironflow.sh/v1/liquidations/stream (no daily limit for keyless streams)"
}
}Path Parameters
Available options:
explorer, builder, founding Body
application/json
Maximum string length:
254