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

# About API Direct Debit Status Inquiry

***

Integration of the Status Inquiry API on Direct Debit 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 Direct Debit Status Inquiry

***

The integration of Inquiry Status on Direct Debit aims to allow Merchants to connect with the API system to check the status of the Direct Debit 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 recommend Merchant to verify the notification using the [Status Inquiry - API Direct Debit](docId\:k3CQyBZOjMwER6XQaFXEt).
:::

:::hint{type="info"}
`Notification Handling`  is very useful to minimize the risk of Fraud. We strongly encourage Merchants to verify `Notification Handling`. You can read more detailed information about `Notification Handling` on [Notification - API Direct Debit](docId:1BCgqCh_9QPLgx6S7KfpU)&#x20;
:::



## Request Parameter for Direct Debit Status Inquiry

***

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

| **Parameter**                                                | **Type** | **Size** | **Description**                        | **Example / Notes**                                              |
| ------------------------------------------------------------ | -------- | -------- | -------------------------------------- | ---------------------------------------------------------------- |
| `timeStamp`<br /><font color="#2166ae">Required</font>&#xD;  | N        | 14       | Request Timestamp (`YYYYMMDDHH24MISS`) | 20220521144206                                                   |
| `tXid`<br /><font color="#2166ae">Required</font>          | AN&#xD;  | 30       | Transaction ID                         | TNICECP04104202205191442060467                                   |
| `iMid`<br /><font color="#2166ae">Required</font>           | AN       | 10       | Merchant ID                            | TNICECP041                                                       |
| `referenceNo`<br /><font color="#2166ae">Required</font>   | ANS      | 40       | Merchant Order Number                  | 20220519144204&#xD;                                              |
| `amt`<br /><font color="#2166ae">Required</font>           | N&#xD;   | 12&#xD;  | Transaction Amount	                    | 2000                                                             |
| `merchantToken`<br /><font color="#2166ae">Required</font> | AN&#xD;  | 255&#xD; | Merchant Token                         | 415c63ed51b7fd1f8fb39b48138cd15d8edf301309b2330f7548970196a0073c |



## Response Parameter for Direct Debit Status Inquiry &#x20;

***

