Transaction
Process a member’s deposit or withdrawal transaction.
API Information
- URL:
POST /v2/members/transaction - Authentication:Bearer Token
- Encryption:Requests are encrypted using AES-256-GCM; responses are returned as plaintext JSON
request
request Headers
POST /v2/members/transaction HTTP/1.1
Host: api.example.com
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
x-agentid: integratorNBTest04
x-timestamp: 1769746894501
x-nonce: 56ffd5ecd8a3a4457863a0bd7c298fb2
x-signature: 904e97bee2589b93e9747eed0346c68b23d8ff8b568dabaf4b94a5e89093df67
Request Parameters
Request Body Before Encryption
{
"username": "testacoount001",
"amount": 10,
"transId": "2c205e4f-c922-4967-8e45-f14480a2f075"
}
Encrypted Request Body
{
"cipherText": "G0ZMDELeJwx+7JcIfIFOLJjkSzANPu6krGM2uw==..."
}
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Player Account |
transId | string | Yes | Transaction id |
amount | number | Yes | Describe the change value that will be written to the balance, Positive means deposit, Negative means withdraw |
Response
Success Response
{
"code": 0,
"message": "No error.",
"data": {
"amount": 10,
"balance": 2323.582,
},
"logUUID": "fff937f4-b436-496e-baeb-6dfaa4743e43"
}
| Field | Type | Description |
|---|---|---|
code | number | Status code |
message | string | Status message |
data.amount | number | Transfer amount |
data.balance | number | Player's balance after transaction |
logUUID | string | Request tracking ID for troubleshooting and log queries |
Error Response
{
"code": 3,
"message": "The transaction already exist.",
"logUUID": "6589bf8d-fe74-48bd-841a-71bf8f848f86"
}
Common Error Codes
| Code | Description |
|---|---|
| 2 | The balance is not enough |
| 3 | The transaction already exist |
| 8 | The member does not exist. |
| 11 | Parameters error |
| 19 | Invalid account |
| 20 | Member wallet is temporarily locked, please try again later |
| 35 | The transaction is pending |
| 83 | Authentication Failed |
| 84 | Decryption Failed |
Important Notes
- Transaction ID Uniqueness: Each
transIdmust be unique under the sameagentIdto prevent duplicate transactions - Currency Consistency: The transaction currency must match the currency set when the member was created
- Balance Check: The system will verify that the balance is sufficient before processing a withdrawal
- Idempotency: Using the same
transIdwill not result in duplicate execution