Skip to main content

mandiri-va-direct-inquiry-snap

API Request

TypeValue
Service Code24
HTTP MethodPOST
Path.../{version}/transfer-va/inquiry

Here is the sample of request header for direct inquiry Mandiri VA :

'Content-Type: application/json'
'Authorization: Bearer scriptdummytoken'
'Accept: application/json'
'X-PARTNER-ID: 123-abc'
'X-EXTERNAL-ID: VIRTUAL_ACCOUNT2226230726182946130107164433001000268204'
'X-TIMESTAMP: 2023-07-26T18:29:46+07:00' \
'X-SIGNATURE: jhHSOrlcIEPCIQX2rG0eIIPo0eEuMZiLXVvqkUqj1cfu8IcBXTRPOCKPTfk7Gaq3AVsUIjAKYJEC5ELX2eGAZQ=='
'CHANNEL-ID: VA002'
Request Header Explanation
ParameterData TypeTypeDescription
Content-typestringMandatoryString represents indicate the media type of the resource (e.g. application/json)
X-TIMESTAMPstringMandatoryClient's current local time with format :
YYYY-MM-DDTHH:mm:ssZD
X-SIGNATUREstringMandatoryRepresents signature of a request. Identify Signature Type used Value:
1. Symmetric Signature with Get Token (Default)
HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp
Notes :
1. The full URL endpoint includes all parameters in the associated URL
2. For the minify(Request Body) parameter, if there is no Request Body then an empty string is used.
X-PARTNER-IDstringMandatoryClient Id for merchant that generated by DOKU
X-EXTERNAL-IDstringMandatoryNumeric String. Reference number that should be unique in the same day (Request Id)
AuthorizationstringMandatoryRepresents access_token of a request; String starts with keyword “Bearer ” followed by access_token (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)
Content typestringMandatoryString represents indicate the media type of the resource (e.g. application/json)
CHANNEL-IDstring(5)MandatoryVA002

Here is the sample of request body for direct inquiry Mandiri VA :

