Facilitator

Protocol Compliance

This implementation is 100% compliant with the x402 specification.

  • ✅ All facilitator endpoints (/verify, /settle, /supported)
  • ✅ Payment payload and requirements schemas
  • ✅ Error codes and response formats
  • ✅ Replay protection and idempotency
  • ✅ Trust-minimized payment flows

Overview

The facilitator is a server component responsible for verifying and settling payments on behalf of resource servers. It abstracts away blockchain complexity from your API.

See packages/facilitator for the full implementation.

API Reference

POST /verify

Verifies a payment is valid before settlement. Checks signature, expiry, and balance.

{
  "isValid": true,
  "payer": "GXXXX..."
}

POST /settle

Submits payment to the Stellar network. Handles fee-bumping if configured.

{
  "success": true,
  "payer": "GXXXX...",
  "transaction": "abc123...",
  "network": "stellar-testnet"
}