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"
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.
xpayr_health_check
Check XPayr Gateway API v1 operational health, version, and server timestamp.
curl -X GET "https://xpayr.com/api/v1/health"
xpayr_create_payment_session
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"}'
xpayr_list_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"
xpayr_get_payment_session
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"
xpayr_get_public_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"
xpayr_apply_payment_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"}'
xpayr_get_merchant_profile
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"
xpayr_get_merchant_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"
xpayr_get_supported_networks
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"
xpayr_get_webhook_config
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"
xpayr_set_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"}'
xpayr_send_test_webhook
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"
xpayr_create_ai_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"}'
xpayr_list_ai_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"
xpayr_update_ai_agent_policy
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}'
xpayr_submit_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"}'
xpayr_list_agent_payment_intents
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"
xpayr_bridge_agent_intent_to_checkout
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"
xpayr_approve_agent_intent
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"}'
xpayr_reject_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"}'
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.
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.
Yes. Switching from sk_test_ to sk_live_ keeps the exact same endpoint URLs, JSON field names, and HMAC-SHA256 webhook event schemas.