{
"partnerServiceId": " 88899",
"customerNo": "8889912345678980002",
"virtualAccountNo": "8889912345678980002",
"trxDateInit": "2023-07-26T18:29:45+07:00",
"channelCode": "6011",
"language": "ID",
"inquiryRequestId": "R_1690370985"
}
ParameterTypeMandatoryDescription
partnerServiceIdstring(8)MandatoryThis parameter is similar to company code/BIN, 8 digit left padding space.
customerNostring(20)MandatoryUnique number (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo
virtualAccountNostring(28)MandatorypartnerServiceId (8 digit left padding 0) + customerNo (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo
trxIdstring(64)MandatoryTransaction ID in Partner system
trxDateInitstring(25)MandatoryTransaction date. ISO-8601. Example: 2020-12- 31T23:59:59-07:00
channelCodeString(4)OptionalChannel code from acquirer
languageString(3)OptionalLanguage used
inquiryRequestIdString(64)OptionalReference number for tracking inquiry

API Response

After hitting the above API request, DOKU will give the response.

Here is the sample of response header :

X-TIMESTAMP: 2020-12-21T14:36:19+07:00
Response Header Explanation
ParameterData TypeTypeDescription
X-TimestampstringMandatoryClient's current local time with format YYYY-MM-DDTHH:mm:ssZ
TypeValue
HTTP Status200
ResultSUCCESS

Here is the sample of response body of success scenario :


{
"responseCode" : "2002400",
"responseMessage" : "Successful",
"virtualAccountData" : {
"partnerServiceId" : " 88899",
"customerNo" : "12345678980002",
"virtualAccountNo" : " 8889912345678980002",
"virtualAccountName" : "Jokul Doe 001",
"virtualAccountEmail" : "jokul@email.com",
"virtualAccountPhone" : "6281828384858",
"inquiryRequestId": "122421512521"
"trxId": "INV-1234",
"totalAmount" : {
"value" : "12345678.00",
"currency" : "IDR"
},
"billDetails" : [ {
"billCode" : "01",
"billNo" : "123456789012345678",
"billName" : "Bill A for Jan",
"billShortName" : "Bill A",
"billDescription" : {
"english" : "Maintenance",
"indonesia" : "Pemeliharaan"
},
"billSubCompany" : "00001",
"billAmount" : {
"value" : "10000.00",
"currency" : "IDR"
},
"additionalInfo" : { }
} ],
"freeTexts" : [ {
"english" : "Free text",
"indonesia" : "Tulisan bebas"
} ],
"virtualAccountTrxType" : "1",
"expiredDate" : "2020-12-31T23:59:59-07:00",
"additionalInfo" : {
"deviceId" : "12345679237",
"channel" : "mobilephone"
},
"inquiryStatus" : "00",
"inquiryReason" : {
"english" : "Success",
"indonesia" : "Sukses"
},
"inquiryRequestId" : "R_1690370985"
}
}

Response Body Explanation
ParameterTypeMandatoryDescription
responseCodestring(7)MandatoryResponse Code : HTTP status code + service code + case code
responseMessagestring(150)MandatoryResponse Description
virtualAccountData.partnerServiceIdstring(8)Mandatorysimilar to company code, 8 digit left padding space
virtualAccountData.customerNoString (20)OptionalUnique number (up to 20 digits).
partnerServiceId + customerNo = virtualAccountNo
virtualAccountData.virtualAccountNoString (28)OptionalpartnerServiceId (8 digit left padding 0) + customerNo up to 20 digits).
virtualAccountData.virtualAccountNamestring(255)MandatoryCustomer Name
virtualAccountData.virtualAccountEmailstring(255)OptionalCustomer Email
virtualAccountData.virtualAccountPhonestring(30)OptionalCustomer Phone, Format: 62xxxxxxxxx xxxx
virtualAccountData.inquiryRequestIdstring(64)MandatoryReference number for tracking inquiry
virtualAccountData.trxIdstring(64)MandatoryTransaction ID in Partner system
virtualAccountData.totalAmount.valuestring(8)OptionalTransaction Amount.
Total Amount with 2 decimal, format ISO 4217
virtualAccountData.totalAmount.Currencystring(3)OptionalCurrency. Example: IDR
billDetails.billCodestring(2)OptionalBill code for Customer choose. Example : 01
billDetails.billNostring(18)OptionalBill number from Partner
billDetails.billNamestring(20)OptionalBill Name
billDetails.billShortNamestring(10)OptionalBill Name to shown to
billDetails.billDescription.englishstring(18)OptionalBill Description in English
billDetails.billDescription.indonesiastring(18)OptionalBill Description in Bahasa Indonesia
billDetails.billSubCompanystring(5)OptionalPartner’s product code
billDetails.billAmount.valueString (16.2)(ISO 4217)OptionalTransaction Amount.
Nominal inputted by Customer with 2 decimal
billDetails.billAmount.currencystring(3)OptionalCurrency
billDetails.additionalInfoObject(Unlimited)OptionalAdditional Information for custom use for each bill
freeTexts.englishstring(32)OptionalThis parameter will be shown in Channel
freeTexts.indonesiastring(32)OptionalThis parameter will be shown in Channel
virtualAccountTrxTypestring(1)OptionalType of Virtual Account :
C : closed payment
O : open payment
feeAmount.valueString (16.2)OptionalFormat ISO 4217
feeAmount.currencystring(3)OptionalExample : IDR
expiredDatestring(25)OptionalExpiration date for Virtual Account. ISO-8601. Example: 2020-12- 31T23:59:59-07:00
additionalInfo.deviceIdObjectOptionalAdditional Information for payment media used
additionalInfo.channelObjectOptionalAdditional Information for payment media used
inquiryStatusString (2) OptionalShow inquiry status code
inquiryReason.englishStringOptionalSuccess/ failed reason in English
inquiryReason.indonesiaStringOptionalSuccess/ failed reason in Indonesia
inquiryRequestIdString (64)OptionalReference number for tracking inquiry