This section will explain how merchants can initiate inquiry payment to Virtual Account from Intrabank using SNAP specification.
ServiceCode | Method | URL | Description |
---|---|---|---|
32 | POST | /{version}/transfer-va/inquiry-intrabank | API Inquiry VA |
Request
Header
The following table is a header of request parameter:
Field Name | Attrib. | Datatype | Description |
---|---|---|---|
Content-Type | M | String | Represent media type of request e.g “application/json” |
Authorization | M | Bearer token obtained from Access Token API in the format Bearer | |
X-TIMESTAMP | M | String(25) | Client's current local time in “yyyy-MM-ddTHH:mm:ssTZD” format |
X-SIGNATURE | M | See General API Symmetric Signature | |
X-PARTNER-ID | M | See Credential Exchange | |
X-EXTERNAL-ID | M | String(max 36), Numeric | Unique request reference number from partner. Must be unique. |
CHANNEL-ID | M | See Credential Exchange |
Body
The following table is a body of request parameter:
Field Name | Attrib. | Datatype | Description |
---|---|---|---|
partnerServiceId | M | String(8) | Fill with placeholder value of “00000000”, we will not check this field |
customerNo | M | String(20) | Fill with placeholder value of “00000000”, we will not check this field |
virtualAccountNo | M | String(28) | Customer virtual account number |
additionalInfo.beneficiaryBankCode | M | String(8) | 3 digit BI Bank Code + 4 digit BI Branch Code for the beneficiary bank |
Response
Header
The following table is a header of response parameter:
Field Name | Attrib. | Datatype | Description |
---|---|---|---|
X-TIMESTAMP | M | String(25) | “yyyy-MM-ddTHH:mm:ssTZD” format |
Body
The following table is a body of response parameter:
Field Name | Attrib. | Datatype | Description |
---|---|---|---|
responseCode | M | String(7) | Response code |
responseMessage | M | String(150) | Response description |
virtualAccountData | C | Object | |
{}.inquiryRequestId | M | String(128) | Inquiry identifier for Inquiry. Generated by PJP |
{}.partnerServiceId | M | String(8) | Similar to company code, a few digit left padding from the virtualAccountNo |
{}.customerNo | M | String(10) | Unique number of virtualAccountNo |
{}.virtualAccountNo | M | String(28) | Customer virtual account number |
{}.virtualAccountName | O | String(255) | Customer name |
{}.virtualAccountEmail | O | String(255) | Customer email |
{}.virtualAccountPhone | O | String(30) | Customer phone number Format: 62xxxxxxxxxxxxx |
{}.virtualAccountTrxType | O | String(1) | Variation: - (O) Open payment - (C) Closed payment - (V) Bill variable - (I) Partial - (W) Variable multi bill |
{}.totalAmount.value | M | String(16,2) | Net amount of the transaction. If it’s IDR then value includes 2 decimal digits. e.g. IDR 10.000, will be placed with 10000.00 |
{}.totalAmount.currency | M | String(3) | Currency (should always be IDR) |
{}.feeAmount.value | O | String(16,2) | Net amount of the transaction. If it’s IDR then value includes 2 decimal digits. e.g. IDR 10.000, will be placed with 10000.00 |
{}.feeAmount.currency | O | String(3) | Currency (should always be IDR) |
{}.productName | O | String(30) | Product category |
{}.billDetails | O | Array of object | |
[].billCode | O | String(2) | Bill code for customer choose |
[].billNo | O | String(18) | Bill number from partner |
[].billName | O | String(20) | Bill name |
[].billShortName | O | String(10) | Bill name to shown to |
[].billDescription.english | O | String(18) | Bill description in english |
[].billDescription.indonesia | O | String(18) | Bill description in bahasa |
[].billSubCompany | O | String(5) | Partner’s product code |
[].billAmount.value | O | String(16,2) | Net amount of the transaction. If it’s IDR then value includes 2 decimal digits. e.g. IDR 10.000, will be placed with 10000.00 |
[].billAmount.currency | O | String(3) | Currency (should always be IDR) |
[].billAmountLabel | O | String(255) | Label for billAmount |
[].billAmountValue | O | String(255) | Value that will be shown for billAmount |
{}.freeTexts | O | Array of Object | |
[].english | O | String(32) | Will be shown in channel |
[].indonesia | O | String(32) | Will be shown in channel |
{}.additionalInfo.beneficiaryBankCode | M | String(8) | 3 digit BI Bank Code + 4 digit BI Branch Code for the beneficiary bank |
Note:
virtualAccountTrxType variations explanation:
- (O) Open payment = (non Multi Bill - No Bill)
- Bill amount is not displayed, customer may enter paid amount freely.
- (C) Closed payment = (non Multi Bill - Fixed Bill)
- Bill amount is displayed, customer must pay according to the displayed amount.
- If more than one bill is displayed, customer must pay all displayed bills & total amount for all bills.
- (V) Bill variable = (non Multi Bill - Variable Bill)
- Bill amount is displayed, customer may enter paid amount freely.
- (I) Partial = (Flexible Multi Bill - Fixed Bill)
- More than one bill may be displayed, customer may choose more than one of the displayed bills to pay.
- Bill amount is displayed, customer must pay according to the displayed amount in each bill.
- Total of paid amount is equal to the sum of chosen bills.
- (W) Variable multi bill = (Multi Bill - Fixed Bill)
- More than one bill may be displayed, customer may choose only one of the displayed bills to pay.
- Bill amount is displayed, customer must pay according to the displayed amount of the chosen bill.
Sample
Request
The following section is a sample of request parameter:
curl --location --request POST 'https://merchants.midtrans.com/v1.0/transfer-va/inquiry-intrabank' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxMmUzODE4Mi00YjIxLTQ0YWMtOTVkNi1mMjFhMjEwZmIxZTAiLCJjbGllbnRJZCI6IjY2ODA1MmUzNGYxOTRhYThiZTc5ZTE1YTIxZTRmYzJmIiwibmJmIjoxNjYzODQwNTU5LCJleHAiOjE2NjM4NDE0NTksImlhdCI6MTY2Mzg0MDU1OX0.fEr0vIbB2kY8alZ-SROl3ftAFbfRd0uU-lGq9XuFi8M' \
--header 'Content-Type: application/json' \
--header 'X-TIMESTAMP: 2022-03-04T08:02:09+07:00' \
--header 'X-SIGNATURE: yqmBXZ3yV6NPG1LtwXMm3quXzJMRX5Ms+r9ebc5xWIZGSKbZL3Oy871GHb7WQUucLa5nxN/HcnZYoNHc+KkWTQ==' \
--header 'X-PARTNER-ID: 668052e34f194aa8be79e15a21e4fc2f' \
--header 'X-EXTERNAL-ID: 91919644194391346361915387229113' \
--header 'CHANNEL-ID: 95221' \
--data-raw '{"partnerServiceId":"00000000","customerNo":"00000000","virtualAccountNo":"80777087897654374","additionalInfo":{"beneficiaryBankCode":"0140397"}}'
Response
The following section is a sample of response parameter:
HTTP 200 OK
-------------------------------------------------------------------------------
Content-Type : application/json
x-timestamp : 2022-03-04T08:02:09+07:00
-------------------------------------------------------------------------------
{
"responseCode": "2003200",
"responseMessage": "Successful",
"virtualAccountData": {
"inquiryRequestId": "158dd631e5bb469795302f3821ec4e20",
"partnerServiceId": "80777",
"customerNo": "087897654374",
"virtualAccountNo": "80777087897654374",
"virtualAccountName": "John Doe",
"virtualAccountEmail": "[email protected]",
"virtualAccountPhone": "6287897654374",
"virtualAccountTrxType": "C",
"totalAmount": {
"value": "25000.00",
"currency": "IDR"
},
"feeAmount": {
"value": "0.00",
"currency": "IDR"
},
"productName": "TOKOPEDIA",
"billDetails": [
{
"billCode": "",
"billNo": "1234567890",
"billName": "",
"billShortName": "",
"billDescription": {
"english": "Pencil",
"indonesia": "Pensil"
},
"billSubCompany": "00000",
"billAmount": {
"value": "25000.00",
"currency": "IDR"
},
"billAmountLabel": "",
"billAmountValue": "25000.00",
"additionalInfo": {}
}
],
"freeTexts": [
{
"english": "free text inq",
"indonesia": "text bebas inq"
}
],
"additionalInfo": {
"beneficiaryBankCode": "0140397"
}
}
}
Content-Type : application/json
x-timestamp : 2022-03-04T08:02:09+07:00
-------------------------------------------------------------------------------
{"responseCode": "5003200", "responseMessage": "Internal Server Error"}
Migration
Request
The following table is a comparison of request parameter:
Payouts non-SNAP-based (current) | Payouts SNAP-based | Description |
---|---|---|
GET /api/v1/account_validation?bank=#{bank_name}&account=#{bank_account} | POST /{version}/transfer-va/inquiry-intrabank | |
bank_account | virtualAccountNo | Beneficiary virtual account number |
additionalInfo.beneficiaryBankCode | 3 digit BI Bank Code + 4 digit BI Branch Code for the beneficiary bank | |
bank_name | Bank name of partner’s bank account |
Response
The following table is a comparison of response parameter:
Payouts non-SNAP-based (current) | Payouts SNAP-based | Description |
---|---|---|
responseCode | Response code | |
responseMessage | Response description | |
virtualAccountData | ||
id | inquiryRequestId | Transaction identifier on service provider system. |
partnerServiceId | ||
customerNo | ||
account_no | virtualAccountNo | Virtual account number of the Beneficiary |
account_name | virtualAccountName | |
bank_name | Bank name of partner’s bank account | |
virtualAccountEmail | ||
virtualAccountPhone | ||
virtualAccountTrxType | ||
totalAmount | ||
feeAmount | ||
productName | ||
billDetails.billCode | ||
billDetails.billNo | ||
billDetails.billName | ||
billDetails.billShortName | ||
billDetails.billDescription | ||
billDetails.billSubCompany | ||
billDetails.billAmount | ||
billDetails.billAmountLabel | ||
billDetails.billAmountValue | ||
freeTexts | ||
additionalInfo.beneficiaryBankCode | Beneficiary Bank BI Code |
Response Codes
Payouts non-SNAP-based (current) | Payout SNAP-based | Description |
---|---|---|
2003200 | Successful | |
4003201 | Invalid Field Format [fieldName] | |
4003202 | Missing Mandatory Field [fieldName] | |
4013200 | Unauthorized | |
4013201 | Invalid Token (B2B) | |
4033209 | Dormant Account | |
4033214 | Insufficient Fund | |
4033218 | Inactive Card/Account/Customer | |
4043211 | Invalid Account/Virtual Account | |
5003201 | Internal Server Error | |
5003202 | External Server Error |