Inquiry - Account Binding API E-Wallet (Direct Debit) SNAP
Tentang Inquiry - Account Binding API E-Wallet (Direct Debit) SNAP
API ini digunakan untuk melakukan pemeriksaan akun pengguna milik Pelanggan yang telah berhasil terhubung atau tidak pada metode pembayaran E-Wallet sesuai standar SNAP.
Inquiry - Account Binding API E-Wallet (Direct Debit) SNAP
Service Code | 08 |
|---|---|
API Endpoint | /nicepay/api/v1.0/registration-account-inquiry |
Method | POST |
Request Header Parameter for Inquiry - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Tipe | Ukuran | Kebutuhan | Deskripsi |
|---|---|---|---|---|
Content-Type | String | Variable | Mandatory | Content type, value always application/json |
Authorization | String | Variable | Mandatory | Bearer “accessToken” |
X-TIMESTAMP | String | Variable | Mandatory | Transaction date time, in format YYYY-MMDDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time) |
X-SIGNATURE | String | Variable | Mandatory | Signature will be generated automatically by Merchant. |
X-PARTNER-ID | String | 10 | Mandatory | Unique Partner ID, Partner ID = Client ID |
X-EXTERNAL-ID | String | 40 | Mandatory | Unique messaging Reference ID generated by Merchant. Numeric String. Reference number that should be unique in every transaction . |
CHANNEL-ID | String | 5 | Mandatory | Device identification on which the API services is currently being accessed by the End User (Customer) |
Request Body Parameter for Inquiry - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Tipe | Ukuran | Kebutuhan | Deskripsi |
|---|---|---|---|---|
partnerReferenceNo | String | 40 | Mandatory | Original transaction identifier on service provider system |
additionalInfo | JSON Object | Variable | Mandatory | Additional information |
refreshToken | String | 40 | Mandatory | refreshToken From NICEPAY |
mitraCd | String | 40 | Mandatory | NICEPAY Mitra Code Example : AstraPay : ASTR |
Response Header Parameter for Inquiry - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Tipe | Ukuran | Kebutuhan | Deskripsi |
|---|---|---|---|---|
Content-Type | String | Variable | Mandatory | Content type, value always application/json |
X-TIMESTAMP | String | Variable | Mandatory | Transaction date time, in format YYYY-MMDDTHH:mm:ss+07:00. Time must be in GMT+7(Jakarta time) |
Response Body Parameter for Inquiry - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Tipe | Ukuran | Kebutuhan | Deskripsi |
|---|---|---|---|---|
responseCode | String | 7 | Mandatory | Refer to response code list |
responseMessage | String | 150 | Mandatory | Debug message to provide more information |
referenceNo | String | 40 | Mandatory | NICEPAY Transaction ID |
partnerReferenceNo | String | 40 | Mandatory | Merchant transaction identifier |
additionalInfo | JSON Object | Variable | Mandatory | Additional information |
mitraCd | String | 4 | Mandatory | NICEPAY Mitra Code Example : AstraPay : ASTR AlloBank : ALLO |
accountToken | String | 40 | Mandatory | Account Token Information |
accessTokenInfo | JSON Object | Variable | Mandatory | Account Token Information |
accessToken | String | 150 | Mandatory | Access Token |
expiresIn | String | 25 | Mandatory | Date time of token expiration |
refreshToken | String | 150 | Mandatory | Refresh token |
reExpiresIn | String | 25 | Mandatory | Date time of refresh token expiration |
authCode | String | 30 | Mandatory | Authentication Code for Merchant |
Sample Parameter for Inquiry - Account Binding API E-Wallet (Direct Debit) SNAP
Request Parameter
const config = {
isProduction: false,
privateKey: cons.privateKey,
clientSecret: cons.clientSecret,
clientId: "IONPAYTEST",
isCloudServer: false,
};
const ACCESS_TOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJJT05QQVlURVNUIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJCUklOIiwiZXhwIjoiMjAyNC0wMi0xMVQwODowOTozNVoifQ==.aIybLX36dYwfFvW7dcoenXkOe2EAwIYq84ZtPuIf3K8=";
const parameter = {
body: {
// Inquiry Body Fields
partnerReferenceNo: "2020102900000000000001",
additionalInfo: {
referenceNo: "IONPAYTEST05202208121451526358",
mitraCd: "ASTR"
}
},
headers: {
X_EXTERNAL_ID: "tXid202410142300021707638093",
CHANNEL_ID: "IONPAYTEST01",
},
};
let snap = new Snap(config);
let endPoint = `/api/v1.0/registration-account-inquiry`;
let response = snap
.requestSnapTransaction(parameter, endPoint, ACCESS_TOKEN, "POST");Response Parameter
{
"responseCode": "2000800",
"responseMessage": "Successful",
"referenceNo": "IONPAYTEST05202208121451526358",
"partnerReferenceNo": "2020102900000000000001",
"additionalInfo": {
"mitraCd": "ASTR",
"accountToken": "1Fhas7281han862=",
"accessTokenInfo": {
"accessToken": "ublicpBa869cad0990e4e17a57ecf7c5469a4b2",
"expiresIn": "2021-07-04T12:08:56+05:30",
"refreshToken": "201208134b203fe6c11548bcabd8da5bb087a83b",
"reExpiresIn": "2051-07-04T12:08:56+05:30",
" authCode": "nlleyvaQcB2SOkVjtF7ceCuC16BiqCc6DRrjaKOnnfRdToW8Tr"
}
}
}