Base URL:Documentation Index
Fetch the complete documentation index at: https://docs.semanticpay.io/llms.txt
Use this file to discover all available pages before exploring further.
https://x402.semanticpay.io
The facilitator verifies and settles x402 payments on behalf of sellers. It currently supports USDT0 on Plasma (eip155:9745) and Stable (eip155:988).
Verify
Validates a payment payload against the seller’s requirements. Called by the seller’s middleware before serving a paid resource.
| Field | Type | Description |
|---|---|---|
paymentPayload | object | The signed payment from the buyer (from the X-PAYMENT header) |
paymentRequirements | object | The seller’s price and token requirements |
| Header | Required | Description |
|---|---|---|
X-Event-Callback | No | URL to receive lifecycle events. The facilitator will POST verify_started and verify_completed (or verify_failed) events to this URL. |
isValid is false and an invalidReason field explains why.
Settle
Settles a verified payment on-chain. Transfers USDT0 from the buyer to the seller via the facilitator’s account.
/verify.
Headers
| Header | Required | Description |
|---|---|---|
X-Event-Callback | No | URL to receive lifecycle events. The facilitator will POST settle_started and settle_completed (or settle_failed) events to this URL. |
Supported
Returns the payment schemes and networks this facilitator supports.
Health
Health check. Returns the facilitator’s address and supported networks.
Lifecycle Events
The facilitator can push real-time lifecycle events to a callback URL during verification and settlement. This is useful for building UIs that visualize the payment flow as it happens.
How it works
Pass theX-Event-Callback header with a URL on your /verify and /settle requests. The facilitator will POST events to that URL at each stage of the process.
Event format
Each event is a JSON POST with this shape:Event types
Verification events (sent during/verify):
| Type | Step | Description |
|---|---|---|
verify_started | 6 | Facilitator has begun verifying the payment signature and requirements |
verify_completed | 7 | Verification finished successfully. details.isValid indicates the result |
verify_failed | 7 | Verification threw an error. details.error contains the message |
/settle):
| Type | Step | Description |
|---|---|---|
settle_started | 9 | Facilitator is broadcasting the receiveWithAuthorization transaction |
settle_completed | 10 | Transaction confirmed on-chain. details.transactionHash contains the tx hash |
settle_failed | 10 | Settlement threw an error. details.error contains the message |
Example: receiving events
Set up an endpoint on your server to receive the POSTed events:X-Event-Callback is not provided, no events are sent. The facilitator behaves identically — this is purely opt-in.
Errors
All endpoints return standard HTTP status codes.| Status | Meaning |
|---|---|
200 | Success |
400 | Missing required fields (paymentPayload or paymentRequirements) |
429 | Too many requests — rate limit exceeded |
500 | Internal error — the response body contains an error string |
