Linkage

Balance Inquiry

Balance Inquiry is a service that displays the available balance in E-Wallets such as OVO, Gopay, CIMB, Dana, and ShopeePay. This service allows your system to check the registered balance directly through API integration, ensuring the balance is accurately and promptly available for transaction purposes.

Type Value
Service Code
11
Name
API Balance Inquiry
HTTP Method
POST

Flow

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

Environment

Environment URL
Sandbox
Port of HTTPS (443)
https://sandbox-api.espay.id/apidirectdebit/v1.0/balance-inquiry
Production
Port of HTTPS (443)
https://api.espay.id/apidirectdebit/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 (150)
C
Access Token B2B2C. Espay -> Bank
Y: Yes, O: Optional, C: Conditional

Request Parameters​

Parameter Type Mandatory Description
partnerReferenceNo
String (64)
Y
Merchant reference code.
bankCardToken
String (128)
C
Card token for payment.
additionalInfo
Object
  productCode
String (64)
O
Product code. Click here
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

Example:
200+11+00 = 2001100.
responseMessage
String (150)
Y
Response description.
accountInfo
Object
  balanceType
String (70)
Y
Types of balance in the account.
  availableBalance
Object
    value
String (16.2)
Y
Account balance that can be used for transaction.

Format:
Desimal .00 (ISO 4217)

Example:
150000.00
    currency
Object
Y
Transaction currency code.

Format:
  • Rupiah: IDR
Y: Yes, O: Optional, C: Conditional




























Sample Header

content-type:application/json
X-TIMESTAMP:2024-03-14T07:49:28+07:00
X-SIGNATURE:jaCUbDOSIjFcDaZ1rO0aCczJrWSfV0wAXVi/zOLlOLOIVH00gucOSOnHpKTARwpnn6qB08Vi8VJviNhIQh1q6zVJAwdhxnHRlwNFa28IVFTtSmD4nXPWT3LsuYuFPNDGJ59/MgKMVjwIofYvq2dwOHoDi9rnyT3nPl7N2bRdIQceQlD6sITcqdEbRUlm+zTFB2MxNy4vFaEZz1LU8fsENp+giMNqxR26DsNcRj1K8JBXO6nY8q2m3jmTmiduXK5VZXxt/5v6bp+OlYCwJhn3hmdZD1zwC3Hu6qZcCIhO6IVe0ThSCfsaCdye9o/Ew6VdMWbTtQUoR983mq6MubLmzg==
X-EXTERNAL-ID:d3be5aec-155b-4b46-bfee-3fd55363d0f4
X-PARTNER-ID:SGWYESSISHOP
CHANNEL-ID:ESPAY
             



























Sample Request

{
    "partnerReferenceNo":"uiiie182i4124o",
    "bankCardToken":"ESP230120035941IOIivjYrN3sVEViu8",
    "additionalInfo":{
        "productCode":"OVOLINK"
    }
}

             





Sample Response

{
    "responseCode": "2001100",
    "responseMessage": "Request has been processed successfully",
    "accountInfo": [
        {
            "balanceType": "CASH",
            "availableBalance": {
                "value": "19992334.00",
                "currency": "IDR"
            }
        },
        {
            "balanceType": "POINTS",
            "availableBalance": {
                "value": "1000000.00",
                "currency": "IDR"
            }
        }
    ]
}
              





CURL


curl --location 'https://sandbox-api.espay.id/apidirectdebit/v1.0/balance-inquiry' \
--header 'X-TIMESTAMP: 2024-03-14T07:49:28+07:00' \
--header 'X-SIGNATURE: B0VF16Vjsxxb/rUcgZM401XH7Z9cB5mhmYnfMdkblq84akTybh9Bakmb9nJD/ttrADmUbDJDW7s6E7yYTEATCdbjPs3+xEgA53gdcM7aJP9qPcfe79GankZrRvROcICdxuN2rjYZOuzvJ9SrfG/llmGic1bM627Eiz/G4pf7e8r6MOfsBRoUqH+moBGcw+/Xh2V8hqfb64hIzb7JZNZnVV7fQN6NZ8VAWLzjmo8PFLjg390wL3Fybr0GJwHohCaxBhv6P0nxVP+P9psnljKWt8EYHHWizgSVinUa9kncRq2MEpvLwujGcSG/MteZhcKXXYNGbCO5u7qato19fWwxaw==' \
--header 'X-EXTERNAL-ID: c1c915c4-a93e-407b-b770-f09720174be4' \
--header 'X-PARTNER-ID: SGWYESSOSHOP' \
--header 'CHANNEL-ID: ESPAY' \
--header 'Content-Type: application/json' \
--data '{
    "partnerReferenceNo":"uiiie182i4124o",
    "bankCardToken":"ESP230120035941IOIivjYrN3sVEViu8",
    "additionalInfo":{
        "productCode":"OVOLINK"
    }
}'  





Scroll to Top