Developers

AmazeCheckout API

A small REST API. JSON in, JSON out. One API key per store.

Quick start

  1. Admin → Wallets: enable at least one coin.
  2. Admin → Stores: create a store, copy the API key and webhook secret.
  3. Create invoices from your backend and redirect the customer to the returned url.
  4. Handle invoice.paid webhooks 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.

FieldTypeDescription
amountstringRequired. Fiat amount, max 2 decimals, e.g. "49.00".
currencystring3-letter fiat code. Default USD. Also INR, EUR, …
order_idstringYour order / invoice ID. Strongly recommended.
descriptionstringShown on the checkout page.
emailstringCustomer email (for your records).
coinstringOptional preselected coin, e.g. USDT_TRC20. Skips the coin picker.
success_urlstringWhere the "Return to store" button goes after payment.
cancel_urlstringShown when the invoice expires.
metadataobjectAnything 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

StatusMeaning
newCreated, customer hasn't picked a coin yet.
pendingCoin chosen, address and amount assigned, rate locked. Waiting for funds.
confirmingEnough funds seen on chain, waiting for confirmations (or, for auto-converted coins, for the USDT to be sent).
paidFinal. Deliver the order. is_late=true if it arrived after the window.
underpaidWindow ended with less than required. Can still become paid if the rest arrives during the grace period.
expiredNothing 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}
Webhooks can arrive more than once or out of order. Make your handler idempotent and treat 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

  1. Upload whmcs/modules/gateways/amazecheckout.php and whmcs/modules/gateways/callback/amazecheckout.php into your WHMCS root.
  2. In AmazeCheckout create a store with webhook URL https://YOUR-WHMCS/modules/gateways/callback/amazecheckout.php.
  3. WHMCS → System Settings → Payment Gateways → All Payment Gateways → activate AmazeCheckout.
  4. 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.