Skip to main content

Using Short Link

MixPay API for creating a one-time payment.

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 crypto, pls see Five 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. You can see the supported asset id in Quote Assets.
settlementAssetId*requiredStringassetId of settlement cryptocurrency. Settlement assets you prefer. But you need to pay attention to the strictMode field. For more options, see here.
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. You can see the supported asset id in Payment Assets.
remarkoptionalStringmaximum 50. Payment remark viewable by the payee.
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.
callbackEventoptionalStringSend settle or pending to subscribe more callback event. Please refer to Payment Callback.
expiredTimestampoptionalintSet a expired timestamp. This value must be greater than 10s and less than 2880min. 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"
// title: Response
"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