Skip to main content

5.2.1 Create a withdrawal order to MINPAY wallet

#Brief description: Withdraw RMB or digital currency to the withdrawal business interface of the wallet, allowing users to transfer the account balance to the specified wallet address

Request parameters
Parameter nameTypeRequiredParameter meaningParameter description
keystringYesMerchant keyapiKey
localOrderIdstringYesMerchant platform local order numberMerchant platform generates unique order number locally
localUserIdstringNoMerchant platform local user IDMerchant platform local user ID
amountnumberYesOrder AmountWithdrawal Amount
emailstringNoWithdrawal email addressUser email address (choose 1 with user ID2)
userIdstringNoUser IDUser Email (choose 1 with User ID2)
notifyUrlstringNoCallback addressAfter the order is placed successfully, the merchant's address will be notified by API callback (for callback details, please refer to Document 3)
currencystringYesSupported currencyCurrency (wallet supported currency)
successRedirectUrlstringNoAddressAutomatically jump to the address after success
expireSecondLongNoExpiration timestamp (seconds)
signstringYesSignatureSee Signature Algorithm for details
Request json sample
{
"key": "08SaKUwNafSOc8w7",
"localOrderId": "2023102400684344447",
"localUserId": "302199873005",
"email": "diamond8888@gmail.com",
"amount": "100",
"currency": "CNY",
"successRedirectUrl": "WWW.BAIDU.COM",
"notifyUrl": "www.baidu.com/notify/callback",
"sign": "41c48ea2951934626b4435f02aecf732"
}

Response json example

{
"code": 0,
"success": true,
"message": "string",
"data": {
"orderId": "2023102400684344447",
"localOrderId": "2023102400684344447",
"localUserId": "302199873005",
"withdrawBizType": "WITHDRAW_WALLET",
"orderType": "PAYMENT",
"toUserId": 4603
}
}
Response data parameter description
Parameter nameTypeParameter meaningRemarks
orderIdstringOrder ID
localUserIdstringMerchant local user ID
localOrderIdstringMerchant local order number
orderTypeenumOrder TypePAYMENT:支付订单WITHDRAW:提款订单
orderBizTypeenumOrder business typeorderBizType type description is as follows
toUserIdnumberPayment user IDMINPAY wallet user ID

orderBizType type description:

  1. PAYMENT_WALLET_SCAN MINPAY wallet scan code payment
  2. PAYMENT_TRANSFER digital currency binding address direct deposit
  3. PAYMENT_ANY_DIGITAL_SCAN Scan the QR code to pay any amount of digital currency
  4. WITHDRAW_WALLET withdraw money to MINPAY wallet
  5. WITHDRAW_ANY_DIGITAL_WALLET Withdraw digital currency to any wallet
  6. PAYMENT_FIXED_DIGITAL_SCAN digital currency limited amount scan code payment
  7. BATCH_PAY batch payment

Callback returns json data

By default, all callback parameters participate in signature verification. For details of callback parameters, please see callback ]

Callback data
{
"amount":"4",
"bizType":"WITHDRAW_WALLET",
"currency":"USDT",
"localOrderId":"conan41123",
"merchantActualAmount":"31.45",
"merchantCurrency":"USDT",
"merchantId":302992856974,
"merchantPaidAmount":"4",
"merchantUserId":"conan",
"notifyTime":1772364467800,
"orderCreateTime":1772364292167,
"orderId":"474083263103237",
"status":"SUCCESS",
"type":"WITHDRAW",
"userAmount":"28.37",
"userCurrency":"USDT",
"userReceivableAmount":"28.37",
"walletUserId":4603,
"sign":"bc92191367449df36920178e05731a6b",
"key":"9yUreYgTRtit39Dy"
}

When you receive the callback notification, please directly return the string success after the processing is completed, indicating that the message has been successfully received and processed. After the system receives the success response, it will no longer send the callback repeatedly. If the expected response is not received (success is not returned or an exception is returned), the system will resend the callback notification according to the stepped retry mechanism, retrying up to 14 times. The current retry intervals are: 15s, 15s, 30s,180s, 600s, 1200s, 1800s, 1800s, 1800s,3600s,10800s,10800s,21600s, 21600s