Skip to main content

Request

smilepayz teamsAbout 1 min

HTTP Request

Service Code11
NameAPI balance inquiry
Version2.0
HTTP MethodPOST
Path{Base URL}/v2.0/inquiry-balance

Header Parameters

AreaFieldAttributeTypeDescription
HeaderContent-TypeMStringapplication/json
X-TIMESTAMPMStringyyyy-MM-ddTHH:mm:ss[zoneOffset] eg: 2020-12-17T10:55:00+07:00
X-SIGNATUREMStringsignature
X-PARTNER-IDMStringmerchant Id

Tips

  • X-SIGNATURE = SHA256withRSA(private_key, stringToSign)
  • private_key is merchant rsa private key
  • stringToSign = X-TIMESTAMP + "|" + merchant_secret + "|" + minify(requestBody)
  • minify(requestBody) is convert the request parameters to JSON string, and then remove line breaks, spaces, and other escape characters.
  • we provide some development languages minify and SHA256withRSA demo. please refer to signature

Body Parameters

AreaFieldAttributeTypeDescription
BodyaccountNoMString(128)the account of merchant
balanceTypesMList(String)default BALANCE

Tips

  1. In sandbox you can fill random string , but if in prod you can find in merchant backend. detail clik how to get account no in productionthe balance of pay in is different from the payout
  2. you can find you account in merchant backend. Finace -> Balance' For the one merchant, there will be two accounts for the same currency: pay-in and pay-out.
  3. Pay in Account used to collect the amount of all pay-in business
  4. The payout account is used to indicate the account used for pay-out , whereas the balance indicates the amount that can be used for pay out.
  5. The balance between the payin account and the payout account can be transferred between them. refer to how to transfer

Example Header – Balance Inquiry Request:

POST {Base URL}/v2.0/inquiry-balance HTTP/1.2

Content-type: application/json
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 20001
{
  "accountNo": "21220030202403071031",
  "balanceTypes": [
    "BALANCE"
  ]
}
Last update: