X Pay
X402 V2 · PAYMENT INFRASTRUCTURE

Verify payments.
Settle on-chain.

A facilitator for USDC payments on Base and BNB Smart Chain. Your customer authorizes the payment. X Pay verifies it and submits settlement to the network.

THE SETTLEMENT LAYER
↗Signed requestAuthorization received
X PayVERIFY · SETTLE
◉BaseEIP-3009 · USDC
◇BNB ChainPermit2 · USDC
One integration. Onchain settlement.

Capability discovery is public. Verification and settlement require a facilitator API key. Before accepting payments, check the network’s current status: settlement needs sufficient native gas funds.

API REFERENCE

Two networks. Clear endpoints.

MethodBaseBNB ChainAccess
GET/health/bsc/healthPublic
GET/supported/bsc/supportedPublic
GET/facilitator/status/bsc/facilitator/statusPublic
POST/verify/bsc/verifyAPI key
POST/settle/bsc/settleAPI key

All paths use https://facilitator-xpay.llc. A successful health response confirms the API is reachable; inspect the status endpoint for settlement readiness.

MERCHANT INTEGRATION

From authorization to receipt.

01

Get API key

Sign in or create your account, verify your email, and generate a dedicated facilitator API key under Facilitator Access. This is separate from dashboard merchant payment keys. Keep the key on your server.

02

Choose the network

Read the matching capabilities endpoint. Base uses eip155:8453. BNB Chain uses eip155:56 and Permit2, with 18-decimal USDC amounts.

03

Verify, then settle

Send the signed payment payload and requirements to the matching API. Deliver the paid resource only after confirming successful settlement.

Public discovery — no payment

curl https://facilitator-xpay.llc/supported
curl https://facilitator-xpay.llc/bsc/supported
curl https://facilitator-xpay.llc/bsc/facilitator/status

Authentication

Authorization: Bearer YOUR_FACILITATOR_API_KEY
# Alternatively: X-API-Key: YOUR_FACILITATOR_API_KEY

Never put your facilitator API key in browser code. The complete request fields and response handling are documented below. BNB payers must first approve the USDC token for Permit2; use the published network and token details when preparing authorizations.

INTEGRATION REFERENCE

Live networks & assets

X Pay provides x402 v2 exact-payment verification and settlement for USDC on Base mainnet and BNB Smart Chain mainnet. Base uses Circle USDC; BNB uses Binance-Peg USDC. The two assets have different contracts, decimals and authorization methods.

SettingBaseBNB Chain
API base URLhttps://facilitator-xpay.llchttps://facilitator-xpay.llc/bsc
Network / chain IDeip155:8453 / 8453eip155:56 / 56
USDC contract0x833589fCD6eDb6E08f4c7C32D4f71b54bdA029130x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d
Token decimals618
Scheme / versionexact / x402 v2exact / x402 v2
AuthorizationEIP-3009 · TransferWithAuthorizationPermit2 · signed witness authorization
0.10 USDC in atomic units100000100000000000000000
1 USDC in atomic units10000001000000000000000000
Settlement gasFacilitator pays ETH on BaseFacilitator pays BNB on chain 56

Amounts are positive integer strings in token atomic units. Convert decimal USDC prices using the selected token’s decimals, without floating-point rounding. Select the chain-specific API URL and query its /supported response before preparing payment requirements.

Mainnet payments transfer real USDC. Dashboard Test mode is a separate simulation; it does not turn these facilitator URLs into testnets.

INTEGRATION REFERENCE

Facilitator access & authentication

  1. Open Facilitator Access in the dashboard and sign in or create your account.
  2. Verify your email if requested, select your project and refresh access. Workspace owners and admins manage facilitator keys.
  3. Enter a key name and your public EVM receiving wallet. The wallet is fixed for the project after registration; never enter a private key or seed phrase.
  4. Generate and securely save the full key when it is shown. It is shown once. Up to five active keys can be held per project.
  5. Keep the key on your resource server. Rotate by creating a replacement, updating your server and revoking the old key.

Use the key generated under Facilitator Access, not a dashboard merchant payment key. A shared xp_live_ prefix does not make the two credentials interchangeable. Public health, supported and status endpoints need no key.

Authorization: Bearer $XPAY_FACILITATOR_KEY
# Or use: X-API-Key: $XPAY_FACILITATOR_KEY
Content-Type: application/json

Use one authentication header. Keep credentials out of browser bundles, URLs and logs. A missing, invalid or revoked key returns HTTP 401; disabled merchant access returns HTTP 403.

