AmazeCheckout API
A small REST API. JSON in, JSON out. One API key per store.
Quick start
- Admin → Wallets: enable at least one coin.
- Admin → Stores: create a store, copy the API key and webhook secret.
- Create invoices from your backend and redirect the customer to the returned
url. - Handle
invoice.paidwebhooks to deliver the order.
Authentication
Send the store API key in the X-Api-Key header (or Authorization: Bearer …). Keys are stored hashed — if you lose one, generate a new one in the dashboard.
Base URL: https://amazecheckout.com/api/v1. If your server doesn't support URL rewriting, use https://amazecheckout.com/api/index.php?route=v1/….
POST/invoices
Creates an invoice. Calling again with the same order_id and amount returns the existing open (or paid) invoice, so retries are safe.
| Field | Type | Description |
|---|---|---|
amount | string | Required. Fiat amount, max 2 decimals, e.g. "49.00". |
currency | string | 3-letter fiat code. Default USD. Also INR, EUR, … |
order_id | string | Your order / invoice ID. Strongly recommended. |
description | string | Shown on the checkout page. |
email | string | Customer email (for your records). |
coin | string | Optional preselected coin, e.g. USDT_TRC20. Skips the coin picker. |
success_url | string | Where the "Return to store" button goes after payment. |
cancel_url | string | Shown when the invoice expires. |
metadata | object | Anything you want stored with the invoice. |
curl -X POST https://amazecheckout.com/api/v1/invoices \
-H "X-Api-Key: ak_…" -H "Content-Type: application/json" \
-d '{"amount":"49.00","currency":"USD","order_id":"10482","description":"VPS Plan","success_url":"https://example.com/thanks"}'
Response 201
{
"id": "6f3b8f5e-2c4c-4b9e-9d0a-2b1c3e4f5a6b",
"order_id": "10482",
"status": "new",
"is_late": false,
"amount": "49.00",
"currency": "USD",
"coin": null,
"network": null,
"address": null,
"crypto_amount": null,
"paid_amount": "0",
"rate": null,
"transactions": [],
"url": "https://amazecheckout.com/pay.php?id=6f3b8f5e-…",
"created_at": 1764150000,
"expires_at": 1764236400,
"paid_at": null,
"conversion": null
}
conversion is set when the payment was auto-converted to USDT: {"provider":"sideshift","shift_id":"…","status":"settled","settle_coin":"USDT","settle_network":"TRON","settle_address":"T…","settled_amount":"49.21","settle_txid":"…"}. For those invoices paid means the USDT has been sent to the merchant.
GET/invoices/{id}
Returns the same object. Only invoices belonging to the calling store are visible.
GET/coins
Enabled coins. Codes: BTC, LTC, USDT_TRC20, TRX, USDT_ERC20, USDC_ERC20, USDT_BEP20, USDC_BEP20, USDT_POLYGON, USDC_POLYGON, USDT_ARBITRUM, USDC_ARBITRUM, USDC_BASE, ETH, BNB, POL, ETH_ARBITRUM, ETH_BASE.
Invoice statuses
| Status | Meaning |
|---|---|
| new | Created, customer hasn't picked a coin yet. |
| pending | Coin chosen, address and amount assigned, rate locked. Waiting for funds. |
| confirming | Enough funds seen on chain, waiting for confirmations (or, for auto-converted coins, for the USDT to be sent). |
| paid | Final. Deliver the order. is_late=true if it arrived after the window. |
| underpaid | Window ended with less than required. Can still become paid if the rest arrives during the grace period. |
| expired | Nothing received in time. Still watched during the grace period. |
Webhooks
On every status change we POST JSON to the store's webhook URL. Any 2xx response counts as delivered; anything else is retried with exponential back-off (1, 2, 4, 8 … min, max 6h, 12 attempts).
Events: invoice.pending, invoice.confirming, invoice.paid, invoice.underpaid, invoice.expired.
POST /your/webhook
Content-Type: application/json
X-AmazeCheckout-Event: invoice.paid
X-AmazeCheckout-Signature: sha256=5b1d…
{"event":"invoice.paid","invoice":{ …same object as the API… },"sent_at":1764150321}
paid as final.Verifying signatures
<?php
$body = file_get_contents('php://input');
$sig = $_SERVER['HTTP_X_AMAZECHECKOUT_SIGNATURE'] ?? '';
$want = 'sha256=' . hash_hmac('sha256', $body, 'whsec_…'); // your store's webhook secret
if (!hash_equals($want, $sig)) { http_response_code(401); exit; }
$event = json_decode($body, true);
if ($event['event'] === 'invoice.paid') {
// mark order $event['invoice']['order_id'] as paid (once)
}
http_response_code(200);
WHMCS module
- Upload
whmcs/modules/gateways/amazecheckout.phpandwhmcs/modules/gateways/callback/amazecheckout.phpinto your WHMCS root. - In AmazeCheckout create a store with webhook URL
https://YOUR-WHMCS/modules/gateways/callback/amazecheckout.php. - WHMCS → System Settings → Payment Gateways → All Payment Gateways → activate AmazeCheckout.
- Fill in the Gateway URL (
https://amazecheckout.com), API key and webhook secret. Save.
When a client opens an unpaid invoice they see a Pay with Crypto button. When the payment confirms, WHMCS records the payment against the invoice automatically, using the invoice amount in the client's currency and the blockchain TXID as the transaction ID.