Using Short Link

POST /one_time_payment

This payment method needs to request the API to generate a code before it can be used, and is suitable for scenarios where only one payment is allowed.

This is the recommended way to use in production. Please checkout the Security Guidelines .

Endpoint URL


payeeId*requiredStringAccount ID for receiving money, pls see Three types of account and How to get payeeId .
quoteAmount*requiredNumericCorresponding to the amount of quoteAssetId. For example, the current commodity value is 10 USDT
quoteAssetId*requiredStringassetId of quote cryptocurrency.
settlementAssetId*requiredStringassetId of settlement cryptocurrency. Settlement assets you prefer. But you need to pay attention to the strictMode field.
strictModeoptionalBooleanDefault false. true means that the payment must be settled strictly according to the currency set by settlementAssetId. See here for more details.
paymentAssetIdoptionalStringassetId of payment cryptocurrency.
remarkoptionalStringmaximum 50. Payment remark viewable by the payee.
expireSecondsoptionalNumericDefault 86400, minimum 1, maximum 31536000. After this time, the code obtained by the interface will become invalid.
traceIdoptionalStringUUID, used to prevent double payment and checking the payment result. It is also used to set the code you will get.
orderId*required if no traceIdStringUnique in your system. String lengths between 6-36 must be letters, numbers, dashes and underscores and NOT space. orderId and payeeId make a payment unique.
settlementMemooptionalStringmaximum 200. A memo is similar to Mixin Snapshots, this parameter you can customize.
returnTooptionalStringAfter successful payment, the URL page will want to redirect to. Useful when you are in a browser JavaScript environment.
failedReturnTooptionalStringAfter payment failure, the URL page will want to redirect to. Useful when you are in a browser JavaScript environment.
callbackUrloptionalStringAfter payment successfully, MixPay will issue a POST request to this URL on our server-side. For security reasons, URLs only support HTTPS and has to be URL encoded . Please refer to Payment Callback .
expiredTimestampoptionalintSet a expired timestamp . This value must be greater than 10s and less than 240min. After this period, the payment result status field will be marked as failed, and the failureReason will be Payment overtime. If you are not setting this value, the payer can have unlimited time to complete this payment.

Example request - One-Time Payment

curl -i -X POST \
-d "payeeId"="a0d7791408776b47eb1dd3f94ed15d6a" \
-d "settlementAssetId"="c6d0c728-2624-429b-8e0d-d9d19b6592fa" \
-d "quoteAssetId"="usd" \
-d "quoteAmount"="10" \
-d "isTemp"="1"
"code": 0,
"success": true,
"message": "",
"data": {
"code": "525502dd-e552-4505-b114-32fe32ff23c2"
"timestampMs": 1645411665245

This interface response is a short code; you can access it by