HOW-TO GUIDE
How to Integrate Crypto Payments via API
Developer guide to integrating Zateway's REST API for programmatic USDT & USDC payment processing. Includes code examples and webhook setup.
Get API Keys
Sign up at zateway.com, go to Settings → API Keys. Copy your zate_live_* key for production or zate_test_* for sandbox testing.
Install the SDK
Run: npm install @zateway/sdk. Or use the REST API directly with fetch/axios. TypeScript types included.
Create a Payment Session
POST /api/v1/sessions with {amount, currency, chain, webhookUrl}. Returns a session ID and checkout URL.
Redirect Customer to Checkout
Redirect the customer to the checkoutUrl from the response. They connect their wallet and approve the payment on the hosted checkout page.
Handle Webhook Callback
Zateway sends a POST to your webhookUrl when payment status changes. Verify the HMAC-SHA256 signature, then update your order status.
Confirm and Fulfill
When status is 'confirmed' or 'settled', mark the order as paid and fulfill. Transaction hash is included for on-chain verification.