---
title: Status Inquiry - API Checkout
slug: en/nicepay-api-status-inquiry-api-checkout
description: Information about API Checkout - Status Inquiry for all payment methods provided by NICEPAY
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/9lkedFC7PCitdsZ4e_ii7_microsoftteams-image.png
icon: {"faIcon":"fa-solid fa-book"}
docTags: 
createdAt: 2022-09-21T02:54:58.000Z
---

# About Status Inquiry - API Checkout

***

After you integrate successfully with NICEPAY [Registration - API Checkout](docId\:pjBflBNCehkuuuqQSAiug), your business is ready to do transactions in real with your Customer. However, NICEPAY recommend you to performs other [API Checkout](docId\:MZwfB77ewiYNEInwfmzdQ) integration like this Inquiry API.

This API uses to check on transaction status you are requested on the previous [Registration - API Checkout](docId\:pjBflBNCehkuuuqQSAiug) such as successful or failed transaction status.

When the transaction is completed, you will automatically get notification from us. NICEPAY strongly recommend you to re-check the transaction status using [Status Inquiry - API Checkout](docId\:RhH7PmISd6IHN99yWVJHm).



# Status Inquiry - API Checkout

***

| **API URL**         | `/nicepay/direct/v2/inquiry`                                      |
| ------------------- | ----------------------------------------------------------------- |
| **Request Method**  | `POST`                                                            |
| **Header**          | `Content-Type: application/json`****                              |
| **Merchant Token**  | SHA256 (`timestamp`+ `iMid`+ `referenceNo`+ `amt`+ `merchantKey`) |

:::hint{type="info"}
When notification received to your `dbProcessUrl`, we strongly recommend Merchant to verify the Notification using [Status Inquiry - API Checkout](docId\:RhH7PmISd6IHN99yWVJHm).
:::



## Notification Handling

:::hint{type="info"}
`Notification Handling` is useful to minimalize Fraud actions, we strongly recommend Merchants to verify the `Notification Handling`.
:::

::Image[]{src="https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/W9M8IuHjqQ6IrGJiumu13_nicepay-api-checkout-api-notification-handling-flow-1.png" size="50" width="370" height="361" caption="Status Inquiry - Notification Handling" position="center" showCaption="true"}



## Request Parameters for Status Inquiry - API Checkout

| **Parameter**                                              | **Type** | **Size** | **Description**                       | **Remark**                                                       |
| ---------------------------------------------------------- | -------- | -------- | ------------------------------------- | ---------------------------------------------------------------- |
| `timeStamp`<br /><font color="#2166ae">Required</font>     | N        | 14       | API Request Date (`YYYYMMDDHH24MISS`) | 20221012080918                                                   |
| `tXid`<br /><font color="#2166ae">Required</font>          | AN       | 30       | Transaction ID<br />                  | IONPAYTEST00202212191025073439                                   |
| `iMid`<br /><font color="#2166ae">Required</font>          | AN       | 10       | Merchant ID<br />                     | IONPAYTEST                                                       |
| `referenceNo`<br /><font color="#2166ae">Required</font>   | ANS      | 40       | Merchant Order Number<br />           | ORDER20221012080918                                              |
| `amt`<br /><font color="#2166ae">Required</font>           | N        | 12       | Transaction Amount<br />              | 10000                                                            |
| `merchantToken`<br /><font color="#2166ae">Required</font> | AN       | 255      | Merchant Token<br />                  | d8d0968892c568bc6ff5adc17cd755f85334a0b58fce85392682993a9ba653ed |



## Response Parameters

