Disbursement

Balance Inquiry

Balance inquiry is a service that checks your latest balance in real-time.
Type Value
Service Code
11
Name
API Balance Inquiry
HTTP Method
POST

Flow

You send the required parameters to make a request, and Espay Disbursement will respond in JSON format.

API URL

Environment URL
Sandbox
Port of HTTPS (443)
https://sandbox-api.espay.id/api/v1.0/balance-inquiry
Production
Port of HTTPS (443)
https://api.espay.id/api/v1.0/balance-inquiry

Headers

Name Type Mandatory Description
Content-Type
String
Y
Content of your request body.

Example:
application/json
X-TIMESTAMP
String (25)
Y
Customer's current local date and time.

Format:
yyyy-MM-ddThh:mi:ssTZD (ISO 8601)

Example:
2024-03-14T07:49:28+07:00
X-SIGNATURE
String (255)
Y
Code used to validate transactions. Learn Signatures Asymmetric
X-EXTERNAL-ID
String (32)
Y
Numeric String. Reference number that should be unique on the same day.
X-PARTNER-ID
String (50)
Y
Merchant Code from Espay team.

Example:
SGWYESSISHOP
CHANNEL-ID
String (5)
Y
Channel id.

Value:
Espay
Authorization-Customer
String
Y
Access Token from B2B. Learn Access Token B2B

Format:
Bearer (access token).

Example:
Bearer ZDE1MTQxM2QwODE2Zj UyNjk3ZmY0NTA3ZDgwZ Tg2ZDcyNmQ4MTNlYw
Y: Yes, O: Optional, C: Conditional

Request Parameters

Parameter Type Mandatory Description
partnerReferenceNo
String (64)
Y
Unique reference code from merchant.
accountNo
String (16)
Y
Source account number.
bankCardToken
String (128)
C
Bank card token, mandatory if accountNo is null
balanceTypes
Array of String
O
Balance types.

Format:
  • BCA: ["Cash", "Coin"]
  • Danamon: Balance
  • Permata: Balance
Y: Yes, O: Optional, C: Conditional

Response Parameters

Parameter Type Mandatory Description
responseCode
String (7)
Y
Response Code.

Format:
HTTP code + Service code + Error code. Click here

Example:
200+11+00 = 2001100.
responseMessage
String (150)
Y
Response description.
referenceNo
String (16)
O
Reference code from bank.
partneReferenceNo
String (64)
O
Kode referensi merchant yang unik.
accountNo
String (32)
Y
Source account number.
name
String (140)
O
Source Account name.
accountInfos
Array of Object
  balanceType
String (70)
O
Balance types.

Format:
  • BCA: ["Cash", "Coin"]
  • Danamon: Balance
  • Permata: Balance
  amount
Array of Object
    value
String (16.2)
O
Total net balance.

Format:
Decimal .00 (ISO 4217)

Example:
150000.00
    currency
String (3)
O
Transaction currency code.

Format:
  • Rupiah: IDR
  floatAmount
Array of Object
    value
String (16.2)
O
Amount of deposit that is not effective yet (due to holiday, etc.)

Format:
Decimal .00 (ISO 4217)

Example:
150000.00
    currency
String (3)
O
Transaction currency code.

Format:
  • Rupiah: IDR
  holdAmount
Array of Object
    value
String (16.2)
O
Hold amount that cannot be used.

Format:
Decimal .00 (ISO 4217)

Example:
150000.00
    currency
String (3)
O
Transaction currency code.

Format:
  • Rupiah: IDR
  availableBalance
Array of Object
    value
String (16.2)
Y
Account balance that can be used for financial transaction.

Format:
Decimal .00 (ISO 4217)

Example:
150000.00
    currency
String (3)
Y
Transaction currency code.

Format:
  • Rupiah: IDR
  ledgerBalance
Array of Object
    value
String (16.2)
O
Account balance at the beginning of each day

Format:
Decimal .00 (ISO 4217)

Example:
150000.00
    currency
String (3)
O
Transaction currency code.

Format:
  • Rupiah: IDR
  currentMultilateralLimit
Array of Object
    value
String (16.2)
O
Credit limit of the account / plafon.

Format:
Decimal .00 (ISO 4217)

Example:
150000.00
    currency
String (3)
O
Transaction currency code.

Format:
  • Rupiah: IDR
  additionalInfo
Array of Object
    productCode
String (20)
O
Product code.

Format:
  • BRI: TV
  • CIMB: CAGIRO0016
    productDesc
String (256)
O
Product Description.

Format:
  • CIMB: Giro Perusahaan
    accountType
String (2)
O
Account types.

Format:
CIMB
  • Rekening Giro: CA
BRI
  • Saving: SA
  • Deposito: TA
  • Giro: DA
  • Loan: LA
  status
