x402 facilitator
curl --request POST \
--url https://api.compose.market/api/x402/facilitator/verify \
--header 'Content-Type: application/json' \
--data '
{
"paymentPayload": {},
"paymentRequirements": {}
}
'import requests
url = "https://api.compose.market/api/x402/facilitator/verify"
payload = {
"paymentPayload": {},
"paymentRequirements": {}
}
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({paymentPayload: {}, paymentRequirements: {}})
};
fetch('https://api.compose.market/api/x402/facilitator/verify', 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.compose.market/api/x402/facilitator/verify",
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([
'paymentPayload' => [
],
'paymentRequirements' => [
]
]),
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.compose.market/api/x402/facilitator/verify"
payload := strings.NewReader("{\n \"paymentPayload\": {},\n \"paymentRequirements\": {}\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.compose.market/api/x402/facilitator/verify")
.header("Content-Type", "application/json")
.body("{\n \"paymentPayload\": {},\n \"paymentRequirements\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compose.market/api/x402/facilitator/verify")
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 \"paymentPayload\": {},\n \"paymentRequirements\": {}\n}"
response = http.request(request)
puts response.read_body{
"chains": [
{}
],
"defaultChainId": 123
}Payments & x402
x402 facilitator
Verify and settle x402 payments through the Compose facilitator.
POST
/
api
/
x402
/
facilitator
/
verify
x402 facilitator
curl --request POST \
--url https://api.compose.market/api/x402/facilitator/verify \
--header 'Content-Type: application/json' \
--data '
{
"paymentPayload": {},
"paymentRequirements": {}
}
'import requests
url = "https://api.compose.market/api/x402/facilitator/verify"
payload = {
"paymentPayload": {},
"paymentRequirements": {}
}
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({paymentPayload: {}, paymentRequirements: {}})
};
fetch('https://api.compose.market/api/x402/facilitator/verify', 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.compose.market/api/x402/facilitator/verify",
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([
'paymentPayload' => [
],
'paymentRequirements' => [
]
]),
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.compose.market/api/x402/facilitator/verify"
payload := strings.NewReader("{\n \"paymentPayload\": {},\n \"paymentRequirements\": {}\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.compose.market/api/x402/facilitator/verify")
.header("Content-Type", "application/json")
.body("{\n \"paymentPayload\": {},\n \"paymentRequirements\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compose.market/api/x402/facilitator/verify")
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 \"paymentPayload\": {},\n \"paymentRequirements\": {}\n}"
response = http.request(request)
puts response.read_body{
"chains": [
{}
],
"defaultChainId": 123
}The facilitator routes expose Compose’s x402-compatible verification and settlement surface.
Routes
| Method | Path | Description |
|---|---|---|
GET | /api/x402/facilitator/supported | Returns supported x402 versions, schemes, and networks. |
GET | /api/x402/facilitator/chains | Returns configured chain metadata, USDC address, explorer, and default chain. |
POST | /api/x402/facilitator/verify | Verifies a payment payload against requirements. |
POST | /api/x402/facilitator/settle | Settles a verified payment payload. |
Verify and settle body
object
required
x402 payment payload supplied by the payer.
object
required
x402 payment requirements issued by the paid resource.
Chain metadata response
array
Configured chains with
chainId, network, shortName, explorer, usdcAddress, schemes, asset, and decimals.number
Active default chain ID.
Errors
Malformed verify or settle payloads return400 with:
{
"error": "Failed to verify payment",
"details": "..."
}
⌘I