---
title: Status Inquiry - API GPN
slug: en/nicepay-api-non-snap-status-inquiry-api-gpn
description: Information about Non-SNAP Payment API - Status Inquiry - GPN API available on NICEPAY system
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/KgJHo60O6kfuIjWWXplb1_nicepay-docs-logo.png
icon: {"faIcon":"fa-solid fa-book"}
docTags: 
createdAt: 2022-12-01T07:48:31.000Z
---

# About API GPN Status Inquiry&#x20;

***

Integration of the Status Inquiry API on GPN is required so that Merchants can check the current status of the transaction process carried out by the Customer whether the status is success, fail, and others. So that the system can have a report on that information.



# API GPN Status Inquiry&#x20;

***

The integration of Inquiry Status on GPN aims to allow Merchants to connect with the API system to check the status of the GPN payment method on a regular basis.



| **API Endpoint**   | `/nicepay/direct/v2/inquiry`                                |
| ------------------ | ------------------------------------------------------------ |
| **Request Method** | <font color="#3b9f0f">**POST**</font>****                    |
| **Description**    | Performs Inquiry Request to NICEPAY for Status Checking&#xD; |
| **Merchant Token** | SHA256(`timeStamp`+`iMid`+`referenceNo`+`amt`+`merchantKey`) |
| **Request Format** | `application/json`                                           |

:::hint{type="info"}
When your `dbProcessUrl` received a notification, NICEPAY strongly encourage Merchants to verify the notification using the [Status Inquiry - API GPN](docId\:uh_CIpwWjJwzG03Pc4_El).
:::

:::hint{type="info"}
`Notification Handling` is very useful to minimize the occurrence of Fraud. We strongly encourage Merchants to verify `Notification Handling`. You can read more detailed information about `Notification Handling` on [Notification - API GPN](docId:3Aszk67snNKK8n1q3Nhd_).
:::



## Request Parameter for GPN Status Inquiry &#x20;

***

The following is a list of parameters for requesting a status inquiry in the GPN transaction process.

| **Parameter**                                                | **Type** | **Size** | **Description**                        | **Example / Notes**                                              |
| ------------------------------------------------------------ | -------- | -------- | -------------------------------------- | ---------------------------------------------------------------- |
| `timeStamp`<br /><font color="#2166ae">Required</font>&#xD;  | N        | 14       | Request Timestamp (`YYYYMMDDHH24MISS`) | 20221114114338                                                   |
| `tXid`<br /><font color="#2166ae">Required</font>          | AN&#xD;  | 30       | Transaction ID                         | IONPAYTEST01202212071629087180                                   |
| `iMid`<br /><font color="#2166ae">Required</font>           | AN       | 10       | Merchant ID                            | IONPAYTEST                                                       |
| `referenceNo`<br /><font color="#2166ae">Required</font>   | ANS      | 40       | Merchant Order Number                  | 815123412341&#xD;                                                |
| `amt`<br /><font color="#2166ae">Required</font>           | N&#xD;   | 12&#xD;  | Transaction Amount	                    | 10000                                                            |
| `merchantToken`<br /><font color="#2166ae">Required</font> | AN&#xD;  | 255&#xD; | Merchant Token                         | 4b11d820b0d2ef509715e7b923430643416efc0df4ca2ba2d4b66eb549e074bd |



## Response Parameter for GPN Status Inquiry &#x20;

***

The following is a list of responses to request status inquiry on the GPN transaction process.

