Appearance
API Balance Inquiry
API Balance Inquiry is used to obtain balance information available on the MC Senmo account.
API Information
| Field | Value |
|---|---|
| Path | /api/{version}/balance-inquiry |
| HTTP Method | POST |
| Service Code | 11 |
| Version | v1.0 |
| Type | JSON |
| Authentication | OAuth 2.0 with Access Token |
Request Structure
Request Header
Details
| Parameter / Field | Mandatory | Type | Description |
|---|---|---|---|
Content-Type | M | String | Indicates the media type of the resource. Use: application/json |
Authorization | M | String | Represents the access_token of a request. Starts with keyword "Bearer" followed by the access token. e.g.: Bearer eyJraWQiOi... |
X-TIMESTAMP | M | String | Client's current local time in yyyy-MM-ddTHH:mm:ss.SSSTZD format |
X-SIGNATURE | M | String | Symmetric signature using HMAC_SHA512. Formula: stringToSign = HTTPMethod + ":" + EndpointUrl + ":" + AccessToken + ":" + Lowercase(HexEncode(SHA256(minify(RequestBody)))) + ":" + TimeStamp. Notes: (1) Use full URL endpoint including all parameters. (2) If no Request Body, use empty string for minify parameter. |
X-PARTNER-ID | M | String | Unique ID for a partner. Use the iFortepay Client ID obtained after the onboarding process. |
X-EXTERNAL-ID | M | String | Numeric String. A unique reference number you should generate. Must be unique on the same day. |
ORIGIN | O | String | Origin domain registered on the iFortepay system. |
CHANNEL-ID | M | String | Device identification on which the API services are being accessed. Use value: api |
M = Mandatory, O = Optional
Request Body
Details
| Parameter / Field | Mandatory | Type | Length | Description |
|---|---|---|---|---|
partnerReferenceNo | O | String | 64 | Transaction identifier from client's system |
accountNo | M | String | 16 | Registered company's bank account number |
balanceType | O | String | - | Balance type to be queried. Currently only supports cash. Fill: cash |
additionalInfo | O | Object | - | Additional info object |
Example Request
Details
artifact
id: balance-inquiry-request
name: Example Request - API Balance Inquiry
type: code.bash
content: |-
curl --location --request POST 'https://api-stage.senmo.id/api/v1.0/balance-inquiry' \
--header 'Content-Type: application/json' \
--header 'X-TIMESTAMP: 2023-01-02T14:06:09+07:00' \
--header 'X-SIGNATURE: CYkbBOApXkXnNUh9ZJfMdqX9ymQlq+BCP03EgM1jIJth0Ct+kvnIvEf1I6kaOQcFArmTWIUOYsNw/SErzH4GEw==' \
--header 'X-PARTNER-ID: MCPD00000012' \
--header 'X-EXTERNAL-ID: 1672643169814' \
--header 'CHANNEL-ID: api' \
--header 'ORIGIN: https://www.mcpayment.id' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--data-raw '{
"partnerReferenceNo": "20221228-0004",
"accountNo": "123812939120",
"balanceType": "cash"
}'Response Structure
Response Header
Details
| Parameter / Field | Mandatory | Type | Description |
|---|---|---|---|
Content-Type | M | String | Indicates the media type of the resource. Value: application/json |
X-TIMESTAMP | M | String | Client's current local time in yyyy-MM-ddTHH:mm:ss.SSSTZD format |
Response Body
Details
| Parameter / Field | Mandatory | Type | Length | Description |
|---|---|---|---|---|
responseCode | M | String | 7 | Response code |
responseMessage | M | String | 150 | Response message/description based on the responseCode |
referenceNo | M | String | 64 | Transaction identifier on iFortepay system. Filled upon successful transaction |
partnerReferenceNo | O | String | 64 | Transaction identifier on client's system |
accountNo | O | Array | 16 | Registered company's bank account number |
name | O | String | - | Account holder name |
accountInfo | M | Object | - | Collection of balances based on types |
balanceType | O | String | - | Balance type queried. Currently only cash |
amount | O | Object | - | Total net amount of the balance. See Balance Object Detail |
floatAmount | O | Object | - | Amount of deposit not yet effective (e.g. due to holidays). See Balance Object Detail |
holdAmount | O | Object | - | Hold amount that cannot be used. See Balance Object Detail |
availableBalance | O | Object | - | Account balance available for financial transactions. See Balance Object Detail |
ledgerBalance | O | Object | - | Account balance at the beginning of each day, updated daily. See Balance Object Detail |
currentMultiLateralLimit | O | Object | - | Credit limit or company transaction limit. See Balance Object Detail |
status | O | String | - | Balance account status: 0001 = Active, 0002 = Closed, 0007 = Frozen |
Balance Object Detail
| Parameter / Field | Mandatory | Type | Length | Description |
|---|---|---|---|---|
value | O | String | - | Amount value of the balance |
currency | O | String | 3 | Currency of the amount value (e.g. IDR) |
Example Response
Details
✅ Success Response
json
{
"responseCode": "2001100",
"responseMessage": "Successful",
"referenceNo": "63b4010ef1c4599ccc5553f2",
"partnerReferenceNo": "20221228-0004",
"name": "Final Fantasy 8",
"accountInfo": [
{
"balanceType": "CASH",
"amount": { "value": "99978000.00", "currency": "IDR" },
"floatAmount": { "value": "0.00", "currency": "IDR" },
"holdAmount": { "value": "508000.00", "currency": "IDR" },
"availableBalance": { "value": "99470000.00", "currency": "IDR" },
"ledgerBalance": { "value": "99978000.00", "currency": "IDR" },
"currentMultilateralLimit": { "value": "0.00", "currency": "IDR" },
"status": "0001"
}
]
}❌ Error Response
json
{
"responseCode": "4091101",
"responseMessage": "Duplicate partnerReferenceNo"
}