1. Overview
The Merchant Platform can use this interface to obtain account change records for a specified date and to reconciliation through the OPEN API flow number within the bill.
2. API Specification
HTTP Method | POST |
Endpoint |
|
SNAP Service Code | 14 |
3. Request
3.1. Request Header
Name | Type | M/O | Length | Description |
---|---|---|---|---|
X-TIMESTAMP | String | M | 25 | The request timestamp. Formatted with "yyyy-MM-ddTHH:mm:ssZ". E.g. 2022-09-06T13:00:00+07:00 |
X-SIGNATURE | String | M | 2048 | The Merchant or Client generated signature. Using Asymmetric-Signature mechanism to get the token, encrypted with SHA256withRSA. e.g. stringToSign = <HTTP Method> + ":" + <Service Endpoint> + ":" + toLowercase(hexEncode(SHA256(minify(<Request Body>)))) + ":" + <X-TIMESTAMP> X-SIGNATURE = SHA256withRSA(PrivateKey, stringToSign) |
X-ORIGIN | String | M | 256 | Client’s host origin. |
X-PARTNER-ID | String | M | 32 | The Merchant or Client Id. Provided by BNC. |
X-EXTERNAL-ID | String | M | 36 | The Merchant External ID of request.
e.g. 77778042022091500001 |
CHANNEL-ID | String | M | 5 | PJP Channel ID. 88881 |
3.1.1 Sample Request Header
Content-type: application/json Authorization: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a" X-TIMESTAMP: 2020-12-21T14:56:11+07:00 X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5 X-ORIGIN: www.hostname.com X-PARTNER-ID: 82150823919040624621823174737537 X-EXTERNAL-ID: 41807553358950093184162180797837 CHANNEL-ID: 95221
3.2 Request Body
Name | Type | M/O | Length | Description | Example |
---|---|---|---|---|---|
partnerReferenceNo | String | O | 64 | Transactionidentifier on service consumer system | 2020102900000000000001 |
bankCardToken | String | C | 128 | Card tokenfor payment.must be filled if accountNo is null | 6d7963617264746f6b656 e |
accountNo | String | C | 16 | Bankaccount number.must be filled if bankAccount No is null | 7382382957893840 |
fromDateTime | ISODa teTime ISO-8601 | O | 25 | Starting timerange. Default:NOW (DESC) or NOW - 1 months(ASC) | 2019-07-03T12:08:56-07:00 |
toDateTime | ISODa teTime ISO-8601 | O | 25 | Ending time range. Default: NOW - 1 months (DESC)or NOW (ASC) | 2019-07-03T12:08:56-07:00 |
additionalInfo | Object | O |
| Additional information | { "submerchantflag":"1", "channel":"mobilephone", "deviceId":"12345679237", "channel": "mobilephone", "mchNm": "merchant xyz" } Note: Flag of "submerchantflag": "1" = Merchant (1st tier merchant) "2" = Merchant (2nd tier merchant) |
3.2.1 Sample Request Body
{ }
4. Response
4.1 Response Body
Name | Type | M/O | Length | Description | Example |
---|---|---|---|---|---|
responseCode | String | M | 7 | Response code | 2001400 |
responseMessage | String | M | 150 | Response description | Request hasbeen processed successfully |
referenceNo | String | C | 64 | Transactionidentifier on service provider system. Must be filled upon successful transaction | 2020102977770000000009 |
partnerReferenceNo | String | O | 64 | Transactionidentifier on service consumer system | '2020102900000000000001 |
balance | Array of Object | O | N/A | Starting and ending balance before the first/last transaction. | [ { "amount": { "value": "10000.00", " currency": "IDR" }, "dateTime": "2020-12-18T16:03:45+07:00" } ] |
Amount | Object | M |
|
|
|
value | String | M | 16,2 | TransactionAmount.Nominal inputted by Customer with 2 decimal | 10000.00 |
currency | String(ISO4217) | M | 3 | Currency | IDR |
dateTime | String | M | 25 | ISO 8601 | 2020-12-18T16:03:45+07:00 |
startingBalance | Object | M |
|
|
|
value | String | M | 16,2 | TransactionAmount.Nominal inputted by Customer with 2 decimal | 12345678.00 |
currency | String(ISO4217) | M | 3 | Currency | IDR |
dateTime | String | M | 25 | ISO 8601 | 2020-12-18T16:03:45+07:00 |
endingBalance | Object | M |
|
|
|
value | String | M | 16,2 | TransactionAmount.Nominal inputted by Customer with 2 decimal | 12345678.00 |
currency | String(ISO4217) | M | 3 | Currency | IDR |
dateTime | String | M | 25 | ISO 8601 | 2020-12-19T16:03:45+07:00 |
totalCreditEntries | Debit And Credit Entries See object definition | O | N/A | Total transaction amount with type = CREDIT. | { "numberOfEntries": "10", "amount": { "value": "10000.00", "currency": "IDR" } } |
totalDebitEntries | DebitA ndCred itEntrie sSee object definiti on | O | N/A | Total transaction amount with type = DEBIT. | { "numberOfEntries": "10", "amount": { "value": "10000.00", "currency": "IDR" } } |
hasMore | String | O | 1 | Memberikaninformasi apakah masih ada record yang belum ditampilkan dalam rentang fromDateTi me toDateTimeY/N | Y |
lastRecordDateTime | String | O | 25 | ISO 8601 | 2021-11-24T11:54:56-07:00 |
detailData | Arrayof object |
|
|
|
|
detailBalance | Object | O | N/A | Starting andending balance before and after transaction. |
|
startAmount | Object | O |
|
| [ { "amount": { "value": "10000.00", " currency": "IDR" } ] |
endAmount | Object | O |
|
| [ { "amount": { "value": "10000.00", " currency": "IDR" } ] |
amount | Object | O |
|
|
|
value | String(ISO4217) | M | 16,2 | Net amount of the transaction. If it's IDR then value includes 2 decimal digits.e.g. IDR10.000,- will be placed with10000.00 | 12345678.00 |
currency | String | M | 3 | Currency | IDR |
originAmount | Object | O |
|
|
|
value | String(ISO4217) | M | 16,2 | Origin net amount of the transaction. If it's IDR then value includes 2 decimal digits.e.g. IDR10.000,- will be placed with10000.00 | 12345678.00 |
currency | String | M | 3 | Currency | IDR |
transactionDate | ISODateTimeISO-8601 | M | 25 | Timestamp of the Transaction. | 2009-07-03T12:08:56-07:00 |
remark | String | M | 256 | Transaction remark. | Payment toWarung IkanBakar |
transactionId | String | O | 35 | Internaltransaction identifier from publisher perspective. | 20200801198230912830091123 |
type | String | M | 6 | Transactiontype. CREDIT/DE BIT | CREDIT |
transactionDetailStatus | String | O | 20 | Transactiondetail indicator (original transaction or error correction) SUCCESS/ ERROR CORECTION | SUCCESS |
detailInfo | Object | O |
| Additionalinformation of detail transaction | page:"12" |
additionalInfo | Object | O |
| Additional information | { "submerchantflag":"1", "channel":"mobilephone", "deviceId":"12345679237", "channel": "mobilephone", "mchNm": "merchant xyz" } Note: Flag of "submerchantflag": "1" = Merchant (1st tier merchant) "2" = Merchant (2nd tier merchant) |
4.1.1 Sample Response Body
Success:
{ }
Fail:
{ }
Response Code | HTTP Code | Service Code | Case Code | Response Message | Description | |
---|---|---|---|---|---|---|
1 | 2002400 | 200 | any | 00 | Successful | Successful |
2 | 4002400 | 400 | any | 00 | Bad Request | General request failed error, including message parsing failed. |
3 | 4002401 | 400 | any | 01 | Invalid Field Format {field name} | Invalid format |
4 | 4012400 | 401 | any | 00 | Unauthorized. [reason] | General unauthorized error (No Interface Def, API is Invalid, Oauth Failed, Verify Client Secret Fail, Client Forbidden Access API, Unknown Client, Key not Found) |
5 | 4012401 | 401 | any | 01 | Invalid Token (B2B) | Token found in request is invalid (Access Token Not Exist, Access Token Expiry) |
6 | 4012403 | 401 | any | 03 | Token Not Found (B2B) | Token not found in the system. This occurs on any API that requires token as input parameter |
7 | 4042408 | 404 | any | 08 | InvalidMerchant | Merchant does not exist or status abnormal |
8 | 4042411 | 404 | any | 11 | Invalid Card/Accoun t/Customer [info]/Virtual Account | Card information may be invalid, or the card account may be blacklisted, or Virtual Account number maybe invalid. |
9 | 4042412 | 404 | any | 12 | Invalid Bill/Virtual Account [Reason] | The bill is blocked/suspended/not found.Virtual account is suspend/not found. |
10 | 4042413 | 404 | any | 13 | InvalidAmount | The amount doesn't match with what supposed to |
11 | 4092401 | 409 | any | 01 | Duplicate partnerReferenceNo | Transaction has previously been processed indicates the same partnerReferenceNo already success |
12 | 5002402 | 500 | Any | 02 | External Server Error | Backend system failure, etc |
6. Reference
Field Code | Field Name | Description | |
---|---|---|---|
1 | M | Mandatory | Mandatory |
2 | ME | Mandatory Equal | Mandatory Equal – value in the request and the response must be the same. |
3 | C | Conditional | Conditional |
4 | CE | Conditional Equal | Conditional Equal – value in the request and the response must be the same. |
5 | O | Optional | Optional |