| **Parameter** | **Type** | **Size** | **Description**                                             | **Remark**                     |
| ------------- | -------- | -------- | ----------------------------------------------------------- | ------------------------------ |
| `resultCd`    | N        | 4        | [Result Code](docId:9eC3yH9CQqpb6cRWauWWO)                  | 0000                           |
| `resultMsg`   | AN       | 255      | Result Message: [Error Code](docId\:FsX1GESJKxOp0T9rvUHp_)  | (empty)                        |
| `tXid`        | AN       | 30       | Transaction ID                                              | IONPAYTEST00202212191025073439 |
| `iMid`        | AN       | 10       | Merchant ID                                                 | IONPAYTEST                     |
| `referenceNo` | ANS      | 40       | Merchant Order Number                                       | ORDER20221012080918            |
| `payMethod`   | N        | 2        | [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W)         | 00                             |
| `amt`         | N        | 12       | Payment Amount                                              | 10000                          |
| `cancelAmt`   | N        | 12       | Cancel Amount                                               | null                           |
| `reqDt`       | N        | 8        | Transaction Request Date (`YYYYMMDD`)                       | 20221219                       |
| `reqTm`       | N        | 6        | Transaction Request Time (`HH24MISS`)                       | 102507                         |
| `transDt`     | N        | 8        | Transaction Date (`YYYYMMDD`)                               | null                           |
| `transTm`     | N        | 6        | Transaction Time (`HH24MISS`)                               | null                           |
| `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                                                  | John Doe                       |
| `status`      | N        | 1        | [Payment Status Code](docId\:QPNU5VtJKCzpxFRhiayAS)         | null                           |

### Additional - Credit Card

| **Parameter**    | **Type** | **Size** | **Description**                                                                                                                                                                                                                    | **Remark**                                                      |
| ---------------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| `authNo`         | N        | 10       | Approval Number                                                                                                                                                                                                                    |                                                                 |
| `issuBankCd`     | A        | 4        | [Issuing Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                                                                                                                                                                                  |                                                                 |
| `acquBankCd`     | A        | 4        | [Acquiring Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                                                                                                                                                                                |                                                                 |
| `acquBankNm`     | A        | 255      | Acquiring Bank Name                                                                                                                                                                                                                |                                                                 |
| `issuBankNm`     | A        | 255      | Issuing Bank Name                                                                                                                                                                                                                  |                                                                 |
| `cardNo`         | ANS      | 20       | Card Number ith Masking                                                                                                                                                                                                            |                                                                 |
| `cardExpYymm`    | N        | 4        | Card Expiration (`YYMM`)                                                                                                                                                                                                           |                                                                 |
| `instmntMon`     | N        | 2        | Installment Month<br />`1`: 1 Month/Full Payment, *if* `instmntType`*:* *null/1*<br />`3`: 3 Months<br />`6`: 6 Months<br />`12`: 12 Months                                                                                        |                                                                 |
| `instmntType`    | N        | 2        | [Installment Type Code](docId:_Wzur5wjwhrDR8YXI-Ppi)                                                                                                                                                                               |                                                                 |
| `preauthToken`   | AN       | 255      | Pre-Auth Token (Needed for Capture Payment)                                                                                                                                                                                        |                                                                 |
| `recurringToken` | AN       | 255      | Recurring Token (Needed for Recurring Payment )                                                                                                                                                                                    |                                                                 |
| `ccTransType`    | N        | 2        | Credit Card Transaction Type                                                                                                                                                                                                       |                                                                 |
| `acquStatus`     | N        | 2        | Purchase Status&#xD;<br />`1`: Normal&#xD;<br />`2`: Recurring&#xD;<br />`3`: Pre-Auth&#xD;<br />`4`: Capture                                                                                                                      |                                                                 |
| `acquirerData`   | Array    | 20       | A dynamic array consisting of a unique reference number RRN that is provided by the Banking Partner when a refund is processed. This reference number can be used by the Customer to track the status of the refund with the Bank. | `"acquirerData": {`<br />`    "rrn": "332608321717"`<br />`  }` |
| `vat`            | N        | 12       | VAT                                                                                                                                                                                                                                |                                                                 |
| `fee`            | N        | 12       | Service Fee                                                                                                                                                                                                                        |                                                                 |
| `notaxAmt`       | N        | 12       | Tax-Fee Amount                                                                                                                                                                                                                     |                                                                 |

### Additional - Virtual Account

| **Parameter**  | **Type** | **Size** | **Description**                            | **Remark** |
| -------------- | -------- | -------- | ------------------------------------------ | ---------- |
| `bankCd`       | A        | 4        | [Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)  |            |
| `vacctNo`      | N        | 16       | Bank Virtual Account Number                |            |
| `vacctValidDt` | N        | 8        | VA Expiry date (`YYYYMMDD`)                |            |
| `vacctValidTm` | N        | 6        | VA Expiry time (`HH24MISS`)                |            |

### Additional - Others for Status Inquiry - API Checkout

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



## Sample Parameter for Status Inquiry- API Checkout

***

### Request Parameter for Status Inquiry - API Checkout

:::CodeblockTabs
cURL

```curl
curl --location 'https://dev.nicepay.co.id/nicepay/direct/v2/inquiry' \
--header 'Content-Type: application/json' \
--data '{
    "timeStamp" : "20251111021168",
    "iMid" : "IONPAYTEST",
    "tXid" : "IONPAYTEST02202511110206549179",
    "referenceNo" : "ordNo20251111021198",
    "amt" : "10000",
    "merchantToken" : "3c88adc387f1971beccc7189779281756c11ffcf9337f7ab5e8c8e5e1947be08"
}'
```

Node.js

```nodejs
const SecondApiVersion = require("../lib/secondApiVersion.js");
const cons = require("./sharedConfig.js");