The following is a list of responses to request status inquiry on the Direct Debit 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_)                                                    | unpaid                         |
| `tXid`           | AN       | 30       | Transaction ID&#xD;                                                                                           | TNICECP04104202205191442060467 |
| `iMid`           | AN       | 10       | Merchant ID&#xD;                                                                                              | TNICECP041                     |
| `referenceNo `   | ANS      | 40       | Merchant Reference Number&#xD;                                                                                | 20220519144204                 |
| `payMethod`      | N        | 2        | [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W)                                                           | 04                             |
| `amt`            | N        | 12       | Payment Amount                                                                                                | 2000                           |
| `CancelAmt`      | N        | 12       | Cancel amount                                                                                                 | null                           |
| `reqDt`          | N&#xD;   | 8        | Transaction Request Date (`YYYYMMDD`)&#xD;                                                                    | 20220519                       |
| `reqTm`          | N&#xD;   | 6        | Transaction Request Time (`HH24MISS`)&#xD;                                                                    | 144206                         |
| `transDt`        | N        | 8        | Transaction Date (`YYYYMMDD`)&#xD;                                                                            | null                           |
| `transTm`        | N        | 6        | Transaction Time (`HH24MISS`)&#xD;                                                                            | null                           |
| `depositDt`     | N        | 8        | Transaction Deposit Date (`YYYYMMDD`)                                                                         | null                           |
| `depositTm`     | N        | 6        | Transaction Deposit Time (`HH24MISS`)                                                                         | null                           |
| `mitraCd`        | A        | 4        | [Mitra Code](docId:0luP35KfOWksiSrzKx6yZ)                                                                     | null                           |
| `instmntMon`     | N        | 2        | Installment Month                                                                                             | null                           |
| `instmntType`    | N        | 2        | [Installment Type Code](docId:_Wzur5wjwhrDR8YXI-Ppi)                                                          | 1                              |
| `cardNo`         | N        | 20       | Credit Card Number                                                                                            | null                           |
| `preauthToken`   | AN       | 64       | Pre-Auth Token                                                                                                | null                           |
| `acquBankCd`     | A        | 4        | [Acquiring Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                                                           | null                           |
| `issuBankCd`     | A        | 4        | [Issuing Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                                                             | null                           |
| `vacctValidDt`   | N        | 8        | VA Expiry Date (`YYYYMMDD`)	                                                                                  | null                           |
| `vacctValidTm`   | N        | 6        | VA Expiry Time (`HH24MISS`)                                                                                   | null                           |
| `vacctNo`        | N        | 20       | Virtual Account Number                                                                                        | null                           |
| `bankCd`         | A        | 4        | [Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                                                                     | null                           |
| `payNo`          | N        | 12       | CVS Number (CVS)&#xD;                                                                                         | null                           |
| `receiptCode`    | ANS      | 20       | Authorization Number                                                                                          | null                           |
| `recurringToken` | AN       | 64       | Recurring Payment Token	                                                                                      | null                           |
| `ccTransType`    | N        | 2        | [Credit Card Transaction Type](docId:7PAs_VD5YLG4VDurMygWo)                                                   | null                           |
| `payValidDt`     | N        | 8        | Expiry Date (`YYYYMMDD`)&#xD;                                                                                 | null                           |
| `payValidTm`     | N        | 6        | Expiry Time (`HH24MISS`)&#xD;                                                                                 | null                           |
| `mRefNo`         | AN       | 18       | Bank Reference Number                                                                                         | null                           |
| `acquStatus`     | N        | 2        | Purchase Status&#xD;<br />`1`: Normal&#xD;<br />`2`: Recurring&#xD;<br />`3`: Pre-Auth&#xD;<br />`4`: Capture | null                           |
| `cardExpYymm`    | N        | 4        | Card Expiration (`YYMM`)&#xD;<br />                                                                           | null                           |
| `acquBankNm`     | A        | 255      | Acquiring Bank Name                                                                                           | null                           |
| `issuBankNm`     | A        | 255      | Issuing Bank Name                                                                                             | null                           |
| `depositDt`      | N        | 8        | Deposit Date (`YYYYMMDD`)&#xD;                                                                                | null                           |
| `depositTm`      | N        | 6        | Deposit Time (`HH24MISS`)&#xD;                                                                                | null                           |
| `paymentExpDt`   | N        | 6        | QR Payment Expiry Date (`YYYYMMDD`)&#xD;                                                                      | null                           |
| `paymentExpTm`   | N        | 6        | QR Payment Expiry Time (`HH24MISS`)                                                                           | null                           |
| `paymentTrxSn`   | N        | 32       | Payment Transaction Number                                                                                    | null                           |
| `cancelAmt`      | N        | 12       | Cancel Amount                                                                                                 | null                           |
| `cancelTrxSn`    | AN       | 32       | Cancel Transaction Number                                                                                     | null                           |
| `currency`       | A        | 3        | Currency                                                                                                      | IDR                            |
| `goodsNm `      | AN       | 100      | Goods Name                                                                                                    | Test Transaction               |
| `billingNm`      | A        | 100      | Buyer name&#xD;                                                                                               | John Doe                       |
| `status`        | N        | 1        | [Payment Status Code](docId\:QPNU5VtJKCzpxFRhiayAS)                                                           | 9                              |
| `userId`         | AN       | 128      |  QRIS User ID Hash                                                                                            | null                           |
| `shopId`         | AN       | 32       | Shop ID                                                                                                       | null                           |



## Sample JSON for Direct Debit Status Inquiry&#x20;

***

:::CodeblockTabs
JSON Request

```json
{
	"timeStamp":"20220521144206",
	"tXid":"TNICECP04104202205191442060467",
	"iMid":"TNICECP041",
	"referenceNo":"20220519144204",
	"amt":"2000",
	"merchantToken":"415c63ed51b7fd1f8fb39b48138cd15d8edf301309b2330f7548970196a0073c"
}
```

JSON Response

```json
{
    "tXid": "TNICECP04104202205191442060467",
    "iMid": "TNICECP041",
    "currency": "IDR",
    "amt": "2000",
    "instmntMon": null,
    "instmntType": "1",
    "referenceNo": "20220519144204",
    "goodsNm": "Test Transaction",
    "payMethod": "04",
    "billingNm": "John Doe",
    "reqDt": "20220519",
    "reqTm": "144206",
    "status": "9",
    "resultCd": "0000",
    "resultMsg": "init",
    "cardNo": null,
    "preauthToken": null,
    "acquBankCd": null,
    "issuBankCd": null,
    "vacctValidDt": null,
    "vacctValidTm": null,
    "vacctNo": null,
    "bankCd": null,
    "payNo": null,
    "mitraCd": null,
    "receiptCode": null,
    "cancelAmt": null,
    "transDt": null,
    "transTm": null,
    "recurringToken": null,
    "ccTransType": null,
    "payValidDt": null,
    "payValidTm": null,
    "mRefNo": null,
    "acquStatus": null,
    "cardExpYymm": null,
    "acquBankNm": null,
    "issuBankNm": null,
    "depositDt": null,
    "depositTm": null,
    "paymentExpDt": null,
    "paymentExpTm": null,
    "paymentTrxSn": null,
    "cancelTrxSn": null,
    "userId": null,
    "shopId": null
}
```

Java Request

```java
//Inquiry Registration//
nicePay.setTimeStamp("20220521144206");
nicePay.setiMid("TNICECP041");
nicePay.setAmt("2000");
nicePay.setReferenceNo("20220519144204");
nicePay.setMerchantToken(nicePay.makeToken(nicePay.getMerchantToken());
nicePay.settXid("TNICECP04104202205191442060467");

// 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");
String shopId = nicePay.Get("shopId");
```
:::