INTEGRATION REFERENCE

From HTTP 402 to confirmed access

  1. The resource server sets trusted payment terms: network, asset, exact atomic amount, receiving wallet and timeout. It returns HTTP 402 with an x402 v2 PAYMENT-REQUIRED header and an accepts entry.
  2. The payer chooses a supported entry and signs its authorization. On BNB, the payer must first authorize the USDC token allowance to Permit2; this initial on-chain approval may cost BNB gas.
  3. The payer retries the resource request with the base64-encoded x402 payment payload in PAYMENT-SIGNATURE.
  4. The resource server calls the selected facilitator’s /verify. Check the JSON isValid value, not just HTTP 200.
  5. The resource server calls the same network’s /settle with that payment payload and the same trusted payment requirements.
  6. Deliver the paid resource only after success: true and a confirmed transaction. Save the chain, hash and order reference. Return the x402 settlement response in PAYMENT-RESPONSE.

The resource server creates the 402 challenge; /verify and /settle are authenticated facilitator operations, not public paid-resource discovery routes. Customer USDC moves to the receiving merchant, rather than being deposited into a facilitator balance.

INTEGRATION REFERENCE

Verify & settle request contract

Send JSON to POST /verify or POST /settle on the chosen network’s API base URL. Both use the same envelope. The signed payload comes from the payer; the resource server supplies its own trusted payment requirements.

FieldRequired value / meaning
paymentPayload.x402Version2
paymentPayload.acceptedThe accepted x402 payment terms; must match server requirements.
paymentPayload.payloadEIP-3009 authorization on Base; Permit2 authorization on BNB.
paymentPayload.resourceResource metadata, such as URL, description and MIME type, used by x402 clients.
paymentRequirements.schemeexact
paymentRequirements.networkeip155:8453 or eip155:56, matching the endpoint.
paymentRequirements.amountExact positive integer string in USDC atomic units.
paymentRequirements.assetThe USDC contract for the selected chain.
paymentRequirements.payToMerchant receiving EVM address, checked against server terms.
paymentRequirements.maxTimeoutSecondsPositive integer payment timeout, in seconds.
paymentRequirements.extraBase: name: "USD Coin", version: "2". BNB: assetTransferMethod: "permit2".

Do not accept a payer’s price or receiving address as trusted server configuration. Amount, recipient, asset and chain must match the authorization and your paid resource.

INTEGRATION REFERENCE

Base · EIP-3009 authorization

Base USDC signs TransferWithAuthorization typed data with domain name USD Coin, version 2, chain ID 8453 and verifying contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913.

Signed fieldType / requirement
fromPayer EVM address.
toSame receiving wallet as payTo.
valueSame atomic integer amount as amount.
validAfterUnix timestamp in seconds, encoded as an integer string.
validBeforeExpiry timestamp in seconds, encoded as an integer string.
nonceFresh 32-byte nonce: 0x followed by 64 hex characters.
payload.signatureThe payer’s typed-data signature; normally a 65-byte EOA signature.
payload.authorizationContains from, to, value, validAfter, validBefore, nonce.

Use an x402 EVM client to generate the signature and payload. The signature must authorize exactly the resource server’s terms. Verification does not transfer funds; settlement submits USDC’s transferWithAuthorization.

INTEGRATION REFERENCE

BNB · Permit2 authorization

Binance-Peg USDC on BNB uses Permit2 instead of Base’s EIP-3009 format. Requirements must include extra.assetTransferMethod: "permit2" and use 18-decimal USDC atomic amounts.

SettingValue
Permit20x000000000022D473030F116dDEE9F6B43aC78BA3
Exact Permit2 proxy / spender0x402085c248EeA27D92E8b30b2C58ed07f9E20001
Typed-data domainPermit2, chain ID 56, verifying contract = Permit2 address.
Signed payload fieldMeaning
payload.signaturePayer signature produced by the x402 Permit2 client.
payload.permit2Authorization.fromPayer EVM address.
permitted.tokenBNB USDC contract listed above.
permitted.amountExact 18-decimal atomic payment amount.
spenderExact Permit2 proxy address.
nonceFresh Permit2 nonce, encoded as an integer string.
deadlineExpiry Unix timestamp in seconds, encoded as an integer string.
witness.toMerchant receiving address, matching payTo.
witness.validAfterAuthorization start timestamp in seconds, encoded as an integer string.