const config = {
  isProduction: false,
  isCloudServer: false,
  merchantKey: cons.merchantKey,
};

const parameter = {
  "timeStamp": "20251111021168",
  "iMid": "IONPAYTEST",
  "tXid": "IONPAYTEST02202511110206549179",
  "referenceNo": "ordNo20251111021198",
  "amt": "10000"
};

let secondVersion = new SecondApiVersion(config);

let response = secondVersion
  .requestAPI(parameter, "/direct/v2/inquiry");
```

```java
config =NICEPay.builder()
                .isProduction(false)
                .isCloudServer(false)
                .clientSecret(CLIENT_SECRET)
                .partnerId(PARTNER_ID)
                .externalID(TestingConstants.EXTERNAL_ID)
                .timestamp(TIMESTAMP)
                .privateKey(PRIVATE_KEY_CLOUD)
                .build();

String timeStamp = "20251111021168";
String iMid = "IONPAYTEST";
String tXid = "IONPAYTEST02202511110206549179";
String reffNo = "ordNo20251111021198";
String amount = "10000";

InquiryStatus requestData = InquiryStatus.builder()
        .timeStamp(timeStamp)
        .tXid(tXid)
        .iMid(iMid)
        .merchantToken(timeStamp, iMid, reffNo, amount, TestingConstants.MERCHANT_KEY) 
        .referenceNo(reffNo)
        .amt(amount)
        .build();

NICEPayResponseV2 result = V2InquiryStatusService.callV2InquiryStatus(requestData, config);
```

```python
from python_nicepay.data.builder import builderEnvironment
from python_nicepay.data.builder.v2.professional import builderInquiry
from python_nicepay.data.builder.v2.professional.dataGenerator import DataGenerator
from python_nicepay.service.v2EnterpriseService import ServiceNicepay

bodyInquiry = (
    builderInquiry.BuildInquiry()
    .setTxid("IONPAYTEST02202511110206549179")
    .setReferenceNo("ordNo20251111021198")
    .setAmt("10000")
    .build()
)

environment = (builderEnvironment.BuildEnvironment()
               .isCloud(False)
               .isProduction(False)
               .build())

response = ServiceNicepay.serviceInquiry(DataGenerator.getInquiryBody(bodyInquiry.jsonInquiry()), environment)
```

C#

```csharp
TestingConstantService config = new TestingConstantService();
string merchantKey = config.MerKey;
string clientId = "IONPAYTEST";
string timestamp = "20251111021168";
string refNo = "ordNo20251111021198";
string amount = "10000";
bool isProduction = false; 
bool isCloudServer = false;

var builder = new MerchantTokenBuilder()
  .SetTimeStamp(timestamp)
  .SetIMid(clientId)
  .SetRefNo(refNo)
  .SetAmount(amount)
  .SetMerchantKey(merchantKey);

// Act: Menghasilkan merchantToken
string merchantToken = builder.BuildMerchantToken();

var Bodybuilder = new NicepayRequestBuilder()
.SetCheckStatus(
  iMid : clientId,
  timeStamp : timestamp,
  tXid : "IONPAYTEST02202511110206549179",
  amt : amount,
  referenceNo : refNo,
  merchantToken: merchantToken
);

ApiEndpoints apiEndpoints = new ApiEndpoints();
Dictionary<string, object> payload = Bodybuilder.Build();
string jsonPayload = Newtonsoft.Json.JsonConvert.SerializeObject(payload);

var registrationService = new NicepayRegistrationService(apiEndpoints,isProduction, isCloudServer);
var result = await registrationService.SendPostAsync(apiEndpoints.InquiryV2,payload);
```

Laravel

```php
// Endpoint
$url = HttpUtil::getNicepayDomain($this->useProd, $this->useCloud) . $this->inquiry_endpoint;

// Request body parameter
$timestamp = "20251111021168";
$txid = "IONPAYTEST02202511110206549179";
$reference_no = "ordNo20251111021198";
$amt = "10000"; 
$merchant_token = $this->generateMerchantToken($timestamp, $this->imid, $reference_no, $this->amt, $this->mer_key);

