Skip to main content

Get Balance

The getBalance interface allows merchants to query their account balance, providing detailed information about available, frozen, and total balance amounts.

This interface is used to query the member account balance.

API URL

Request

Http Header

Attributes
  • Content-Language String

    • Language in which the response message will be used.
    • Currently, only English is supported.
    • Example value: en
    • Maximum length: 10
  • Content-Type String Required

    • Media type of the request body.
    • Required for operations with a request body.
    • Format: application/<format> (e.g., application/json)
    • Example value: application/json
  • sign String Required

    • Request signature using private-key cryptography.
    • Ensures the payment gateway can verify the request origin.
  • Partner-Id String Required

    • Merchant ID of your account.
    • Example value: 200001200101
    • Maximum length: 12

Http Body

  • requestTime Timestamp(3) Required

    • Example value: 1581493898000
  • bizContent GetMemberBalanceRequest Required

    • currencyCode String Required
      • Example value: AED

Request Sample

Http Header
{
"Content-Language": "en",
"Content-Type": "application/json",
"Partner-Id": "200000018128",
"sign": "RXF8WmC67QSnr62l3oU33fjpUvAo6Yrgvk05c/vYLtmHRGMoAH4qSnap2pto3mY7KgyP5wkNUsyQXJ/ZwbfccSONLb5zA7Z7q74IsOwdJw3BKXxVWr4tfjkA02Pfcp0cZWjE/Y8jTcbtgdc5VI90LNmkgPWbrSlDbNW8p3NlhnKg+Xfl95SgMBPF9afttsU/2a5jLnZXSVcXoSthxpJ6XkZwd45+jhOjBguT+IC8uLVSNRvwDisRGgf9PYv39OH6ITEhbY2sgjkdzBZBOZlt7awy2vkMEsePsuafwrNhuz7xzjj55PzNzk8+zCUu/791OhC/eFUyGimtDw5mX9cyQw=="
}

Http Body
{
"bizContent":{
"currencyCode":"AED"
},
"requestTime":1708485334645
}

Response

Http Header

sign String Required

Note: The body field in the HTTP Body is returned only when:

- `applyStatus` is `SUCCESS`
- `code` is `0`

HTTP Body

  • applyStatus String

    • Example value: "SUCCESS"
  • code String

    • Example value: "0"
  • msg String

    • Example value: "SUCCESS"
  • success Boolean

    • Example value: true
  • traceCode String

    • Example value: "375099"

Body

  • memberId String

    • Example value: "200000030907"
  • balanceList Array of Balance Objects

    • availableBalance Object

      • amount Number

        • Example value: 897993.88
      • currency String

        • Example value: "AED"

Response Sample

// Http Header
{
"sign": "nDdClX1tAyV3qcX/Epay6AXFNRGSsWd8ysWO9SgwPrNTetSePLA9C39mGp6qRbjJeqXLEnYLwSkBu5eKdtyVX3tflGLiV2kvRjVfYpTCjXdVL2Pcnv2w+ghjHe2jL988iklk7q5AjAgdtXNphpHcTes9pk6W3bVCbvijH6at0fExUtZ91L1LrnPGELT1IJm/lFW3w4KLh0Gxs7FzDPI9RDfUemObNlRzV8kCtkWahwPgs/hBnS69GyYDKN7ihQX2UiLuP239wl6IA+VG/ZZKHPhLs8bbuOS+LKWORIp6jRt+JsAx7c/Ot1RNyOnHKxPRKJ8bVTohEp39yUz/HwG8oA=="
}

// Http Body
{
"body":{
"balanceList":[
{
"availableBalance":{
"amount":897993.88,
"currency":"AED"
}
}
],
"memberId":"200000030907"
},
"head":{
"applyStatus":"SUCCESS",
"code":"0",
"msg":"SUCCESS",
"success":true,
"traceCode":"375099"
}
}

Response Codes

CodeMessageCauseWorkaround
0SUCCESSsuccess
400INVALID_PARAMETERParameter errorAdjusting request parameters
400REQUESTTIME_TOO_EARLYThe request time is greater than the current time Too earlyAdjust request time
400REQUESTTIME_TOO_LATERThe request time is greater than the current time Too lateAdjust request time
402RATE_LIMIT_REJECTToo many requestsReduce request frequency
403UNAUTHORIZEDAPI not authorizedContact PayBy
404SERVICE_NOT_AVAILABLEAPI service unavailableContact PayBy
500SYSTEM_ERRORsystem errorContact PayBy later Retry
504SERVICE_TIMEOUTService timeoutTry again later
601RISK_FAILRisk control verification failedPlease adjust your business
78001CURRENCY_CODE_NOT_SUPPORTEDThe currency is not supported.Adjusting request parameters