Cregis Developer Docs
POST/waas/order/v1/create_order

Create Order

Creates a crypto payment order and returns a unique cregis_id and payment addresses. Cregis pushes notifications to callback_url if configured; query the order by cregis_id to track its progress.

Error handling: See WaaS Order Mode Error Codes.

Request

Request Body

required

application/json
  • noncestringrequired

    6-character random string.

  • timestampinteger<int64>required

    13-digit Unix timestamp (milliseconds).

  • signstringrequired

    Digital signature for this request to prevent unauthorized requests. See the authentication guide.

  • pidinteger<int64>required

    Project ID — found under the project's settings.

  • order_amountstringrequired

    Order amount, up to 10,000,000 and greater than the order currency's minimum service fee (non-crypto: US$1 equivalent). Maximum 32 characters; decimal precision follows order_currency. See supported currencies and precision.

  • order_currencystringrequired

    Order currency: fiat (such as USD or HKD) or crypto (such as USDT or ETH). Maximum 32 characters. See supported currencies and precision.

  • tokensstring<json>

    Restrict accepted crypto tokens using a JSON string, such as "[\"USDT-TRC20\",\"USDT-BEP20\"]". Serialize to a JSON string before signing. If omitted or empty, all configured currencies are returned; otherwise, only the intersection with configured transfer-wallet currencies is offered. See supported currencies and precision.

    JSON fieldsapplication/json

    Array items · string

    string
  • callback_urlstring

    Callback URL for order and refund notifications. Must start with http:// or https:// and contain no more than 256 characters. If provided, order and refund status notifications are sent to this URL; if omitted, order and refund callbacks are not sent. Payment-exception notifications are sent to the payment-exception callback URL configured in the Cregis client.

  • valid_timeinteger
    default: 60

    Order validity in minutes. Range: 10–1440; default: 60.

  • stablecoin_realtime_rateinteger
    default: 0 · enum: 0, 1

    Stablecoin rate mode: 0 = use a 1:1 stablecoin-to-USD rate; 1 = use the real-time rate. Default: 0.

  • underpaid_tolerancestring
    default: "0"

    Underpayment tolerance amount, in the same format as order_amount and with order_currency decimal precision. Range: 0–10,000,000; default: 0; maximum 32 characters. This is an amount in the order currency, not a percentage. See supported currencies and precision.

    Note: To accept all payments less than the order amount, set this value to 10000000 (10,000,000).

  • overpaid_tolerancestring
    default: "0"

    Overpayment tolerance amount, in the same format as order_amount and with order_currency decimal precision. Range: 0–10,000,000; default: 0; maximum 32 characters. This is an amount in the order currency, not a percentage. See supported currencies and precision.

    Note: To accept all payments greater than the order amount, set this value to 10000000 (10,000,000).

  • languagestring
    default: "en" · enum: "en", "sc", "tc"

    Checkout and email language: en = English, tc = Traditional Chinese, sc = Simplified Chinese. Default: en.

  • merchant_order_idstring

    Merchant order number; uniqueness is not required. Maximum 128 characters.

  • remarkstring

    Merchant remark, up to 256 characters.

  • checkout_pagestring<json>

    Checkout settings object, serialized to a JSON string before submission and signing. Expand to view its fields.

    JSON fieldsapplication/json
    • success_urlstring

      Redirect URL after successful payment. Must start with http:// or https://; maximum 256 characters. Provide it together with cancel_url to generate a checkout page and receive checkout_url.

    • cancel_urlstring

      Redirect URL when payment expires or an AML issue is triggered. Must start with http:// or https://; maximum 256 characters. Provide it together with success_url.

  • payerstring<json>

    Payer information object, serialized to a JSON string before submission and signing. Expand to view its fields.

    JSON fieldsapplication/json
    • payer_idstring

      Payer ID, up to 128 characters.

    • payer_namestring

      Payer name, up to 128 characters.

    • payer_emailstring

      Payer email, up to 256 characters. Refund and additional-payment notifications are sent here if provided; otherwise, no notification emails are sent.

  • sub_merchantstring<json>

    Sub-merchant information object, serialized to a JSON string before submission and signing. Expand to view its fields.

    JSON fieldsapplication/json
    • sub_merchant_idstring

      Sub-merchant unique ID, up to 128 characters.

    • sub_merchant_namestring

      Sub-merchant name, up to 128 characters.

Responses

