Get Balance
Retrieve your merchant wallet balance.
Endpoint
POST /api/disbursement/get-balance
Authentication
RSA-SHA256 X-SIGNATURE header. See Authentication.
Request
Headers
| Header | Required | Description |
|---|---|---|
X-SIGNATURE | Yes | Base64-encoded RSA-SHA256 signature |
Content-Type | Yes | application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
clientId | string | Yes | Your legacy_client_id |
Example
PHP
$body = json_encode(['clientId' => 'TEST_CLIENT_001']);
$bodyHash = hash('sha256', $body);
$stringToSign = "TEST_CLIENT_001|TEST_SECRET_001|$bodyHash";
openssl_sign($stringToSign, $rawSig, $privateKey, OPENSSL_ALGO_SHA256);
$xSignature = base64_encode($rawSig);
$ch = curl_init('https://api.nusio-saka.com/api/disbursement/get-balance');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-SIGNATURE: ' . $xSignature,
],
CURLOPT_POSTFIELDS => $body,
]);
$response = json_decode(curl_exec($ch), true);
Response
HTTP 200 OK
{
"code": 200,
"message": "Success",
"data": {
"merchantName": "PT Example Merchant",
"availableBalance": "5000000.00",
"pendingBalance": "200000.00"
}
}
Fields
| Field | Description |
|---|---|
availableBalance | Wallet balance as a decimal string (IDR, not minor units). "5000000.00" = IDR 5,000,000 |
pendingBalance | Sum of disbursements that are PENDING or IN_REVIEW |
Error Responses
| Message | Description |
|---|---|
Invalid Client ID | clientId not found or merchant inactive |
Merchant does not have a wallet | Settlement type is not WALLET |
Invalid X-SIGNATURE | Signature verification failed |
Public Key is not set | No RSA public key uploaded for this merchant |