$body = [
    "timeStamp" => $timestamp,
    "tXid" => $txid,
    "iMid" => $this->imid, 
    "merchantToken" => $merchant_token,
    "referenceNo" => $reference_no,
    "amt" => $amt,
];
try {
    $response = HttpUtil::postJsonRequest($url, $body);
} catch (Throwable $th) {
    return $this->generateErrorResponse($th);
}
```

PHP Native

```php
$iMidTest = "IONPAYTEST";
$merchantKey = TestConst::$MERCHANT_KEY;
$config  = NICEPay::builder()
    ->setIsProduction(false)
    ->build();

$timeStamp = "20251111021168";
$reffNo = "ordNo20251111021198";
$amount = "10000";

$parameter = InquiryStatus::builder()
    ->setTimeStamp($timeStamp)
    ->setTxId("IONPAYTEST02202511110206549179")
    ->setIMid($iMidTest)
    ->setMerchantToken($timeStamp, $iMidTest, $reffNo, $amount, $this->merchantKey)
    ->setReferenceNo($reffNo)
    ->setAmt($amount)
    ->build();

try {
    $v2RedirectService = new V2RedirectService($config);
    $response = $v2RedirectService ->inquiryStatus($parameter);
} catch (NicepayError $e) {
}
```

```kotlin
var config: NICEPay? = NICEPay.Builder()
    .isProduction(false)
    .clientSecret(TestingConstants.CLIENT_SECRET)
    .partnerId(TestingConstants.PARTNER_ID)
    .externalID(TestingConstants.EXTERNAL_ID)
    .timestamp(TestingConstants.TIMESTAMP)
    .privateKey(TestingConstants.PRIVATE_KEY)
    .build()

val timeStamp = "20251111021168"
val tXid = "IONPAYTEST02202511110206549179"
val iMid = "IONPAYTEST"
val referenceNo = "ordNo20251111021198"
val amount = "10000"

val request: DirectV2CheckStatus = DirectV2CheckStatus.Builder()
    .timeStamp(timeStamp)
    .tXid(tXid)
    .iMid(iMid)
    .merchantKey(DEFAULT_MERCHANT_KEY)
    .referenceNo(referenceNo)
    .amt(amount)
    .build()

val response: NICEPayResponseV2 = v2VirtualAccountService.checkStatus(request, config)!!
```

CodeIgniter

```php
$iMidTest = "IONPAYTEST";
$this->merchantKey = $testConst::IMID_COMMON_MERCHANT_KEY;

$this->v2Config = NICEPay::builder()
    ->setIsProduction(false)
    ->build();

$timeStamp = "20251111021168";
$reffNo = "ordNo20251111021198";
$amount = "10000";

$config = $this->v2Config;

$parameter = InquiryStatus::builder()
    ->setTimeStamp($timeStamp)
    ->setTxId("IONPAYTEST02202511110206549179")
    ->setIMid($this->iMidTest)
    ->setMerchantToken($timeStamp, $this->iMidTest, $reffNo, $amount, $this->merchantKey)
    ->setReferenceNo($reffNo)
    ->setAmt($amount)
    ->build();

try {
    $v2VaService = new V2VAService($config); // You can use chosen payment method service
    $response = $v2VaService->inquiryStatus($parameter);
} catch (Exception $e) {
}
```
:::

### Response Parameter

:::CodeblockTabs
Sample Response

```json
{
    "tXid": "IONPAYTEST02202511110206549179",
    "iMid": "IONPAYTEST",
    "currency": "IDR",
    "amt": "10000",
    "instmntMon": null,
    "instmntType": "1",
    "referenceNo": "ordNo20251111021198",
    "goodsNm": "Goods",
    "payMethod": "02",
    "billingNm": "Hantu Kesorean",
    "reqDt": "20251111",
    "reqTm": "020654",
    "status": "0",
    "resultCd": "0000",
    "resultMsg": "paid",
    "cardNo": null,
    "preauthToken": null,
    "acquBankCd": null,
    "issuBankCd": null,
    "vacctValidDt": "20280128",
    "vacctValidTm": "235959",
    "vacctNo": "7812001000000605",
    "bankCd": "IBBK",
    "payNo": null,
    "mitraCd": null,
    "receiptCode": null,
    "cancelAmt": null,
    "transDt": "20251111",
    "transTm": "020654",
    "recurringToken": null,
    "ccTransType": null,
    "payValidDt": null,
    "payValidTm": null,
    "mRefNo": null,
    "acquStatus": null,
    "cardExpYymm": null,
    "acquBankNm": null,
    "issuBankNm": null,
    "depositDt": "20251111",
    "depositTm": "020705",
    "paymentExpDt": null,
    "paymentExpTm": null,
    "paymentTrxSn": null,
    "cancelTrxSn": null,
    "userId": null,
    "shopId": null
}
```
:::

