> For the complete documentation index, see [llms.txt](https://docs.finpay.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finpay.id/finpay-money/linkage/merchant-balance-inquiry.md).

# Merchant Balance Inquiry

This API is used to get the current balance of a registered merchant.

### Technical Specification <a href="#technical-specification" id="technical-specification"></a>

| Environment | Method | URL                                                                 |
| ----------- | ------ | ------------------------------------------------------------------- |
| Development | POST   | <https://snapstag.finnet.co.id/topup/v1.0/balance-inquiry-merchant> |

### Required Headers <a href="#required-headers" id="required-headers"></a>

<table><thead><tr><th width="70.16665649414062">No</th><th width="150.16668701171875">Name</th><th width="110">Type</th><th width="109.66665649414062">Mandatory</th><th width="170.03128051757812">Description</th></tr></thead><tbody><tr><td>1</td><td>Content-Type</td><td>String</td><td>M</td><td>Fill with <code>application/json</code></td></tr><tr><td>2</td><td>Authorization</td><td>String</td><td>M</td><td><code>Bearer &#x3C;access_token></code></td></tr><tr><td>3</td><td>X-TIMESTAMP</td><td>String</td><td>M</td><td>Timestamp in RFC3339 format: <code>yyyy-MM-ddTHH:mm:ssTZD</code></td></tr><tr><td>4</td><td>X-PARTNERID</td><td>String (36)</td><td>M</td><td>Client ID provided by Finnet</td></tr><tr><td>5</td><td>X-SIGNATURE</td><td>String</td><td>C</td><td>BI SNAP symmetric signature. Use <code>base64(HMAC_SHA512($ClientSecret, stringToSign))</code>. See <a href="/finpay-money/linkage/signature.md">Signature</a> for details.</td></tr><tr><td>6</td><td>X-EXTERNAL-ID</td><td>String (36)</td><td>M</td><td>Reference number that must be unique within the same day</td></tr><tr><td>7</td><td>X-CHANNEL-ID</td><td>String (5)</td><td>M</td><td>PJP’s channel id Device identification on which the API services is currently being accessed by the end user (customer)</td></tr></tbody></table>

### Body Request <a href="#body-request" id="body-request"></a>

<table><thead><tr><th width="70.16666412353516">No</th><th width="149.83331298828125">Name</th><th width="110.33334350585938">Type</th><th width="109.66668701171875">Mandatory</th><th width="170.03124237060547">Description</th></tr></thead><tbody><tr><td>1</td><td>partnerReferenceNo</td><td>String (64)</td><td>M</td><td>Transaction identifier on service consumer system</td></tr></tbody></table>

#### Sample Request <a href="#sample-request" id="sample-request"></a>

```bash
curl --location ' https://snapstag.finnet.co.id/topup/v1.0/balance-inquiry-merchant' \ 
 --header 'Authorization: Basic ZGVtby51c2VyOg==' \ 
 --header 'Content-Type: application/json' \ 
 --header 'Accept: application/json' \ 
 --data '{ 
   "partnerReferenceNo": "TRX001" 
 }' 
```

### Body Response <a href="#body-response" id="body-response"></a>

<table><thead><tr><th width="70.16665649414062">No</th><th width="150.16665649414062">Name</th><th width="110.33334350585938">Type</th><th width="109.66665649414062">Mandatory</th><th width="169.69793701171875">Description</th></tr></thead><tbody><tr><td>1</td><td>responseCode</td><td><a href="/appendix/enumeration/response-code-list.md">Enum</a></td><td>M</td><td>BI SNAP Response Code.</td></tr><tr><td>2</td><td>responseMessage</td><td>String</td><td>M</td><td>BI SNAP Response Message.</td></tr><tr><td>3</td><td>referenceNo</td><td>String (8)</td><td>C</td><td>Transaction identifier on service provider system</td></tr><tr><td>4</td><td>partnerReferenceNo</td><td>String (64)</td><td>C</td><td>Transaction identifier on service consumer system</td></tr><tr><td>5</td><td>name</td><td>String</td><td>M</td><td>Merchant name</td></tr><tr><td>6</td><td>accountInfos</td><td><a href="/appendix/json-object/accouninfos-object.md">Object</a></td><td>M</td><td>Detail of Account Info</td></tr></tbody></table>

#### Sample Response <a href="#sample-response" id="sample-response"></a>

```json
{
  "responseCode": "2001100",
  "responseMessage": "Request has been processed successfully",
  "referenceNo":"20201029",
  "partnerReferenceNo":"2020102900000000000001",
  "name": "Testing Nandhief",
  "accountInfos": [
    {
      "availableBalance": {
        "value": "0.00",
        "currency": "IDR"
      }
    }
  ]
}
```

### Response Code & Message <a href="#response-code--message" id="response-code--message"></a>

The table below lists response codes and messages for the Merchant Balance Inquiry API.

<table><thead><tr><th width="70.16667175292969">No</th><th width="149.5">HTTP Code</th><th width="149.66668701171875">Code</th><th width="289.8645782470703">Message</th></tr></thead><tbody><tr><td>1</td><td>200</td><td>2001100</td><td>Successful</td></tr><tr><td>2</td><td>400</td><td>4001100</td><td>Bad request</td></tr><tr><td>3</td><td>400</td><td>4001101</td><td>Invalid field format <code>{field}</code></td></tr><tr><td>4</td><td>400</td><td>4001102</td><td>Invalid mandatory field <code>{field}</code></td></tr><tr><td>5</td><td>401</td><td>4011101</td><td>Invalid token (B2B)</td></tr><tr><td>6</td><td>401</td><td>4011100</td><td>Unauthorised. <code>[Reason]</code></td></tr><tr><td>7</td><td>403</td><td>4031101</td><td>Feature not allowed</td></tr><tr><td>8</td><td>403</td><td>4031104</td><td>Activity count limit exceeded</td></tr><tr><td>9</td><td>404</td><td>4041108</td><td>Invalid merchant</td></tr><tr><td>10</td><td>500</td><td>5001100</td><td>General error</td></tr><tr><td>11</td><td>504</td><td>5041100</td><td>Timeout</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.finpay.id/finpay-money/linkage/merchant-balance-inquiry.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
