Appearance
Inquiry VA SNAP PG3
Information
Field | Value |
---|---|
Path | /{version}/transfer-va/inquiry-va |
HTTP Method | POST |
Service Code | 30 |
Request Body
Name | Data Type | Required | Details |
---|---|---|---|
partnerServiceId | string(8) | M | Get value from BIN CODE. 8 digit left padding space. |
customerNo | string(20) | M | Get value from sub bin code + unique number (up to 20 digits). |
virtualAccountNo | string(28) | M | partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits). |
trxId | string(64) | M | Transaction ID in Merchant's system (In IFP called Order ID) |
Example Request
sh
curl -X POST '.../v1.0/transfer-va/inquiry-va HTTP/1.2' \
--header 'Content-Type: application/json' \
--header 'X-TIMESTAMP: 2020-12-21T14:56:11+07:00' \
--header 'X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5' \
--header 'X-ORIGIN: www.hostname.com' \
--header 'X-PARTNER-ID: 82150823919040624621823174737537' \
--header 'X-EXTERNAL-ID: 41807553358950093184162180797837' \
--header 'CHANNEL-ID: VA001' \
--data '{
"partnerServiceId":" 088899",
"customerNo":"12345678901234567890",
"virtualAccountNo":" 08889912345678901234567890",
"trxId":"abcdefgh1234"
}'
go
package main
import (
"fmt"
"io"
"log"
"net/http"
"strings"
)
func main() {
client := &http.Client{}
var data = strings.NewReader(`{
"partnerServiceId":" 088899",
"customerNo":"12345678901234567890",
"virtualAccountNo":" 08889912345678901234567890",
"trxId":"abcdefgh1234"
}`)
req, err := http.NewRequest("POST", "http://.../v1.0/transfer-va/inquiry-va HTTP/1.2", data)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-TIMESTAMP", "2020-12-21T14:56:11+07:00")
req.Header.Set("X-SIGNATURE", "85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5")
req.Header.Set("X-ORIGIN", "www.hostname.com")
req.Header.Set("X-PARTNER-ID", "82150823919040624621823174737537")
req.Header.Set("X-EXTERNAL-ID", "41807553358950093184162180797837")
req.Header.Set("CHANNEL-ID", "VA001")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
bodyText, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
js
import axios from 'axios';
const response = await axios.post(
'http://.../v1.0/transfer-va/inquiry-va HTTP/1.2',
// '{\n "partnerServiceId":" 088899",\n "customerNo":"12345678901234567890",\n "virtualAccountNo":" 08889912345678901234567890",\n "trxId":"abcdefgh1234"\n}',
{
'partnerServiceId': ' 088899',
'customerNo': '12345678901234567890',
'virtualAccountNo': ' 08889912345678901234567890',
'trxId': 'abcdefgh1234'
},
{
headers: {
'Content-Type': 'application/json',
'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': 'VA001'
}
}
);
rust
extern crate reqwest;
use reqwest::header;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut headers = header::HeaderMap::new();
headers.insert("Content-Type", "application/json".parse().unwrap());
headers.insert("X-TIMESTAMP", "2020-12-21T14:56:11+07:00".parse().unwrap());
headers.insert("X-SIGNATURE", "85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5".parse().unwrap());
headers.insert("X-ORIGIN", "www.hostname.com".parse().unwrap());
headers.insert("X-PARTNER-ID", "82150823919040624621823174737537".parse().unwrap());
headers.insert("X-EXTERNAL-ID", "41807553358950093184162180797837".parse().unwrap());
headers.insert("CHANNEL-ID", "VA001".parse().unwrap());
let client = reqwest::blocking::Client::builder()
.redirect(reqwest::redirect::Policy::none())
.build()
.unwrap();
let res = client.post("http://.../v1.0/transfer-va/inquiry-va HTTP/1.2")
.headers(headers)
.body(r#"
{
"partnerServiceId":" 088899",
"customerNo":"12345678901234567890",
"virtualAccountNo":" 08889912345678901234567890",
"trxId":"abcdefgh1234"
}
"#
)
.send()?
.text()?;
println!("{}", res);
Ok(())
}
php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://.../v1.0/transfer-va/inquiry-va HTTP/1.2');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'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: VA001',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\n \"partnerServiceId\":\" 088899\",\n \"customerNo\":\"12345678901234567890\",\n \"virtualAccountNo\":\" 08889912345678901234567890\",\n \"trxId\":\"abcdefgh1234\"\n}");
$response = curl_exec($ch);
curl_close($ch);
Response
Details
Name | Data Type | Required | Details |
---|---|---|---|
responseCode | string | M | Format: Http code + service code + case code |
responseMessage | string | M | Response message |
virtualAccountData | object | M | |
partnerServiceId | string(8) | M | Get value from BIN CODE. 8 digit left padding space |
customerNo | string(20) | M | Get value from sub bin code + unique number (up to 20 digits). |
virtualAccountNo | string(28) | M | partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits). |
virtualAccountName | string(255) | M | Customer name. Disallowed Special character: @-_. (space) |
virtualAccountEmail | string(255) | O | Customer email |
virtualAccountPhone | string(30) | O | Customer phone number. Format: 62xxxxxxxxxxxxx |
trxId | string(64) | M | Transaction ID in Merchant's system (In IFP called Order ID) |
totalAmount | object | O | |
totalAmount.value | string(16,2) | M | Transaction Amount. |
totalAmount.currency | string(3) | M | ISO4217 |
billDetails | Array object | O | Array with maximum 24 Objects. Get value from billingAddress |
billDetails.billCode | string(2) | O | Bill code for Customer choose |
billDetails.billNo | string(18) | O | Bill number from Partner |
billDetails.billName | string(20) | O | Bill Name |
billDetails.billShortName | string(10) | O | Bill Name to be shown |
billDetails.billDescription | object | O | Bill Description |
billDetails.billSubCompany | string(5) | O | Partner's product code |
billDetails.billAmount | object | O | |
billDetails.billAmount.value | string(16,2) | M | Transaction amount or item amount |
billDetails.billAmount.currency | string(3) | M | ISO4217 |
virtualAccountTrxType | string(1) | O | Type of Virtual Account. See VA Feature for code. |
expiredDate | string(25) | O | Expiration date for Virtual Account. ISO-8601. Default Value: 1 Day |
lastUpdateDate | string(25) | O | Last update date for Virtual Account. ISO-8601 |
paymentDate | string(25) | O | Payment date for Virtual Account. ISO-8601 |
additionalInfo | object | O | |
additionalInfo.callbackUrl | string(255) | M | Merchant URL callback |
additionalInfo.transactionStatus | string(50) | M | Transaction status: ACTIVE |
additionalInfo.acquirerIssuerRelation | string(30) | O | When creating VA |
additionalInfo.paymentHistory | object array | O | Data history payment. For VA type: Multi close, Partial, Open, Close Max 10 last paid transaction data |
additionalInfo.paymentHistory.paidAmount | string(16,2) | O | Amount paid transaction |
additionalInfo.paymentHistory.paidTime | string(25) | O | Payment date for Virtual Account. ISO-8601 |
additionalInfo.paymentHistory.paymentRequestId | string(50) | O | Follow existing, the value uses paymentRequestId from bank |
Example Response
json
{
"responseCode": 2003000,
"responseMessage": "Success",
"virtualAccountData": {
"partnerServiceId": "088899",
"customerNo": "12345678901234567890",
"virtualAccountNo": "08889912345678901234567890",
"virtualAccountName": "Jokul Doe",
"virtualAccountEmail": "jokul@email.com",
"virtualAccountPhone": "6281828384858",
"trxId": "abcdefgh1234",
"totalAmount": {
"value": "12345678.00",
"currency": "IDR"
}
}
}