Skip to main content

Member Withdrawal

1. Member Withdrawal

Interface Path

  • POST
  • /api/wallet/withdraw

Description

  • For member withdrawals, if the status fails due to network issues or is pending, please confirm the transfer status through the query transfer interface after 10 seconds.
  • Amount precision:
USD:  2
VND: 2
VND2: 2
BRL: 2

Request Parameters

ParameterNameTypeRequiredDescription
agent_idMerchant IDstringRequiredMerchant ID
user_idMerchant User IDstringRequiredMerchant User ID
txn_idMerchant Generated Transaction IDstringRequiredMerchant Generated Transaction ID, ensure global uniqueness
amountWithdrawal AmountstringRequiredWithdrawal Amount
currencyCurrencystringRequiredCurrency
timestampCurrent TimestampintRequiredTimestamp when calling the interface (in milliseconds, valid for ten minutes)
signSignaturestringRequiredSignature algorithm details in the interface description

Response Parameters

ParameterNameTypeDescription
codeResponse CodeintError Code
messageResponse MessagestringError Message
dataResponse DatadictResponse Data Details
--txn_idMember Withdrawal Transaction IDstringMember Withdrawal Transaction ID

Request Example

curl --location 'https://staging.aig1234.com/api/wallet/withdraw' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "agent001",
"user_id": "testUid03",
"txn_id": "txnidymecij123",
"amount": "500.69",
"currency": "VND2",
"timestamp": 1732589849000,
"sign": "9fc914f6d05cfb8779c5ab4d43f77f7d"
}'

Response Example

{
"code": 200,
"message": "success",
"data": {
"txn_id": "txnidymecij123"
}
}

Error Codes

200 Success
408000 Request Parameter Error
408003 Whitelist Restriction
408004 API Frequency Limit
600100 Invalid Signature
700101 Merchant Does Not Exist
700103 Member Does Not Exist
700201 Member Wallet Does Not Exist
700202 Member Wallet Type Is Not Transfer Wallet
700203 Invalid Withdrawal Amount Parameter
700204 Member Withdrawal Failed
700208 Currency Error
700209 Transaction ID Already Exists