200Success
application/json
  • codestringrequired

    Return code. 00000 indicates success; other codes indicate an error. See WaaS Order Mode Error Codes.

  • msgstringrequired

    Response message.

  • datarequired
    • cregis_idinteger<int64>

      Unique Cregis order ID.

    • created_timeinteger<int64>

      Order creation time (13-digit Unix timestamp).

    • expire_timeinteger<int64>

      Order expiry time (13-digit Unix timestamp).

    • order_amountstring

      Echo of the submitted order amount.

    • order_currencystring

      Echo of the submitted order currency.

    • tokensarray<string>

      Echo of submitted tokens as an array; returns an empty array if not submitted.

    • callback_urlstring | null

      Echo of the submitted callback URL; returns null if not submitted.

      Match one event payload shape

      Option 1 · string
      string
      Option 2 · null
      null
    • valid_timeinteger

      Echo of the submitted validity; returns the default value if not submitted.

    • stablecoin_realtime_rateinteger

      Echo of the submitted stablecoin rate flag; returns the default value if not submitted.

    • underpaid_tolerancestring

      Echo of the submitted underpayment tolerance; returns the default value if not submitted.

    • overpaid_tolerancestring

      Echo of the submitted overpayment tolerance; returns the default value if not submitted.

    • languagestring

      Echo of the submitted language; returns the default value if not submitted.

    • merchant_order_idstring | null

      Echo of the submitted merchant order number; returns null if not submitted.

      Match one event payload shape

      Option 1 · string
      string
      Option 2 · null
      null
    • remarkstring | null

      Echo of the submitted remark; returns null if not submitted.

      Match one event payload shape

      Option 1 · string
      string
      Option 2 · null
      null
    • checkout_pageobject | null

      Returns checkout settings and checkout_url when both success_url and cancel_url were provided; otherwise returns null.

      Match one event payload shape

      Option 1 · object
      • checkout_urlstring

        Checkout page URL returned by Cregis.

      • success_urlstring

        URL to redirect the payer after successful payment.

      • cancel_urlstring

        Redirect URL when payment expires or an AML issue is triggered.

      Option 2 · null
      null
    • payerobject | null

      Echo of the submitted payer object; returns null if not submitted.

      Match one event payload shape

      Option 1 · object
      • payer_idstring | null

        Payer's unique identifier. Returns null if not submitted.

        Match one event payload shape

        Option 1 · string
        string
        Option 2 · null
        null
      • payer_namestring | null

        Payer's name. Returns null if not submitted.

        Match one event payload shape

        Option 1 · string
        string
        Option 2 · null
        null
      • payer_emailstring | null

        Payer's email address. Returns null if not submitted.

        Match one event payload shape

        Option 1 · string
        string
        Option 2 · null
        null
      Option 2 · null
      null
    • sub_merchantobject | null

      Echo of the submitted sub-merchant object; returns null if not submitted.

      Match one event payload shape

      Option 1 · object
      • sub_merchant_idstring | null

        Sub-merchant ID. Returns null if not submitted.

        Match one event payload shape

        Option 1 · string
        string
        Option 2 · null
        null
      • sub_merchant_namestring | null

        Sub-merchant name. Returns null if not submitted.

        Match one event payload shape

        Option 1 · string
        string
        Option 2 · null
        null
      Option 2 · null
      null
    • payment_infoarray

      Payment options for the intersection of configured transfer-wallet currencies and tokens; if tokens is empty, all configured currencies are returned.

      Array items

      • payment_addressstring

        Address where the payer should send funds.

      • token_symbolstring

        Token symbol.

      • blockchainstring

        Blockchain name.

      • token_namestring

        Full token name including chain.

      • logo_urlstring

        URL of the token logo.

      • token_decimalsinteger

        Token decimals.

      • order_amount_in_payment_currencystring

        Order amount converted to the payment currency.

      • payment_currencystring

        Payment currency symbol.

      • exchange_ratestring

        Exchange rate used for conversion.

      • consolidated_qrcodesarray

        Wallet-specific QR codes.

        Array items

        • wallet_namestring

          Wallet name.

        • qrcodestring

          QR code URI for the wallet.

        • wallet_iconstring

          URL of the wallet icon.

    • statusstring
      enum: "new", "additional_payment_required", "paid", "transferred", "cancelled", "expired"

      Order status.

      • newNew order created.
      • additional_payment_requiredPartial payment received; top-up needed.
      • paidFully paid.
      • transferredBulk-transferred to the merchant wallet.
      • cancelledCancelled (full refund or AML).
      • expiredTimed out without full payment.
  • okboolean

    Whether the request succeeded.