Check Status Transaction - API E-Wallet (Direct Debit) SNAP
About Check Status Transaction - API E-Wallet (Direct Debit) SNAP
This API uses to check the payment transaction status on the E-Wallet payment method with Direct Debit Host to Host Feature based on the SNAP standard.
Check Status Transaction - API E-Wallet (Direct Debit) SNAP
Please request the access token firsthand before performing the authentication through the Request Access Token API - SNAP section.
Service Code | 55 |
|---|---|
API Endpoint | |
HTTP Method | POST |
Description | Request check status for authentication |
Content-type | application/json |
Request Header Parameter for Check Status Transaction - API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Required | Description | Example |
|---|---|---|---|---|---|
Content-Type | String | 127 | Mandatory | Application/Json | |
Authorization | String | Variable | Mandatory | Bearer “access_token” | |
X-TIMESTAMP | String | 25 | Mandatory | Using ISO 8601 as timestamp format. Transaction date time, in format YYYYMMDDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time). 2022-03-21T10:11:40+07:00. | |
X-SIGNATURE | String | Variable | Mandatory | Signature will be generated by Merchant. | |
X-PARTNER-ID | String | 20 | Mandatory | X-PARTNER-ID = CLIENT_ID | |
X-EXTERNAL-ID | String | 40 | Mandatory | Unique Reference Number (41807553358950093184) | |
CHANNEL-ID | String | 5 | Mandatory | Unique Channel Merchant Credential ID Number. Client ID + "01" = Channel ID "IONPAYTEST" + "01" = "IONPAYTEST01" | IONPAYTEST01 |
Request Body Parameter for Check Status Transaction - API E-Wallet (Direct Debit) SNAP
Parameter | Type | Required | Length | Description or Example |
|---|---|---|---|---|
merchantId | String | Mandatory | 10 | Merchant identifier that is unique per each Merchant |
subMerchantId | String | O | 32 | Sub Merchant ID |
originalReferenceNo | String | Mandatory | 40 | Original transaction identifier on service provider system |
originalPartnerReferenceNo | String | Mandatory | 40 | Original transaction identifier on consumer system |
externalStoreId | String | O | 32 | Unique identifier of Shop ID in Client system |
serviceCode | String | Mandatory | 2 | Transaction type indicator (service code of the original transaction request) |
amount | Array of JSON Object | Mandatory | Variable | Amount of transaction "amount": { "value": "12345678.00", "currency": "IDR" } |
value | String | Mandatory | 12 | Value |
currency | String | Mandatory | 3 | Currency |
transactionDate | String | Optional | 25 | Transaction date: ISO8601, in format YYYYMMDDTHH: mm:ss+07:00. Time must be in GMT+7 (Jakarta time) |
additionalInfo | JSON Object | Optional | Variable | Additional information |
Response Parameter for Check Status Transaction - API E-Wallet (Direct Debit) SNAP
Parameter | Type | Required | Length | Description or Example |
|---|---|---|---|---|
responseCode | String | Mandatory | 7 | Refer to General Response Code and Message - API SNAP list |
responseMessage | String | Mandatory | 150 | Refer to General Response Code and Message - API SNAP list |
originalReferenceNo | String | Mandatory | 40 | Original transaction identifier on service provider system |
originalPartnerReferenceNo | String | Mandatory | 40 | Original transaction identifier on service provider system. Must be filled upon successful transaction. |
serviceCode | String | Mandatory | 2 | Transaction type indicator (service code of the original transaction request) |
latestTransactionStatus | String | Mandatory | 2 | Category code for the status of the transaction. Example: 00: Success 01: Initiated 02: Paying 03: Pending 04: Refunded 05: Canceled 06: Failed 07: Not found |
transactionStatusDesc | String | Optional | 50 | Description status transaction |
transAmount | Array of JSON Object | Mandatory | Variable | Amount of transaction "transAmount": { "currency": "IDR", "value": "239.00" } |
value | String | Mandatory | 12 | Value |
currency | String | Mandatory | 3 | Currency |
paidTime | String | Conditional | 25 | Transaction date: ISO 8601 YYYY-MM DDThh:mm:ss If the the transaction is Success, it will contain time from after payment completely successful. Meanwhile for transactions that are Pending or Failed, it will contain time from during initial payment request to the Partner. |
additionalInfo | JSON Object | Optional | Variable | Additional Information "additionalInfo": { ... } |
mitra_cd | String | Mandatory | 4 | |
goodsNm | String | Mandatory | 200 | Goods Name |
billingNm | String | Mandatory | 100 | Buyer Name |
billingPhone | String | Mandatory | 20 | Buyer Phone Number |
Sample Parameter for Check Status Transaction - API E-Wallet (Direct Debit) SNAP
Request Parameter
// --- Debit Payment Status Data (TNICEEW051 Context) ---
const PARTNER_ID = "TNICEEW051";
const ACCESS_TOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJJT05QQVlURVNUIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJCUklOIiwiZXhwIjoiMjAyNC0wMi0xMVQwODowOTozNVoifQ==.aIybLX36dYwfFvW7dcoenXkOe2EAwIYq84ZtPuIf3K8=";
const X_TIMESTAMP = "2024-12-31T10:11:40+07:00";
const X_EXTERNAL_ID = "tXid202402111402271707638100";
const CHANNEL_ID = "TNICEEW05101";
const MERCHANT_ID_BODY = "23489182303312";
const STORE_ID = "239840198240795109";
const SUB_MERCHANT_ID = "23489182303312";
const PARTNER_REF_NO = "2020102900000000000001";
const ORIGINAL_REF_NO = "TNICEEW05105202210141451109841";
const SERVICE_CODE = "54";
const TRANSACTION_DATE = "2020-12-21T14:56:11+07:00";
const AMOUNT_VALUE = "12345678.00";
// Step 1: Configure the SDK
const config = {
isProduction: false,
privateKey: cons.privateKey,
clientSecret: cons.clientSecret,
clientId: PARTNER_ID, // TNICEEW051
isCloudServer: false,
};
// Step 2: Define the Debit Status Inquiry Request Parameters
let paramCheckStatus = {
body: {
merchantId: MERCHANT_ID_BODY,
subMerchantId: SUB_MERCHANT_ID,
originalPartnerReferenceNo: PARTNER_REF_NO,
originalReferenceNo: ORIGINAL_REF_NO,
serviceCode: SERVICE_CODE,
transactionDate: TRANSACTION_DATE,
externalStoreId: STORE_ID,
amount: {
value: AMOUNT_VALUE,
currency: "IDR",
},
additionalInfo: {}
},
headers: {
X_EXTERNAL_ID: X_EXTERNAL_ID,
CHANNEL_ID: CHANNEL_ID,
},
};
let snap = new Snap(config);
let endPoint = `/api/v1.0/debit/status`;
let response = snap
.requestSnapTransaction(paramCheckStatus, endPoint, ACCESS_TOKEN, "POST");Response Parameter
{
"responseCode": "2005500",
"responseMessage": "Successful",
"originalPartnerReferenceNo": "2020102900000000000001",
"originalReferenceNo": "TNICEEW05105202210141451109841",
"serviceCode": "54",
"latestTransactionStatus": "00",
"transactionStatusDesc": "success",
"transAmount": {
"currency": "IDR",
"value": "100.00"
},
"paidTime": "2020-12-21T14:56:11+07:00",
"additionalInfo": {
"mitra_cd": "DANA",
"goodsNm": "Merchant Goods 1",
"billingNm": "Buyer Name",
"billingPhone": "02112345678"
}
}