Skip to main content
POST
/
v1
/
gates
curl -X POST https://xenarch.dev/v1/gates \
  -H "X-Site-Token: st_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"url": "/premium-article", "detection_method": "ua_match"}'
{
  "xenarch": true,
  "gate_id": "7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b",
  "price_usd": "0.003",
  "splitter": "0xC6D3a6B6fcCD6319432CDB72819cf317E88662ae",
  "collector": "0xabc123...publisher_wallet",
  "network": "base",
  "asset": "USDC",
  "protocol": "x402",
  "verify_url": "https://xenarch.dev/v1/gates/7f3a1b2c.../verify",
  "expires": "2026-04-10T15:00:00Z"
}
curl -X POST https://xenarch.dev/v1/gates \
  -H "X-Site-Token: st_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"url": "/premium-article", "detection_method": "ua_match"}'
{
  "xenarch": true,
  "gate_id": "7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b",
  "price_usd": "0.003",
  "splitter": "0xC6D3a6B6fcCD6319432CDB72819cf317E88662ae",
  "collector": "0xabc123...publisher_wallet",
  "network": "base",
  "asset": "USDC",
  "protocol": "x402",
  "verify_url": "https://xenarch.dev/v1/gates/7f3a1b2c.../verify",
  "expires": "2026-04-10T15:00:00Z"
}

Notes

  • Returns HTTP 402 (Payment Required), not 200
  • collector is the publisher’s payout wallet address
  • splitter is the Xenarch splitter contract address on Base
  • Gates expire after 30 minutes by default (GATE_TTL_SECONDS)
  • Price is resolved from path-specific rules or site default
  • Origin/Referer header must match the registered site domain

Headers

x-site-token
string
required

Body

application/json
url
string
required
detection_method
string | null

Response

Successful Response

gate_id
string<uuid>
required
price_usd
string
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
splitter
string
required
collector
string
required
network
string
required
verify_url
string
required
expires
string<date-time>
required
xenarch
boolean
default:true
asset
string
default:USDC
protocol
string
default:x402