iCryptoNow

เอกสารสำหรับนักพัฒนาเป็นภาษาอังกฤษ โค้ด ชื่อฟิลด์ และเส้นทาง API เหมือนกันทุกภาษา

Payment page

POST/v1/checkout-sessions

No cashier page of your own? Create a checkout session and send the player to our payment page. The player picks a network, sees their deposit address with a QR code, the minimum amount and clear warnings, watches the payment arrive, and is sent back to your site.

How it works

  1. In the console, open Developers → Integration and choose iCryptoNow payment page (2FA). Until then this endpoint answers 403 checkout_disabled.
  2. When a player wants to deposit, your server calls POST /v1/checkout-sessions with the player's player_ref.
  3. Redirect the player to the url in the response (or open it in a new tab or a webview).
  4. Credit the player when you receive the deposit.confirmed webhook, exactly as with your own cashier: deposits are matched by player_ref.

The page shows the player's usual deposit address on each network (the same one POST /v1/addresses returns), so a session never holds funds: anything the player sends to that address is credited, also after the link expired.

Create a session

FieldTypeDescription
player_refstring · requiredYour id for the player, 1–128 characters of A-Z a-z 0-9 _ . : @ -.
order_idstring · optionalYour reference for this deposit (same characters). Sending the same order_id again returns the same session (200), so retries are safe. Reusing it for another player gives 409 order_id_conflict.
amountstring · optionalAmount to show the player, in token units as a decimal string ("100", "25.5"). Display only: whatever the player actually sends (at or above the minimum) is credited.
assetsstring[] · optionalNetworks to offer, for example ["bsc:USDT", "tron:USDT"]. Default: every network enabled for your account.
return_urlstring · optionalWhere the "Back" button and the automatic return go after payment: an https:// URL. Not proof of payment; rely on the webhook.
expires_ininteger · optionalSeconds the link stays usable, 300–86400. Default 3600.
const { body } = await icn("POST", "/v1/checkout-sessions", {
  player_ref: "player_1024",
  order_id: "DEP-20261014-0042",
  amount: "100",
  return_url: "https://yoursite.example/cashier",
});
// redirect the player to body.url
201 Created
{
  "id": "6f1c2d3e-8a9b-4c5d-9e0f-1a2b3c4d5e6f",
  "url": "https://app.icryptonow.com/pay/q8Xc2LmN4pRt6VwY0bZd3FhK",
  "status": "open",
  "player_ref": "player_1024",
  "order_id": "DEP-20261014-0042",
  "amount": "100",
  "assets": null,
  "return_url": "https://yoursite.example/cashier",
  "expires_at": "2026-10-14T14:00:00.000Z",
  "created_at": "2026-10-14T13:00:00.000Z",
  "deposits": []
}

Get a session

GET/v1/checkout-sessions/{id}

Returns the session with the player's deposits since it was created (newest first, same fields as Get deposit). Useful to show a status on your side; crediting still follows the webhooks.

Status

  • open: waiting, no deposit seen yet.
  • pending: a deposit was seen on-chain and is waiting for confirmation (deposit.detected).
  • completed: a deposit was confirmed and credited (deposit.confirmed).
  • expired: the link ran out with nothing seen. Deposits sent later to the address are still credited.

What the player sees

  • Your brand name, the amount and order id (when given), and the networks with their minimum amount; BEP20 is marked as the cheapest.
  • After choosing: the deposit address with QR code and copy button, "send only USDT on this network" and "below the minimum is not credited automatically" warnings.
  • Live status (the page polls every few seconds): waiting → received, confirming → complete, then back to return_url. A deposit below the minimum shows a message to contact your support.
  • Ten languages (the player can switch), phone-first layout.

Errors

  • 400 bad_request: a field is missing or invalid (the message says which).
  • 403 checkout_disabled: the payment page is not chosen for this brand in the console.
  • 404 asset_not_enabled: a network in assets is not enabled for your account.
  • 409 order_id_conflict: the order_id belongs to another player.
สมัครเลย