SwapZilla Pay API
Accept payments programmatically. Base URL: /v1/pay
Authentication
API keys are issued on request — contact [email protected]. Send the key as:
Authorization: Bearer szp_...
Create a payment request
POST /v1/pay/merchant/requests
Content-Type: application/json
{
"receive_asset": "USDT",
"receive_network": "ERC20",
"receive_amount": 50,
"receive_address": "0x...",
"description": "Invoice #1234",
"reference": "order-1234",
"redirect_url": "https://yoursite.com/thanks"
} Redirect your customer to https://swapzilla.io/pay/r/{id}.
Webhook events
Events: payment.created, payment.updated, payment.completed.
Verify the X-SwapZillaPay-Signature header:
hmac_sha256(secret, raw_body) === header
Payment statuses
NEW → WAIT_DEPOSIT → CONFIRMING → EXCHANGING → SENDING → DONE
Terminal failures: FAILED, TIME_EXPIRED, REFUNDED.