One signed call gives you a link. The player pays from their own wallet on our page, you credit from the webhook.
How it works
You make one signed call. Everything the player sees, from choosing a network to signing in their
wallet, happens on our page. The money goes from the player's wallet through the payment router
straight to your settlement wallet; you learn the outcome from a signed webhook.
Your backend
Creates the link with POST /v1/direct/sessions, passing your order reference, the player and where to send them back.
Player
Is redirected to the url, or sees it in a modal opened by /static/sdk.js.
time2pay page
Walks the player through network, wallet, coin and amount, and asks their wallet to pay. Calls /v1/direct/page/* on itself; you never do.
Chain
The payment is mined and reaches its confirmation depth.
Your backend
Receives payment.completed or payment.failed and credits the player. The player is sent to your return_url.
The one call you make is signed as described in Authentication.
external_order_id makes it safe to repeat: see Idempotency.
Methods, in call order
Only the first is yours to call. The page and the browser calls after it are listed so that nothing in the flow is hidden.
Direct · hosted page
One signed call creates a link; the player pays on our page by redirect or in an iframe. The page talks to the player's wallet, you credit from the webhook.
The token is returned once and stored only as a hash, so it can never be read back. A repeat of the same order therefore carries a new token on the same session: a caller retrying a create never received the first link, so replacing it costs nothing.
Request body
Field
Type
Required
Description
player_id
string
no
Your player reference. Echoed back in the settlement webhook.
external_order_id
string
no
Your order reference, and the idempotency key: a repeat with the same parameters returns the same session carrying a fresh link. See the 409 response for the cases that are refused.
return_url
string (uri)
no
Where the hosted page sends the player after a terminal step.
amount
string
no
Optional prefill: fixes the deposit amount so the hosted page never asks for it.
network
string
no
Optional prefill of the network, when you already know which one the player is paying on.
token
string
no
Optional prefill of the asset. Requires network.
callback_url
string (uri)
no
Per-session override of the merchant's configured webhook target.
language
string
no
The language the hosted page is shown in, as an ISO 639-1 code. A region is ignored, so "en-GB" is English. Send the language your player is playing in: the page is reached by a redirect that carries nothing about them, so this is the only thing that decides it. The payer can switch the language on the page itself; that choice changes what they read, not the session. Never a reason to refuse a deposit — an unsupported or missing language opens the page in English. One of: en, ru, es, uk, kk, uz, ky, tg, az, hy, ka, tr, de, fr, it, pt, pl
401unauthorizedThe signature, key, timestamp or nonce did not check out: a missing header, an unknown key id, a timestamp more than 5 minutes from ours, a signature that does not match, or a nonce already used inside the window. Do not retry without rebuilding the request — a retry needs a new timestamp, a new nonce and a new signature.
403forbiddenThe credential is valid but the caller's IP is not in the allowlist configured for your merchant. Not retryable.
{
"error": {
"code": "forbidden",
"message": "client IP not allowed for this merchant"
}
}
409conflictEither this external_order_id already belongs to a session created with different parameters, or the order it names is no longer pending — a payment is already on the chain for it, and handing out a new link would strand the player who is paying. Create a new order under a new reference.
503unavailableA dependency we need to answer safely is degraded, so the request was refused rather than served wrongly. Transient: retry with backoff, using a fresh timestamp, nonce and signature.
404Unknown or expired link.429The link was loaded more than 30 times in a minute.
GET/static/sdk.jsno signature
The iframe modal SDK
A small script that opens the hosted page in a modal iframe and reports lifecycle events to the parent window. See the iframe flow for the snippet and the events it posts.
Request
curl -X GET "$BASE_URL/static/sdk.js"
Response 200
JavaScript.
POST/v1/direct/page/stepno signature
Advance a hosted session (browser)
Called by the hosted page itself, authenticated by the token in the URL rather than by your API key. You do not need to call this — it is documented because it is what the page in the player's browser does.
Request body
Field
Type
Required
Description
token
string
yes
The token from the page URL.
action
string
yes
value
string
no
language
string
no
The language the payer picked on the page, as an ISO 639-1 code. Renders this response in it without changing the session; empty uses the session's language.
400validationA missing token, an action that does not belong to the current step, a malformed value, or a payer wallet that does not hold enough of the token to cover the deposit. Codes: validation, invalid_action, insufficient_funds.
410expiredThe link's TTL has elapsed before a payment was started. The order is untouched — create a new link for it. Once the player has sent a transaction the link keeps working until the result, so the page can show it.
{
"error": {
"code": "expired",
"message": "payment link has expired"
}
}
POST/v1/direct/page/statusno signature
Read a hosted session (browser)
The polling call the hosted page makes while a payment settles. Token-scoped, like the step call.
Request body
Field
Type
Required
Description
token
string
yes
language
string
no
The language the payer picked on the page, as an ISO 639-1 code. Renders this response in it without changing the session; empty uses the session's language.
Credit from the webhook, not from the redirect. A player can close the tab before it happens, and a query string in a browser is not something to move money on.
The whole backend side — a form posts the order id, the player lands on the payment page:
Treat these events as UI hints, exactly like the redirect. They come from a browser, so they tell
you what to show, never what to credit. The webhook is the one that moves
the ledger.
Language and the link
The page is shown in the language you send on the create call: az, de, en, es, fr, hy, it, ka, kk, ky, pl, pt, ru, tg, tr, uk and uz. Send it: the
link carries nothing about the player, so a page created without one is shown in English whatever
language your site was in. An unknown code is not an error, it falls back to English.
The link works until expires_at. An unknown or expired link opens a short page that says
so and sends the player back to your site; one link can be loaded up to 30 times a minute. Create a
new link for every attempt rather than storing old ones.
Prefilling
network, token and amount are optional on both create
calls and mean the same thing in each: when you already know what the player is depositing, the
matching step is skipped and the session starts further along.
Prefilling token does more than skip a screen. The coin picker runs after the wallet
connects and lists what that wallet holds, so a session without a prefilled token gives the player
the coins they can actually pay with — and lets them pick a different one if they change wallets.
Prefill the token only when the order really is denominated in it.
You send
Session starts at
nothing
network_select
network
connect_wallet, then token_select
network + token
connect_wallet, and the coin picker is skipped
network + token + amount
connect_wallet, and the player is never asked for a coin or an amount
Prefilled values are validated when the session is created, because the steps that would normally
check them are exactly the ones being skipped. An unknown network, a token that does not exist on
that network, a token without a network, or an amount that is not a positive number are all
rejected at create time rather than surfacing at settlement.
Deposit statuses
Status
Set by
Meaning
pending
the session
Created; no payment transaction submitted yet.
processing
the session
Payment transaction submitted; waiting for confirmations.
completed
the chain listener
Reached the required confirmation depth. This is when you credit.
failed
the chain listener
Settlement was unsuccessful.
Confirmation depth is amount-based: larger deposits wait for more blocks. The listener matches a
payment by orderRef (which is keccak256(session_id)) and falls back to
the transaction hash, so a deposit reconciles even if the browser never reported the hash.
Webhooks are the way to learn the outcome. If one never arrives — your endpoint was down through
every retry — read the session with /v1/direct/status
and credit from its status, deduplicating on external_order_id exactly
as the webhook handler does.
Webhooks in this flow
Each is a POST to your callback URL, signed with your API key secret. Verify it as described in
Verifying the signature, deduplicate on
X-Idempotency-Key and answer any 2xx.
Any 2xx marks the delivery successful. Anything else is retried with backoff: 30s, 1m, 2m … 1h, up to 8 attempts.
POSTpayment.failedno signature
A deposit failed
Sent to your callback URL when a deposit session ends without a valid payment. failure_code is one of abandoned, not_found, stuck, reverted or rejected; failure_reason is human-readable and may change. Do not credit the player. Signed with your API key secret. Deduplicate on X-Idempotency-Key.
Body
{
"event": "payment.failed",
"session_id": "01J8ZQ9D2F6H0K3M7P1S4V8Y5B",
"merchant_id": "acme-shop",
"player_id": "player-77421",
"amount": "250.000000",
"status": "failed",
"failure_code": "abandoned",
"failure_reason": "session expired before a payment was seen",
"occurred_at": "2026-08-05T13:12:07Z"
}
Response 200
Any 2xx marks the delivery successful. Anything else is retried with backoff: 30s, 1m, 2m … 1h, up to 8 attempts.