curl -X POST https://api.xenarch.dev/v1/gates/7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b/verify \
-H "Content-Type: application/json" \
-d '{"tx_hash": "0x8f2a9c4e1b7d3f6a0c5e8b2d4f7a1c3e6b9d2f5a8c1e4b7d0a3f6c9e2b5d8a1f", "facilitator": "PayAI"}'
{
"gate_id": "7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b",
"status": "paid",
"tx_hash": "0x8f2a9c4e1b7d3f6a0c5e8b2d4f7a1c3e6b9d2f5a8c1e4b7d0a3f6c9e2b5d8a1f",
"amount_usd": "0.0030",
"verified_at": "2026-11-17T15:02:11Z"
}
Gates
Verify Payment
Verify a USDC payment on Base for an x402 gate by transaction hash. Returns the verified payment record. Idempotent per gate and hash.
POST
/
v1
/
gates
/
{gate_id}
/
verify
curl -X POST https://api.xenarch.dev/v1/gates/7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b/verify \
-H "Content-Type: application/json" \
-d '{"tx_hash": "0x8f2a9c4e1b7d3f6a0c5e8b2d4f7a1c3e6b9d2f5a8c1e4b7d0a3f6c9e2b5d8a1f", "facilitator": "PayAI"}'
{
"gate_id": "7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b",
"status": "paid",
"tx_hash": "0x8f2a9c4e1b7d3f6a0c5e8b2d4f7a1c3e6b9d2f5a8c1e4b7d0a3f6c9e2b5d8a1f",
"amount_usd": "0.0030",
"verified_at": "2026-11-17T15:02:11Z"
}
curl -X POST https://api.xenarch.dev/v1/gates/7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b/verify \
-H "Content-Type: application/json" \
-d '{"tx_hash": "0x8f2a9c4e1b7d3f6a0c5e8b2d4f7a1c3e6b9d2f5a8c1e4b7d0a3f6c9e2b5d8a1f", "facilitator": "PayAI"}'
{
"gate_id": "7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b",
"status": "paid",
"tx_hash": "0x8f2a9c4e1b7d3f6a0c5e8b2d4f7a1c3e6b9d2f5a8c1e4b7d0a3f6c9e2b5d8a1f",
"amount_usd": "0.0030",
"verified_at": "2026-11-17T15:02:11Z"
}
Body
| Field | Type | Description |
|---|---|---|
tx_hash | string | The Base transaction hash, 0x followed by 64 hex characters. Required |
facilitator | string | Name of the facilitator that settled the payment, for example PayAI. Optional, used for metrics only |
What Xenarch checks
- The transaction hash has not been recorded for a different gate.
- The gate has not expired.
- The transaction receipt on Base exists and the transaction succeeded.
- The receipt contains a USDC
Transferto the seller wallet recorded on the gate. - The transferred amount is at least the gate price.
paid, and returns the record. There is no access token. The agent proves access on each request with the X-Xenarch-Gate-Id and X-Xenarch-Tx-Hash headers, and your integration calls this endpoint to check them.
Notes
- Idempotent. Sending the same
gate_idandtx_hashagain returns the same record. - One gate per transaction. A
tx_hashalready recorded for another gate returns HTTP 409. - Several payers per gate. Different agents can pay the same gate with different transactions. Each gets its own record.
- An expired gate returns HTTP 410. A failed transaction, a missing transfer or a short amount returns HTTP 400. HTTP 502 means Base RPC could not be reached: retry.
- No authentication is required.
Plain x402 payments
An agent that sends a standard x402X-PAYMENT header instead of a transaction hash is handled by POST /v1/gates/{gate_id}/settle-x402 with the body {"x_payment": "<raw header value>"}. Xenarch passes the signed authorization to a facilitator from the default stack, then runs the same checks and returns the same record. The WordPress and Joomla plugins and the Cloudflare Worker call it for you.Body
application/json