Use a compatible x402 EVM exact client to create the Permit2 witness typed data; do not reuse a Base signature. The payer’s USDC allowance must cover the amount and target Permit2. A first-time token approval is separate from the off-chain payment signature. The facilitator pays BNB for the settlement transaction.

INTEGRATION REFERENCE

Read the result, not just the status code

Operation / outcomeHTTP / fieldsResource server action
Valid verification200 · isValid: true, payer; Base also returns network.Continue to settlement. No funds moved by verification.
Invalid verification200 · isValid: false, invalidReason; other failures may use an error response.Reject the payment; return a new 402 challenge when appropriate.
Base settlement confirmed200 · success: true, status: "SETTLED", transaction, network, payer, payTo, amount, asset.Record receipt and fulfill once.
BNB settlement confirmed200 · success: true, transaction, network, payer; SDK response fields may differ from Base.Record BNB receipt and fulfill once.
Base settlement pending202 · success: false, status: "SETTLEMENT_PENDING", transaction when available.Wait for the Base receipt; do not fulfill or treat as failed.
BNB settlement pending202 when errorReason: "settlement_pending"; transaction may be available.Wait for the BNB receipt; do not fulfill or rebroadcast blindly.

These fields describe the live API contract. A successful HTTP response alone is not confirmation. The Base and BNB responses are not identical: inspect invalidReason, failureReason or errorReason as applicable.

INTEGRATION REFERENCE

Confirm receipts & prevent duplicate delivery

Store the payment payload reference, trusted terms, network, order ID and transaction hash. Check a receipt on the same chain as the payment: successful execution and the expected USDC transfer recipient and amount must match the order.

Base receipts

GET /transactions/:txHash returns Base transaction status. GET /settlements/:id returns a stored Base settlement when its ID is known. These are public read endpoints, so do not store customer secrets in references.

BaseScan ↗

BNB receipts

Confirm the returned hash with BNB chain RPC or BscScan. The root /transactions/:txHash endpoint is Base-specific; it is not a BNB receipt API. A separate /bsc/transactions route is not currently published.

BscScan ↗

For Base settlement, send a stable Idempotency-Key for the same order attempt; duplicate payment/idempotency references return the existing result. The BNB route does not provide the same application-level idempotency header behavior. Use your own durable order lock and receipt reconciliation for both chains. On-chain authorization nonces prevent authorization reuse; they do not replace your fulfillment lock.

On a timeout, reconcile any known transaction hash before retrying. Never deliver twice because a caller retried or a network response was lost.

INTEGRATION REFERENCE

Errors & recovery

Status / conditionAction
400 · invalid payload / paymentCheck required fields, positive atomic amount, chain, token, recipient, expiry, nonce and signature. Read the JSON reason.
401 · missing or invalid keyUse a saved active key from Dashboard → Facilitator Access; check Bearer or X-API-Key formatting.
403 · merchant disabledCheck account/project access and contact support if access remains disabled.
429 · rate limitBack off and respect Retry-After when returned; avoid retry storms.
Base 502 · failed settlementRead failureReason and reconcile any transaction hash before retrying.
BNB 503 · SETTLEMENT_DISABLEDSettlement is unavailable; check current status and contact support.
500 · internal error / RPC failureRecord the request ID when present, wait and retry safely after reconciling any known transaction.
Insufficient USDC / allowance / gasPayer needs sufficient USDC; BNB Permit2 allowance must cover the payment; facilitator needs native gas funds.

Structured infrastructure errors use success: false and an error object with code, message and requestId. Verification and settlement business failures use the fields in the result table above. Preserve the request ID for support; never send your key or private signing material.

INTEGRATION REFERENCE

Service details & operational checks

Public signer on both networks: 0x589a2314a2e05f45e40c4823da3ba58d421db3d8. Public status endpoints expose the current signer, chain, native gas balance and settlement-enabled flag. Capability endpoints expose the current supported scheme, asset and signing method; use those responses as the live contract.

/health confirms reachability. healthy: true in status indicates a positive native gas balance, not a guaranteed transaction capacity or uptime SLA. Gas conditions and RPC availability can change. BNB capabilities also advertise the builder-code extension with code xpay.

Base historical settlement evidence is available through the public signer’s BaseScan history. BNB activity is available through BscScan. Explorer activity is transaction evidence; it does not imply any directory endorsement.

Current integration scope: Base USDC and BNB Binance-Peg USDC mainnet. Additional networks, other assets and dashboard test simulations are separate from this live facilitator service.

Building a paid API or AI agent?

Explore X Pay’s separate paid API catalogue, or sign in to your dashboard to generate and manage facilitator API keys.