/api/v2/checkoutCreate Order
Create a new crypto payment order or pending payment bill from the merchant backend. On success, the API returns cregis_id (the Cregis system transaction ID, which must be stored) and checkout_url (a time-limited checkout link).
Rate limit: 1000 requests/minute
Request
Request Body
required
application/jsonnoncestringrequired6-character random string.
pidinteger<int64>requiredUnique Cregis ID of this acquiring project.
signstringrequiredDigital signature for this API request to prevent unauthorized requests. See the Signature Rules section.
timestampinteger<int64>required13-digit Unix timestamp format.
order_amountstringrequiredTotal payment amount. If
order_currencyis a fiat currency, the amount is calculated in fiat; iforder_currencyis a cryptocurrency, the amount is calculated in cryptocurrency.order_currencystringrequiredSee the Order Currency List.
- If the order currency is a cryptocurrency, examples include USDT and ETH.
- If the order currency is fiat, enter the ISO 4217 3-letter currency code, such as HKD or USD.
order_idstringrequiredMerchant internal order ID. Maximum 128 characters.
payer_idstringrequiredPayer ID.
valid_timeintegerrequiredUnit: minutes (integer from 10 to 1440).
Order validity period. After the validity period expires, the order can no longer be paid.
success_urlstringrequiredAfter payment succeeds, when the payer clicks the "Return to Store" button, the payer is redirected to this URL. Make sure the URL includes
http://orhttps://.cancel_urlstringrequiredIf the payer does not pay or clicks the "Cancel" button, they are redirected to this URL. Make sure the URL includes
http://orhttps://.order_detailsstring<json>Order item details, including price, quantity, and product description. This is displayed in the order details section on the Cregis checkout page.
JSON 内部字段application/jsonshopping_costnumberShipping cost.
tax_costnumberSales tax.
sub_merchantstring<json>Merchants can use this field to record an internal sub-merchant ID.
JSON 内部字段application/jsonsub_merchant_idstringUnique sub-merchant ID.
sub_merchant_namestringMerchant name.
payer_emailstringPayer email. Required if
accept_partial_paymentoraccept_over_paymentisfalse.tokensstringThis field restricts the tokens that you allow customers to pay with. If left empty, all supported tokens are accepted as payment tokens. See the Payment Currency List.
For parameter values, refer to the payment currency and payment network units on the payment and settlement parameters page, for example USDT-BEP20 and USDT-TRC20.
payer_namestringPayer name. Maximum 32 characters.
stablecoin_realtime_ratestringdefault: "false" · enum: "true", "false"Default: false
- falseUSDT/USDC to USD uses a fixed 1:1 exchange rate.
- trueUSDT/USDC to USD uses the real-time exchange rate from CoinMarketCap.
underpaid_tolerancenumber<float>default: 0Partial-payment limit. The lower tolerance for the payment amount accepted by this order, denominated in
order_currency. Default:0.This lower tolerance is used to calculate the minimum acceptable payment amount for the order. Status rules:
- paid
order_amount - underpaid_tolerance <= actual payment amount <= order_amount + overpaid_tolerance - partial_paid
actual payment amount < order_amount - underpaid_tolerance - overpaid
order_amount + overpaid_tolerance < actual payment amount
Example: if
order_currencyis HKD andunderpaid_toleranceis 3.50:- paidthe order is underpaid by 3.50 HKD or less
- partial_paidthe order is underpaid by more than 3.50 HKD
- paid
overpaid_tolerancenumber<float>default: 0Overpayment limit. The upper tolerance for the payment amount accepted by this order, denominated in
order_currency. Default:0.This upper tolerance is used to calculate the maximum acceptable payment amount for the order. Status rules:
- paid
order_amount - underpaid_tolerance <= actual payment amount <= order_amount + overpaid_tolerance - partial_paid
actual payment amount < order_amount - underpaid_tolerance - overpaid
order_amount + overpaid_tolerance < actual payment amount
Example: if
order_currencyis HKD andoverpaid_toleranceis 3.50:- paidthe order is overpaid by 3.50 HKD or less
- overpaidthe order is overpaid by more than 3.50 HKD
- paid
accept_partial_paymentstringdefault: "true" · enum: "true", "false"Default: "true"
- falseif the order does not accept partial payments and the actual payment amount is less than
order_amount, the payer must top up the order or proceed with a refund. - trueif the order accepts partial payments, the payer does not need to top up or refund.
- falseif the order does not accept partial payments and the actual payment amount is less than
accept_over_paymentstringdefault: "true" · enum: "true", "false"Default: "true"
- falseif the order does not accept overpayments and the actual payment amount is greater than
order_amount, the payer must refund the difference. - trueif the order accepts overpayments, the payer does not need to refund the difference.
- falseif the order does not accept overpayments and the actual payment amount is greater than
callback_urlstringCregis sends order status update notifications to this callback URL. For callback details, see Order Payment Notification.
languagestringdefault: "en" · enum: "en", "tc", "sc"Default: en
Specifies the default language for the checkout or email. Available values:
- enEnglish
- tcTraditional Chinese
- scSimplified Chinese
remarkstringMerchant remark for this payment order. Maximum 256 characters.
Responses
200Successapplication/jsoncodestringResponse code.
msgstringResponse message.