Appearance
Delete VA SNAP PG3
Information
Field | Value |
---|---|
Path | /{version}/transfer-va/delete-va |
HTTP Method | POST |
Service Code | 31 |
Request Body
Name | Data Type | Required | Details |
---|---|---|---|
partnerServiceId | string(8) | M | Get value from BIN CODE. 8 digit left padding space. The merchant will input this data. |
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). The merchant will input this data. |
trxId | string(64) | M | The merchant will input this data. |
Example Request
sh
curl -X POST '.../v1.0/transfer-va/delete-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-raw '{
"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/delete-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/delete-va HTTP/1.2',
'{\n "partnerServiceId":" 088899",\n "customerNo":"12345678901234567890",\n "virtualAccountNo":" 08889912345678901234567890",\n "trxId":"abcdefgh1234",\n}',
{
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/delete-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/delete-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
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(MIS). 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 Partner system. Same with order_id in va v2 |
additionalInfo | object | O | |
additionalInfo.transactionStatus | string(50) | M | Transaction status: CANCELED |
Example Response
json
{
"responseCode": "2003100",
"responseMessage": "Success",
"virtualAccountData": {
"partnerServiceId": " 088899",
"customerNo": "12345678901234567890",
"virtualAccountNo": " 08889912345678901234567890",
"trxId": "abcdefgh1234",
"additionalInfo": {
"transactionStatus": "CANCELED"
}
}
}