String (5)
O
Account status. Click here
Y: Yes, O: Optional, C: Conditional

Try It!

Anda bisa coba masukkan data sesuai dengan input yang telah disediakan. Setelah itu Anda submit dan lihat hasilnya!































Sample Headers

Content-Type:application/json
X-TIMESTAMP:2024-03-14T07:49:28+07:00
X-SIGNATURE:w1m7j0UGZxqPPyTZB2EZOF5Tpokp/PfHgcrnJq3NVQ9e8Q8vUmQ123c6CSqbTV/VRXxAVrQazEda9nMoJ/oIML7zZ/M1WUTRkv5RK/e+vLP+ZZAMDlgs8jM6RFerkCPUgkAKZ08yAePcgPCjipS3In4BrMa164bf+/rkuS3sGZ4YUNSfTn+uMdEzlO1aGMgm2ZRbJKq6JsNFweTNuWdecbktWsVQdSa0J3rC0DKGSc54LXScuv2ztzmLO/3rsJTUk17ZmSP6vbmc24h6LARbBnkYVeDTU8BLC62/41U3hgiv3CsX/DQ3IUvDCu+LYsxJCnkZJYZ/wwYHRqArUl6GzQ==
X-EXTERNAL-ID:d3be5aec-155b-4b46-bfee-3fd55363d0f4
X-PARTNER-ID:SGWYESSISHOP
CHANNEL-ID:ESPAY
Authorization:Bearer dPYxGvc5SSS8lETvpqRZ2hdM39fTNN3uhIZS5woAZb79ybGDDNAMeWVG2S7cp0USwx9TGcXN/0kzYGobeyzpdg==
             
































Sample Request

{
    "partnerReferenceNo":"2020102900000000001",
    "accountNo":"1234567890",
    "balanceTypes":[
        "CASH",
        "POINTS"
    ]
}

             










Sample Positive Response

{
    "responseCode": "2001100",
    "responseMessage": "Successful",
    "referenceNo": "2020102977770000000009",
    "partnerReferenceNo": "2020102900000000001",
    "accountNo": "1234567890",
    "name": "Andhika",
    "accountInfos": {
        "balanceType": "Cash",
        "amount": {
            "value": "100000.00",
            "currency": "IDR"
        },
        "floatAmount": {
            "value": "500000.00",
            "currency": "IDR"
        },
        "holdAmount": {
            "value": "200000.00",
            "currency": "IDR"
        },
        "availableBalance": {
            "value": "200000.00",
            "currency": "IDR"
        },
        "ledgerBalance": {
            "value": "200000.00",
            "currency": "IDR"
        },
        "currentMultilateralLimit": {
            "value": "200000.00",
            "currency": "IDR"
        }
    },
    "additionalInfo": {
        "productCode": "CAGIRO0016",
        "productDesc": "Giro Perusahaan",
        "accountType": "CA"
    }
}
              


Sample Negative Response

{
    "responseCode": "4011101",
    "responseMessage": "Invalid Token (B2B)"
}
              


CURL

curl --location 'https://sandbox-api.espay.id/api/v1.0/balance-inquiry' \
--header 'Content-Type: application/json' \
--header 'X-TIMESTAMP: 2024-03-14T07:49:28+07:00' \
--header 'X-SIGNATURE: w1m7j0UGZxqPPyTZB2EZOF5Tpokp/PfHgcrnJq3NVQ9e8Q8vUmQ123c6CSqbTV/VRXxAVrQazEda9nMoJ/oIML7zZ/M1WUTRkv5RK/e+vLP+ZZAMDlgs8jM6RFerkCPUgkAKZ08yAePcgPCjipS3In4BrMa164bf+/rkuS3sGZ4YUNSfTn+uMdEzlO1aGMgm2ZRbJKq6JsNFweTNuWdecbktWsVQdSa0J3rC0DKGSc54LXScuv2ztzmLO/3rsJTUk17ZmSP6vbmc24h6LARbBnkYVeDTU8BLC62/41U3hgiv3CsX/DQ3IUvDCu+LYsxJCnkZJYZ/wwYHRqArUl6GzQ==' \
--header 'X-EXTERNAL-ID: 2a087dae-2948-4d9b-b058-d09c7594a967' \
--header 'X-PARTNER-ID: SGWYESSISHOP' \
--header 'CHANNEL-ID: ESPAY' \
--header 'Authorization: Bearer dPYxGvc5SSS8lETvpqRZ2hdM39fTNN3uhIZS5woAZb79ybGDDNAMeWVG2S7cp0USwx9TGcXN/0kzYGobeyzpdg==' \
--data '{
    "partnerReferenceNo":"2020102900000000001",
    "accountNo":"1234567890",
    "balanceTypes":[
        "CASH",
        "POINTS"
    ]
}'
              
Scroll to Top