OpenAPI 3.1.0 Β· 20 Endpoints Β· Base URL: https://xpayr.com/api/v1

XPayr REST API v1 Interactive Reference.

Inspect every production & Testnet endpoint directly from our canonical /.well-known/openapi.json specification, download our ready-to-run Postman v2.1 Collection, or generate full application code in 8 languages.

GET /api/v1/health System Health
xpayr_health_check

API Gateway Health Check

Check XPayr Gateway API v1 operational health, version, and server timestamp.

curl -X GET "https://xpayr.com/api/v1/health"
POST /api/v1/payments Payments & Checkout
xpayr_create_payment_session

Create Crypto Payment Session (Dual Checkout)

Create a non-custodial crypto payment session supporting Web3 1-Click Pay, Direct Exchange QR Transfer, Multi-Chain Links, 1-Year Reusable Links, and Automated HTML Invoice Email Delivery.

curl -X POST "https://xpayr.com/api/v1/payments" \
  -H "Authorization: Bearer sk_test_your_workspace_key" \
  -H "Content-Type: application/json" \
  -d '{"amount":49.9,"currency":"USDT","network":"tron-mainnet","order_id":"ORD-1001","description":"Pro SaaS Annual Plan","is_multi_chain":true,"is_reusable":false,"send_invoice_email":true,"customer_email":"buyer@example.com","ipn_callback_url":"https://example.com/webhooks/xpayr"}'
GET /api/v1/payments Payments & Checkout
xpayr_list_payment_sessions

List Merchant Payment Sessions

List merchant crypto payment sessions with filtering by status, currency, network, and pagination.

curl -X GET "https://xpayr.com/api/v1/payments" \
  -H "Authorization: Bearer sk_test_your_workspace_key"
GET /api/v1/payments/{session_id} Payments & Checkout
xpayr_get_payment_session

Get Payment Session Details

Retrieve full details, metadata, settlement split amounts, checkout mode, and on-chain transaction hash for a payment session.

curl -X GET "https://xpayr.com/api/v1/payments/{session_id}" \
  -H "Authorization: Bearer sk_test_your_workspace_key"
GET /api/v1/payments/{session_id}/status Payments & Checkout
xpayr_get_public_payment_status

Poll Public On-Chain Payment Status

Poll real-time public checkout status, on-chain tx_hash, sender wallet address, block confirmations, and paid_at timestamp without an API key.

curl -X GET "https://xpayr.com/api/v1/payments/{session_id}/status"
POST /api/v1/payments/{session_id}/coupon Payments & Checkout
xpayr_apply_payment_coupon

Apply Checkout Discount Coupon

Validate and apply a merchant promotional discount coupon code to an active pending payment session.

curl -X POST "https://xpayr.com/api/v1/payments/{session_id}/coupon" \
  -H "Authorization: Bearer sk_test_your_workspace_key" \
  -H "Content-Type: application/json" \
  -d '{"coupon_code":"XPAYR-DEMO"}'
GET /api/v1/me Merchant & Profile
xpayr_get_merchant_profile

Get Merchant Profile & Settlement Wallet

Retrieve authenticated merchant profile, settlement wallet address, commission rate in basis points (50 bps = 0.5%), and active API keys.

curl -X GET "https://xpayr.com/api/v1/me" \
  -H "Authorization: Bearer sk_test_your_workspace_key"
GET /api/v1/me/balance Merchant & Profile
xpayr_get_merchant_balance

Get Multi-Chain Settlement Volume & Balance

Query confirmed non-custodial settlement volume, transaction counts, and platform fees grouped by currency and blockchain network.

curl -X GET "https://xpayr.com/api/v1/me/balance" \
  -H "Authorization: Bearer sk_test_your_workspace_key"
GET /api/v1/me/networks Merchant & Profile
xpayr_get_supported_networks

List Supported Networks, Chains & Tokens

List all active EVM, TRON, Solana, and Arc Mainnet/Testnet blockchain networks, chain IDs, RPC endpoints, splitter contracts, and supported tokens.

curl -X GET "https://xpayr.com/api/v1/me/networks" \
  -H "Authorization: Bearer sk_test_your_workspace_key"
GET /api/v1/webhooks Webhooks
xpayr_get_webhook_config

Get Webhook Configuration & Events

Inspect the merchant webhook callback URL, masked HMAC-SHA256 signing secret, and subscribed payment lifecycle events.

curl -X GET "https://xpayr.com/api/v1/webhooks" \
  -H "Authorization: Bearer sk_test_your_workspace_key"
POST /api/v1/webhooks Webhooks
xpayr_set_webhook_endpoint

Configure HTTPS Webhook Endpoint

Configure or update the merchant HTTPS webhook receiver URL and generate a fresh 32-byte HMAC-SHA256 signing secret.

curl -X POST "https://xpayr.com/api/v1/webhooks" \
  -H "Authorization: Bearer sk_test_your_workspace_key" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/webhooks/xpayr"}'
POST /api/v1/webhooks/test Webhooks
xpayr_send_test_webhook

Dispatch Signed Test Webhook Event

Send a signed test.webhook payload with HMAC-SHA256 headers to verify merchant webhook signature verification.

curl -X POST "https://xpayr.com/api/v1/webhooks/test" \
  -H "Authorization: Bearer sk_test_your_workspace_key"
POST /api/v1/agents AI Agent Commerce
xpayr_create_ai_agent

Create Policy-Controlled AI Commerce Agent

Provision a new merchant-managed AI commerce agent identity with scoped credentials and programmable spending guardrails.

curl -X POST "https://xpayr.com/api/v1/agents" \
  -H "Authorization: Bearer sk_test_your_workspace_key" \
  -H "Content-Type: application/json" \
  -d '{"name":"Autonomous Cloud Buyer","description":"Pays API and compute invoices under $50 automatically.","wallet_address":"0x71C...89A"}'
GET /api/v1/agents AI Agent Commerce
xpayr_list_ai_agents

List Merchant AI Commerce Agents

List all AI commerce agents managed by the merchant along with their status, assigned wallets, and spending policies.

curl -X GET "https://xpayr.com/api/v1/agents" \
  -H "Authorization: Bearer sk_test_your_workspace_key"
PUT /api/v1/agents/{agent_id}/policy AI Agent Commerce
xpayr_update_ai_agent_policy

Update AI Agent Spending Guardrails

Configure spending policy guardrails for an AI agent (max per-tx USD, daily cap, auto-approve threshold, allowed chains/tokens).

curl -X PUT "https://xpayr.com/api/v1/agents/{agent_id}/policy" \
  -H "Authorization: Bearer sk_test_your_workspace_key" \
  -H "Content-Type: application/json" \
  -d '{"max_tx_amount":100,"daily_limit_amount":500,"auto_approve_under":25}'
POST /api/v1/agent-intents AI Agent Commerce
xpayr_submit_agent_payment_intent

Submit Autonomous AI Agent Payment Intent

Submit an autonomous AI agent payment intent evaluated in real time against merchant policy rules (approved, pending_approval, rejected).

curl -X POST "https://xpayr.com/api/v1/agent-intents" \
  -H "Authorization: Bearer sk_test_your_workspace_key" \
  -H "Content-Type: application/json" \
  -d '{"amount":19.99,"currency":"USDC","network":"arc-testnet","recipient_address":"0xb0bD2f3A86db752dA693D8a686C406E269E57c99","reason":"Monthly GPU cluster invoice #402"}'
GET /api/v1/agent-intents AI Agent Commerce
xpayr_list_agent_payment_intents

List AI Agent Payment Intents & Audit Logs

List AI agent payment intents, policy evaluation decisions, and audit trail records for the merchant.

curl -X GET "https://xpayr.com/api/v1/agent-intents" \
  -H "Authorization: Bearer sk_test_your_workspace_key"
POST /api/v1/agent-intents/{intent_id}/bridge AI Agent Commerce
xpayr_bridge_agent_intent_to_checkout

Bridge Approved Agent Intent to Checkout Session

Bridge an approved AI agent payment intent into a live executable XPayr payment session with hosted checkout URL and on-chain verification.

curl -X POST "https://xpayr.com/api/v1/agent-intents/{intent_id}/bridge" \
  -H "Authorization: Bearer sk_test_your_workspace_key"
POST /api/v1/agent-approvals/{intent_id}/approve AI Agent Commerce
xpayr_approve_agent_intent

Approve Pending AI Agent Intent (Human-in-the-Loop)

Approve a pending AI agent payment intent from the merchant approval queue and bridge it to checkout.

curl -X POST "https://xpayr.com/api/v1/agent-approvals/{intent_id}/approve" \
  -H "Authorization: Bearer sk_test_your_workspace_key" \
  -H "Content-Type: application/json" \
  -d '{"note":"Approved by Treasury Manager"}'
POST /api/v1/agent-approvals/{intent_id}/reject AI Agent Commerce
xpayr_reject_agent_intent

Reject Pending AI Agent Intent

Reject a pending AI agent payment intent in the merchant approval queue with an audit reason.

curl -X POST "https://xpayr.com/api/v1/agent-approvals/{intent_id}/reject" \
  -H "Authorization: Bearer sk_test_your_workspace_key" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Exceeds vendor budget allocation"}'

API v1 Integration FAQ

What base URL and authentication scheme does XPayr API v1 use?

All REST API v1 endpoints are served from https://xpayr.com/api/v1 using standard Bearer token authentication (Authorization: Bearer sk_test_... for Testnet or sk_live_... for Mainnet). Public endpoints like GET /api/v1/health and GET /api/v1/payments/{session_id}/status require no secret key.

Can I import XPayr API v1 directly into Postman, Insomnia, Bruno, or Cursor?

Yes! Import https://xpayr.com/postman.json (Postman Collection v2.1) or https://xpayr.com/.well-known/openapi.json (OpenAPI 3.1.0) in one click.

Are Testnet API responses structurally identical to Mainnet?

Yes. Switching from sk_test_ to sk_live_ keeps the exact same endpoint URLs, JSON field names, and HMAC-SHA256 webhook event schemas.