XGuard 0.6.0 · Mainnet

Quick start

Base URL https://app.xguardgate.com. Use the live API key returned during registration as a Bearer token.

01

Register your application

Create a merchant identity and receive the API key once.

curl -X POST https://app.xguardgate.com/v1/register \
  -H 'content-type: application/json' \
  -d '{"name":"my-payment-app"}'

The response contains apiKey, merchant metadata and the XGuard treasury address. Store the key immediately.

02

Check service balance

curl https://app.xguardgate.com/v1/balance \
  -H 'authorization: Bearer xg_live_YOUR_KEY'
03

Fund the prepaid balance

Create a top-up intent. The response returns the exact native USDC amount on Base, treasury address, expiry and claim token. After sending that amount, claim it with the transaction hash.

curl -X POST https://app.xguardgate.com/v1/topups/intents \
  -H 'authorization: Bearer xg_live_YOUR_KEY' \
  -H 'content-type: application/json' \
  -d '{"amountUsd":"1.00"}'
curl -X POST https://app.xguardgate.com/v1/topups/claim \
  -H 'authorization: Bearer xg_live_YOUR_KEY' \
  -H 'content-type: application/json' \
  -d '{"claimToken":"TOKEN_FROM_INTENT","transactionHash":"0x..."}'
04

Verify an x402 v2 payment

Send the canonical x402 v2 facilitator envelope.

curl -X POST https://app.xguardgate.com/verify \
  -H 'authorization: Bearer xg_live_YOUR_KEY' \
  -H 'content-type: application/json' \
  -d @x402-request.json
05

Settle through XGuard

Use the same canonical x402 v2 envelope. XGuard adds replay protection, concurrency control, routed execution, finality handling and settlement truth metadata.

curl -X POST https://app.xguardgate.com/settle \
  -H 'authorization: Bearer xg_live_YOUR_KEY' \
  -H 'content-type: application/json' \
  -d @x402-request.json
Attempt fee$0.03 once per authenticated, parseable economic attempt. Idempotent retries do not add another fee.
Ref