Inquiry Payment to VA from Intra Bank

This section will explain how merchants can initiate inquiry payment to Virtual Account from Intrabank using SNAP specification.

ServiceCodeMethodURLDescription
32POST/{version}/transfer-va/inquiry-intrabankAPI Inquiry VA

Request

Header

The following table is a header of request parameter:

Field NameAttrib.DatatypeDescription
Content-TypeMStringRepresent media type of request e.g “application/json”
AuthorizationMBearer token obtained from Access Token API in the format Bearer
X-TIMESTAMPMString(25)Client's current local time in “yyyy-MM-ddTHH:mm:ssTZD” format
X-SIGNATUREMSee General API Symmetric Signature
X-PARTNER-IDMSee Credential Exchange
X-EXTERNAL-IDMString(max 36), NumericUnique request reference number from partner. Must be unique.
CHANNEL-IDMSee Credential Exchange

Body

The following table is a body of request parameter:

Field NameAttrib.DatatypeDescription
partnerServiceIdMString(8)Fill with placeholder value of “00000000”, we will not check this field
customerNoMString(20)Fill with placeholder value of “00000000”, we will not check this field
virtualAccountNoMString(28)Customer virtual account number
additionalInfo.beneficiaryBankCodeMString(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 NameAttrib.DatatypeDescription
X-TIMESTAMPMString(25)“yyyy-MM-ddTHH:mm:ssTZD” format

Body

The following table is a body of response parameter:

Field NameAttrib.DatatypeDescription
responseCodeMString(7)Response code
responseMessageMString(150)Response description
virtualAccountDataCObject
{}.inquiryRequestIdMString(128)Inquiry identifier for Inquiry. Generated by PJP
{}.partnerServiceIdMString(8)Similar to company code, a few digit left padding from the virtualAccountNo
{}.customerNoMString(10)Unique number of virtualAccountNo
{}.virtualAccountNoMString(28)Customer virtual account number
{}.virtualAccountNameOString(255)Customer name
{}.virtualAccountEmailOString(255)Customer email
{}.virtualAccountPhoneOString(30)Customer phone number
Format: 62xxxxxxxxxxxxx
{}.virtualAccountTrxTypeOString(1)Variation:

- (O) Open payment
- (C) Closed payment
- (V) Bill variable
- (I) Partial
- (W) Variable multi bill
{}.totalAmount.valueMString(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.currencyMString(3)Currency (should always be IDR)
{}.feeAmount.valueOString(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.currencyOString(3)Currency (should always be IDR)
{}.productNameOString(30)Product category
{}.billDetailsOArray of object
[].billCodeOString(2)Bill code for customer choose
[].billNoOString(18)Bill number from partner
[].billNameOString(20)Bill name
[].billShortNameOString(10)Bill name to shown to
[].billDescription.englishOString(18)Bill description in english
[].billDescription.indonesiaOString(18)Bill description in bahasa
[].billSubCompanyOString(5)Partner’s product code
[].billAmount.valueOString(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.currencyOString(3)Currency (should always be IDR)
[].billAmountLabelOString(255)Label for billAmount
[].billAmountValueOString(255)Value that will be shown for billAmount
{}.freeTextsOArray of Object
[].englishOString(32)Will be shown in channel
[].indonesiaOString(32)Will be shown in channel
{}.additionalInfo.beneficiaryBankCodeMString(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-basedDescription
GET /api/v1/account_validation?bank=#{bank_name}&account=#{bank_account}POST /{version}/transfer-va/inquiry-intrabank
bank_accountvirtualAccountNoBeneficiary virtual account number
additionalInfo.beneficiaryBankCode3 digit BI Bank Code + 4 digit BI Branch Code for the beneficiary bank
bank_nameBank name of partner’s bank account

Response

The following table is a comparison of response parameter:

Payouts non-SNAP-based (current)Payouts SNAP-basedDescription
responseCodeResponse code
responseMessageResponse description
virtualAccountData
idinquiryRequestIdTransaction identifier on service provider system.
partnerServiceId
customerNo
account_novirtualAccountNoVirtual account number of the Beneficiary
account_namevirtualAccountName
bank_nameBank 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.beneficiaryBankCodeBeneficiary Bank BI Code

Response Codes

Payouts non-SNAP-based (current)Payout SNAP-basedDescription
2003200Successful
4003201Invalid Field Format [fieldName]
4003202Missing Mandatory Field [fieldName]
4013200Unauthorized
4013201Invalid Token (B2B)
4033209Dormant Account
4033214Insufficient Fund
4033218Inactive Card/Account/Customer
4043211Invalid Account/Virtual Account
5003201Internal Server Error
5003202External Server Error