Skip to main content
AllScale Open API
Version: v5
Last updated: 2026-10-02
Base Path: /v1/checkout_intents

Overview

The Checkout Intent API allows merchants to create a checkout intent and obtain a hosted payment URL. This API is used to:
  • Create a checkout intent
  • Generate a hosted checkout URL
  • Price the order in either a fiat currency (converted to stable coin at the current FX rate) or natively in a stable coin (no FX, 1:1)
  • Receive stable-coin–based settlement

Important Design Notes

  • All enum values are represented as integers in API requests and responses
  • API consumers must always send and receive integer values
  • USDT and USDC are supported as settlement stable coins

Authentication

All requests must include the following headers:

Notes

  • X-Nonce must be unique per request
  • X-Timestamp must be within allowed time window
  • Signature must be generated using raw request body bytes
  • Requests are protected against replay attacks

POST /v1/checkout_intents/

Description

Create a checkout intent and return a hosted checkout URL.

Request

POST /v1/checkout_intents/

Headers

Body Example — Fiat pricing (FX-converted)

Body Example — Native stable-coin pricing (no FX)

amount_cents is interpreted as stable-coin “cents”: 1000 = 10.00 USDT. currency_rate on the resulting intent is null because no FX conversion happens.

Request Fields

⚠️ Important
  • Exactly one of currency or stable_coin must be set. Sending both, or neither, returns a 10001 validation error.
  • currency and stable_coin must be integer values (Appendix A / B). Do NOT pass "USD" or "USDT" strings.
  • For native stable-coin pricing, USDT (1) and USDC (2) are accepted. Other stable-coin enum values are reserved for future rollout and will be rejected.
  • The payment amount must be greater than 0.1 USDT / 0.1 USDC. Orders at or below this floor are rejected with a 50002 error of the form amount must be greater than 0.1 <coin>, where <coin> is the resolved settlement coin name (USDT or USDC).
  • Test stores have a lower floor: the minimum is 0.01 coin, and orders at or below 0.1 coin carry no service fee (see “Test Stores” below).
  • For fiat-priced orders that should settle in a specific stable coin, send accepted_stable_coins — the first entry picks the settlement coin used for FX conversion. Example: "currency": 1, "accepted_stable_coins": [2] settles a USD-priced order in USDC. Without accepted_stable_coins the FX target defaults to USDT (the merchant’s store/business accepted_stable_coins setting controls only which coins the payer may settle in via the response bitflag — it does not influence the FX target coin).
  • accepted_stable_coins must be non-empty when provided and contain only valid StableCoin enum values; otherwise the request is rejected with 10001.

Successful Response


Response Fields


Possible Errors


Notes

  • All enum values are integers
  • Do not send string enum names
  • Nonce must be unique per request
  • Timestamp must be UTC
  • Always log request_id for debugging

Test Stores — Simulating Payment Outcomes via currency

A test store (also called a sandbox store — is_sandbox = true in the dashboard) lets you rehearse every checkout outcome, including the ones you cannot trigger on demand in production: KYT rejection, refund, stuck settlement and forwarding failure. On a test store the currency field of POST /v1/checkout_intents/ doubles as a scenario selector. The payer still sends real USDT to the deposit address; the outcome after the funds arrive is overridden by the currency you chose when creating the intent. Production stores are not affected. There currency is only the pricing currency and every intent follows the normal flow.

How the override works

  1. The underpaid check runs first, for every currency. Paying less than amount_coins always ends in UNDERPAID (-3) with an automatic refund — identical to production.
  2. A full payment is then replaced by the scenario for the currency:
Status integers refer to the Checkout Intent Status enum (3 TEMP_WALLET_RECEIVED, 4 PENDING_MANUAL_OPERATION, 5 SEND_BACK, 10 ON_CHAIN, 20 CONFIRMED, -1 FAILED, -2 REJECTED, -3 UNDERPAID).

What to verify in your integration

  • One message per terminal state. REJECTED, FAILED and UNDERPAID are different outcomes for your customer; do not collapse them into one generic failure.
  • PENDING_MANUAL_OPERATION (4) is not terminal. It does not advance on its own; AllScale operations may later complete it to CONFIRMED. Your poller must stop on its own timeout and must not treat 4 as a failure.
  • SEND_BACK (5) means a refund is in flight. Keep the order pending until -2 or -1 arrives.
  • The webhook fires only on CONFIRMED. Its payload carries status = 20. No webhook is sent for rejection, refund or failure, so order state for those scenarios must come from GET /v1/checkout_intents/{checkout_intent_id}/status or the full intent object.
  • Reconciliation fields. On the full intent, actual_paid_amount is populated in every scenario where funds arrived (CNY, AUD, SGD, HKD); net_income_amount is only meaningful on CONFIRMED.
Timing. USD, CNY, AUD and HKD resolve as soon as the payment is observed on-chain. SGD reaches PENDING_MANUAL_OPERATION only when the stalled-payment sweep picks the intent up, about 10 minutes after the funds arrive. Amounts. A test store accepts orders from 0.01 coin (production requires more than 0.1), and charges no service fee on orders at or below 0.1 coin. A 0.1 USD intent is enough to exercise every scenario. Additional points before you rely on the scenario map:
  • The scenario is selected by currency alone. It does not depend on the store’s risk-screening setting (a test store with screening off still returns REJECTED for CNY, because the scenario is applied before screening runs), and it applies on every chain the store accepts.
  • An intent priced natively in a stable coin carries no currency, so it follows the USD path. Send currency if you want to select a scenario.
  • CNY refunds on-chain. The refund is a real transfer back to the paying address; SEND_BACK (5) → REJECTED (-2) once it confirms. For HKD and AUD the funds stay in the intent’s ephemeral wallet and are released by manual recovery, as in production.

Other test-store differences

Move to a production store once your integration is stable.

Appendix A — Currency Enum (IntEnum)


Appendix B — StableCoin Enum (IntEnum)


✅ Current Behavior Successful checkout intents return stable_coin_type equal to the resolved settlement coin:
The value matches whichever supported coin was selected by the merchant via stable_coin (native pricing) or accepted_stable_coins (fiat pricing fallback order). Defaults to 1 (USDT) when neither is set.
End of document.