| **Parameter**    | **Type** | **Size** | **Description**                                             | **Example / Notes**            |
| ---------------- | -------- | -------- | ----------------------------------------------------------- | ------------------------------ |
| `resultCd`       | N        | 4        | [Result Code](docId:9eC3yH9CQqpb6cRWauWWO)                  | 0000                           |
| `resultMsg`     | AN       | 255      | Result Message: [Error Code](docId\:FsX1GESJKxOp0T9rvUHp_)  | paid                           |
| `tXid`           | AN       | 30       | Transaction ID&#xD;                                         | IONPAYTEST01202212071629087180 |
| `iMid`           | AN       | 10       | Merchant ID&#xD;<br />                                      | IONPAYTEST                     |
| `referenceNo`    | ANS      | 40       | Merchant Reference Number&#xD;                              | 815123412341                   |
| `payMethod `     | N        | 2        | [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W)         | 09                             |
| `amt `           | N        | 12       | Payment Amount                                              | 10000                          |
| `CancelAmt`      | N        | 12       | Cancel Amount                                               | null                           |
| `reqDt`          | N&#xD;   | 8        | Transaction Request Date (`YYYYMMDD`)**&#xD;**              | 20221207                       |
| `reqTm`          | N&#xD;   | 6        | Transaction Request Time (`HH24MISS`)&#xD;                  | 162908                         |
| `transDt `       | N        | 8        | Transaction Date (`YYYYMMDD`)&#xD;                          | 20221207                       |
| `transTm `       | N        | 6        | Transaction Time (`HH24MISS`)&#xD;                          | 162908                         |
| `depositDt`     | N        | 8        | Transaction Deposit Date (`YYYYMMDD`)                       | null                           |
| `depositTm`     | N        | 6        | Transaction Deposit Time (`HH24MISS`)                       | null                           |
| `currency`       | A        | 3        | Currency                                                    | IDR                            |
| `goodsNm`       | AN       | 100      | Goods Name                                                  | Test Transaction NICEPAY       |
| `billingNm`      | A        | 100      | Buyer Name&#xD;                                             | John Doe                       |
| `status`        | N        | 1        | [Payment Status Code](docId\:QPNU5VtJKCzpxFRhiayAS)         | 0                              |
| `instmntType`    | N        | 2        | [Installment Type Code](docId:_Wzur5wjwhrDR8YXI-Ppi)        | 1                              |
| `instmntMon`     | N        | 2        | Installment Month                                           | 1                              |
| `cardNo`         | N        | 20       | Card Number                                                 | 62210082\*\*\*\*0590           |
| `preauthToken`   | AN       | 64       | Pre-Auth Token                                              | null                           |
| `issuBankCd`     | A        | 4        | [Issuing Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)           | OTHR                           |
| `acquBankCd`     | A        | 4        | [Acquiring Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)         | BNIN                           |
| `vacctValidDt`   | N        | 8        | VA Expiry Date (`YYYYMMDD`)                                 | null                           |
| `vacctValidTm`   | N        | 6        | VA Expiry Time (`HH24MISS`)                                 | null                           |
| `vacctNo`        | N        | 20       | VA Number                                                   | null                           |
| `bankCd`         | A        | 4        | [Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                   | null                           |
| `payNo`          | N        | 12       | Payment Number                                              | null                           |
| `mitraCd`        | A        | 4        | [Mitra Code](docId:0luP35KfOWksiSrzKx6yZ)                   | null                           |
| `receiptCode`    | ANS      | 20       | Authorization Number                                        | null                           |
| `recurringToken` | AN       | 255      | Recurring Token (Needed for Recurring Payment)              | null                           |
| `ccTransType`    | N        | 2        | [Credit Card Transaction Type](docId:7PAs_VD5YLG4VDurMygWo) | 1                              |
| `payValidDt`     | N        | 8        | CVS Expiry Date (`YYYYMMDD`) (CVS)                          | null                           |
| `payValidTm`     | N        | 6        | CVS Expiry Time (`HH24MISS`) (CVS)                          | null                           |
| `mRefNo`         | AN       | 20       | Bank Reference Number (Direct Debit)                        | null                           |
| `acquStatus`     | N        | 2        | Status Bank Acquiring                                       | 20                             |
| `cardExpYymm`    | N        | 4        | Expiry (`YYMM`)                                             | 2612                           |
| `acquBankNm`     | A        | 255      | Acquiring Bank Name                                         | BNI                            |
| `issuBankNm`     | A        | 255      | Issuing Bank Name                                           | OTHER                          |
| `paymentExpDt`   | N        | 6        | QR Payment Expiry Date (`YYYYMMDD`)                         | null                           |
| `paymentExpTm`   | N        | 6        | QR Payment Expiry Time (`HH24MISS`)                         | null                           |
| `paymentTrxSn`   | AN       | 32       | Payment Transaction Number                                  | null                           |
| `cancelTrxSn`    | AN       | 128      | Cancel Transaction Number                                   | null                           |
| `userId`         | AN       | 128      | QRIS User ID Hash                                           | null                           |
| `shopId`         | AN       | 32       | Shop ID                                                     | null                           |



## Additional Response Parameter for Others Status Inquiry

***

The following is additional response list information from request status inquiry in other transaction processes.




| **Parameter** | **Type** | **Size** | **Description**                                                                              | **Example /  Notes** |
| ------------- | -------- | -------- | -------------------------------------------------------------------------------------------- | -------------------- |
| `mitraCd`     | A        | 4        | &#xD;[Mitra Code](docId:0luP35KfOWksiSrzKx6yZ) <br />(CVS, Direct Debit, E-Wallet, Paylater) | null                 |
| `payNo`       | N        | 12       | CVS Number (CVS)&#xD;<br />&#xD;                                                             | null                 |
| `payValidDt`  | N        | 8        | CVS Expiry Date (`YYYYMMDD`) (CVS)&#xD;                                                      | null                 |
| `payValidTm`  | N        | 6        | CVS Expiry Time (`HH24MISS`) (CVS)                                                           | null                 |
| `receiptCode` | ANS      | 20       | Authorization Code (CVS)&#xD;                                                                | null                 |
| `mRefNo`      | AN       | 20       | Bank Reference Number (Direct Debit)&#xD;                                                    | nul                  |


Sample JSON for GPN Status Inquiry&#x20;
----------------------------------------

***

:::CodeblockTabs
JSON Request

```json
{
	"timeStamp":"20221114114338",
	"tXid":"IONPAYTEST01202212071629087180",
	"iMid":"IONPAYTEST",
	"referenceNo":"815123412341",
	"amt":"10000",
	"merchantToken":"4b11d820b0d2ef509715e7b923430643416efc0df4ca2ba2d4b66eb549e074bd"
}
```

JSON Response

```json
{
    "tXid": "IONPAYTEST01202212071629087180",
    "iMid": "IONPAYTEST",
    "currency": "IDR",
    "amt": "10000",
    "instmntMon": "1",
    "instmntType": "1",
    "referenceNo": "815123412341",
    "goodsNm": "Test Transaction Nicepay",
    "payMethod": "09",
    "billingNm": "John Doe",
    "reqDt": "20221207",
    "reqTm": "162908",
    "status": "0",
    "resultCd": "0000",
    "resultMsg": "paid",
    "cardNo": "62210082****0590",
    "preauthToken": null,
    "acquBankCd": "BNIN",
    "issuBankCd": "OTHR",
    "vacctValidDt": null,
    "vacctValidTm": null,
    "vacctNo": null,
    "bankCd": null,
    "payNo": null,
    "mitraCd": null,
    "receiptCode": null,
    "cancelAmt": null,
    "transDt": "20221207",
    "transTm": "162908",
    "recurringToken": null,
    "ccTransType": "1",
    "payValidDt": null,
    "payValidTm": null,
    "mRefNo": null,
    "acquStatus": "10",
    "cardExpYymm": "2612",
    "acquBankNm": "BNI",
    "issuBankNm": "OTHER",
    "depositDt": null,
    "depositTm": null,
    "paymentExpDt": null,
    "paymentExpTm": null,
    "paymentTrxSn": null,
    "cancelTrxSn": null,
    "userId": null,
    "shopId": null
}
```

Java Request

```java
//Inquiry Registration//
nicePay.setTimeStamp("20221114114338");
nicePay.setiMid("IONPAYTEST");
nicePay.setAmt("10000");
nicePay.setReferenceNo("ordNo20221202141217");
nicePay.setMerchantToken(nicePay.makeToken(nicePay.getMerchantToken());
nicePay.settXid("IONPAYTEST01202212071629087180");

// Request Inquiry
nicePay.inquiry();

// Response String //
System.out.println("Final Response String : " + nicePay.getResponseString());

String resultCd = nicePay.Get("resultCd");
String resultMsg = nicePay.Get("resultMsg");
String tXid = nicePay.Get("tXid");
String referenceNo = nicePay.Get("referenceNo");
String payMethod = nicePay.Get("payMethod");
String status = nicePay.Get("status")
String amt = nicePay.Get("amt");
String transDt = nicePay.Get("transDt");
String transTm = nicePay.Get("transTm");
```
:::

