---
title: Check Status Transaction - API QRIS SNAP
slug: nicepay-api-snap-check-status-transaction-qris
description: Informasi tentang Check Status Transaction - API QRIS SNAP yang terdapat pada sistem NICEPAY
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/6KwPIUo-n_-5XFuD7kv9K_microsoftteams-image.png
icon: {"faIcon":"fa-solid fa-book"}
docTags: 
createdAt: 2023-02-17T10:06:41.000Z
---

# Tentang Check Status Transaction - API QRIS SNAP

***

API dengan standar SNAP ini digunakan untuk memeriksa status transaksi pembayaran pada metode pembayaran QRIS.



# Check Status Transaction - API QRIS SNAP

***

:::hint{type="warning"}
Silakan mengajukan akses token terlebih dahulu sebelum melakukan pemeriksaan status transaksi (Check Status Transaction API) melalui bagian [Request Access Token API - SNAP](docId\:GcGqBIYXG1Etcd0Ji9cHX).
:::

| **Service Code** | `47`                                |
| ---------------- | ----------------------------------- |
| **API Endpoint** | `/nicepay/api/v1.0/qr/qr-mpm-query` |
| **HTTP Method**  | **POST**                            |
| **Description**  | Check Status Transaction API&#xD;   |
| **Content-type** | `application/json`                  |



## Request Header Parameter for Check Status Transaction - API QRIS SNAP

***

| **Nama Parameter Header** | **Tipe**          | **Kebutuhan** | **Deskripsi**                                                                                                                                                                     | **Contoh**         |
| ------------------------- | ----------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| `Content-Type`            | String (127)      | Mandatory     | Type of the content                                                                                                                                                               | `Application/Json` |
| `X-TIMESTAMP`             | String <br />(25) | Mandatory     | Using ISO 8601 as timestamp format.<br />Transaction date time, in format `YYYYMMDDTHH:mm:ss+07:00`.<br />Time must be in GMT+7 (Jakarta time).<br />`2022-03-21T10:11:40+07:00`. |                    |
| `Authorization`           | String (Variable) | Mandatory     | "Bearer" + \{`access_token`}                                                                                                                                                      |                    |
| `X-SIGNATURE`             | String (Variable) | Mandatory     | Signature will be generated by Merchant.<br />[Panduan X-Signature - Symmetric](docId\:UZex33ReLyENKOgbJJnYp)                                                                     |                    |
| `X-PARTNER-ID`            | String(20)        | Mandatory     | NICEPAY Client ID (`MID`)                                                                                                                                                         | IONPAYTEST         |
| `X-EXTERNAL-ID`           | String (40)       | Mandatory     | Unique messaging Reference ID generated by Merchant. Numeric String. Reference number that should be unique in every transaction in One Day.                                      |                    |
| `CHANNEL-ID`              | String (20)       | Mandatory     | Unique Channel Merchant Credential ID Number.<br />Client ID + "01" =  Channel ID <br />`"IONPAYTEST" + "01" = "IONPAYTEST01"`                                                    | IONPAYTEST01       |



## Request Body Parameter for Check Status Transaction - API QRIS SNAP

***

| **Nama Parameter BI**        | **Tipe Parameter** | **Kebutuhan** | **Parameter NICEPAY** | **Deskripsi&#x20;**                                                           | **Contoh**                        |
| ---------------------------- | ------------------ | ------------- | --------------------- | ----------------------------------------------------------------------------- | --------------------------------- |
| `originalReferenceNo`        | String<br />(40)   | Mandatory     | `tXid`                | NICEPAY Transaction ID or Identifier                                          | IONPAYTEST08202106091121206416    |
| `originalPartnerReferenceNo` | String<br />(40)   | Mandatory     | `referenceNo`         | Unique Transaction ID from Merchant                                           | ncpy20221017161458                |
| `merchantId`                 | String<br />(10)   | Mandatory     | `iMid`                | NICEPAY Merchant ID                                                           | IONPAYTEST                        |
| `externalStoreId`            | String<br />(32)   | Mandatory     | `storeCd`             | Merchant ID from Acquirer Pay Side                                            | NICEPAY                           |
| `serviceCode`                | String<br />(2)    | Mandatory     | -                     | Transaction Type Indicator (service code of the original transaction request) | 47                                |
| `additionalInfo`             | Object             | Mandatory     | -                     |                                                                               | `"additionalInfo": {`<br />`  }` |



## Response Parameter for Check Status Transaction - API QRIS SNAP

***

| **Nama Parameter BI**        | **Tipe Parameter** | **Kebutuhan** | **Parameter NICEPAY**                               | **Deskripsi**                                                                                                                                                                      | **Contoh**                          |
| ---------------------------- | ------------------ | ------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| `responseCode`               | String (7)         | Mandatory     | `responseCd`                                        | Error Code to Specify the Error Returned<br />[General Response Code and Message - API SNAP](docId\:lKqJXSl5CMKdXYXxHYYSs)                                                         | 2005100                             |
| `responseMessage`            | String (150)       | Mandatory     | `responseMsg`                                       | Debug Message to Provide More Information                                                                                                                                          | Successful                          |
| `originalReferenceNo`        | String (40)        | Mandatory     | `tXid`                                              | NICEPAY Transaction ID or Identifier                                                                                                                                               | IONPAYTEST08202106091121206416      |
| `originalPartnerReferenceNo` | String (40)        | Mandatory     | `referenceNo`                                       | Unique Transaction ID from Merchant                                                                                                                                                | ncpy20221017161458                  |
| `serviceCode`                | String (2)         | Mandatory     | -                                                   | Transaction Type Indicator (Service Code of the Original Transaction Request)                                                                                                      | 47                                  |
| `latestTransactionStatus`    | String (2)         | Mandatory     | `status`                                            | [Status of the Transaction](docId\:XxlWrB0Q8XVkSMaO7ti9a)                                                                                                                          | 00                                  |
| `paidTime`                   | String (25)        | Mandatory     | `transDt`, `transTm`                                | Transaction Date Using ISO-8601 Format<br />`YYYY-MM-DDTHH:MM:SS`                                                                                                                  | 2022-07-20T07:15:00+07:00           |
| `amount`                     | Object             | Mandatory     | `"amount": {`<br />`     ... `<br />`  }`         | -                                                                                                                                                                                  |                                     |
|  - `value`                   | String (12)        | Mandatory     | `amt`                                               | Transaction Amount<br /><br />Note: Amount Format, Currently Only Supported IDR (Indonesian Currency Rupiah) then Value Includes 2 Decimal Digits which are Separated by a Dot (.) | 10000.00                            |
|  - `currency`                | String (3)         | Mandatory     | `Currency`                                          | Default Value: IDR                                                                                                                                                                 | IDR                                 |
| `additionalInfo`             | Object             | Mandatory     | `"additionalInfo": {`<br />`     ... `<br />`  }` |                                                                                                                                                                                    |                                     |
|  - `merchantId`              | String (10)        | Mandatory     | `iMid`                                              | NICEPAY Merchant ID                                                                                                                                                                | IONPAYTEST                          |
|  - `paymentTrxSn`            | String (32)        | Mandatory     | `paymentTrxSn`                                      | Payment Transaction Number from Acquirer Side                                                                                                                                      | 07202210051341224326                |
|  - `cancelTrxSn`             | String (32)        | Conditional   | `cancelTrxSn`                                       | Cancel Transaction Number from Acquirer Side if Payment has been Cancelled                                                                                                         | 07202210051341224326                |
|  - `cancelAmt`               | String (12)        | Conditional   |                                                     | Transaction Amount<br /><br />Note: Amount Format, Currently Only Supported IDR (Indonesian Currency Rupiah) then Value includes 2 Decimal Digits which are Separated by a Dot (.) | 10000.00                            |
|  - `requestTime`             | String (25)        | Mandatory     | `reqDt`,<br />`reqTm`                               | Transaction Date Using ISO-8601 Format<br />`YYYY-MM-DDTHH:MM:SS`                                                                                                                  | 2022-07-20T07:15:00+07:00           |
|  - `goodsNm`                 | String (200)       | Mandatory     |                                                     | Goods Name                                                                                                                                                                         | Merchant Goods 1                    |
|  - `billingNm`               | String (100)       | Mandatory     |                                                     | Buyer Name                                                                                                                                                                         | Buyer Name                          |
|  - `userId`                  | String (128)       | Mandatory     | `userId`                                            | QRIS User ID                                                                                                                                                                       | 213naUASIQBIH341bdjashf1204gkjbcasc |
|  - `externalStoreId`         | String (32)        | Mandatory     | `storeCd`                                           | Merchant ID from Acquirer Pay Side                                                                                                                                                 | NICEPAY                             |



## Sample Parameter for Check Status Transaction - API QRIS SNAP

***

### Request Parameter

:::CodeblockTabs
cURL

```curl
curl -X POST \
  'https://dev.nicepay.co.id/nicepay/api/v1.0/qr/qr-mpm-query' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJUTklDRVFSMDgxIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJOSUNFUEFZIiwiZXhwIjoiMjAyNC0wNC0xOFQwNTowMzo1NloifQ==.IN_MYPmwhWgxRYWnTBZ7RDgG6-UqjZSLfUx9Ayn37Ek=' \
  -H 'X-TIMESTAMP: 2024-04-18T09:00:40+07:00' \
  -H 'X-SIGNATURE: xVVJtqCctS7cfXP4fe8AqTqitg0OSTthfXe4rfTIreUU9CnVTHKh7elbTIDMueHA2Y0PLYNc7+goqsQWYf1WHA==' \
  -H 'X-PARTNER-ID: TNICEQR081' \
  -H 'X-EXTERNAL-ID: 11044820240418' \
  -H 'CHANNEL-ID: TNICEQR08101' \
  -d '{"originalReferenceNo":"TNICEQR08108202404181012168473","originalPartnerReferenceNo":"ordNo2022120215134035","merchantId":"TNICEQR081","externalStoreId":"NicepayStoreID1","serviceCode":"47","additionalInfo":{}}'
```

Node.js

```nodejs
// This configuration should be initialized with your actual credentials
const config = {
  isProduction: false,
  privateKey: "YOUR_PRIVATE_KEY", // Replace with your actual private key
  clientSecret: "YOUR_CLIENT_SECRET", // Replace with your actual client secret
  clientId: "TNICEQR081",
  isCloudServer: false,
};

const accessToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJUTklDRVFSMDgxIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJOSUNFUEFZIiwiZXhwIjoiMjAyNC0wNC0xOFQwNTowMzo1NloifQ==.IN_MYPmwhWgxRYWnTBZ7RDgG6-UqjZSLfUx9Ayn37Ek=";

let paramQuery = {
  body: {
    originalReferenceNo:"TNICEQR08108202404181012168473",
    originalPartnerReferenceNo:"ordNo2022120215134035",
    merchantId:"TNICEQR081",
    externalStoreId:"NicepayStoreID1",
    serviceCode:"47",
    additionalInfo:{}
  },
  headers: {
    X_EXTERNAL_ID: "11044820240418",
    CHANNEL_ID: "TNICEQR08101",
  },
};

let snap = new Snap(config);
let endPoint = `/api/v1.0/qr/qr-mpm-query`;
let response = snap
  .requestSnapTransaction(paramQuery, endPoint, accessToken, "POST");

```

```java

NICEPay config = NICEPay.builder()
        .isProduction(false)
        .isCloudServer(false)
        .clientSecret(CLIENT_SECRET)
        .partnerId("TNICEQR081")
        .externalID("11044820240418")
        .timestamp("2024-04-18T09:00:40+07:00")
        .privateKey(PRIVATE_KEY)
        .build();

String accessToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJUTklDRVFSMDgxIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJOSUNFUEFZIiwiZXhwIjoiMjAyNC0wNC0xOFQwNTowMzo1NloifQ==.IN_MYPmwhWgxRYWnTBZ7RDgG6-UqjZSLfUx9Ayn37Ek=";

InquiryStatus requestData = InquiryStatus.builder()
        .merchantId("TNICEQR081")
        .originalPartnerReferenceNo("ordNo2022120215134035")
        .originalReferenceNo("TNICEQR08108202404181012168473")
        .externalStoreId("NicepayStoreID1")
        .serviceCode("47")
        .build();

NICEPayResponse result =
        SnapInquiryStatusService.callServiceQrisCheckStatus(requestData, accessToken, config);
```

```python
bodyCreateToken = (
    builderAccessToken.BuildAccessToken()
    .setGrantType("client_credentials")
    .setAdditionalInfo("")
    .build()
)

additionalInfo = {
}

bodyQrisInquiry = (
    builderQris.BuildQrisInquiry()
    .setMerchantId("TNICEQR081")
    .setExternalStoreId("NicepayStoreID1")
    .setOriginalReferenceNo("TNICEQR08108202404181012168473")
    .setOriginalPartnerReferenceNo("ordNo2022120215134035")
    .setServiceCode("47")
    .setAdditionalInfo(additionalInfo)
    .build()
)

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

# The service call to execute the transaction
result = SnapService.serviceTransaction(bodyCreateToken.jsonAccessToken(),
                                        bodyQrisInquiry.jsonQrisInquiry(),
                                        ConstantsEndpoints.inquiryQris(),
                                        environment)

```

C#

```csharp
string clientId = "TNICEQR081";
string privateKey = "YOUR_PRIVATE_KEY"; // Replace with your actual private key
string clientSecret = "YOUR_CLIENT_SECRET"; // Replace with your actual client secret
string channelId = "TNICEQR08101";
bool isProduction = false;// set true for Production
bool isCloudServer = false; 

// Values from the cURL command
string timestamp = "2024-04-18T09:00:40+07:00";
string externalId = "11044820240418";
string accessToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJUTklDRVFSMDgxIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJOSUNFUEFZIiwiZXhwIjoiMjAyNC0wNC0xOFQwNTowMzo1NloifQ==.IN_MYPmwhWgxRYWnTBZ7RDgG6-UqjZSLfUx9Ayn37Ek=";

ApiEndpoints apiEndpoints = new ApiEndpoints();
APIService qrisService = new APIService(apiEndpoints, clientSecret, clientId, channelId, isProduction, isCloudServer);
SnapQrisServices snapQrisServices = new SnapQrisServices(clientId);

var inquiryBody = new
{
    originalReferenceNo = "TNICEQR08108202404181012168473",
    originalPartnerReferenceNo = "ordNo2022120215134035",
    merchantId = "TNICEQR081",
    externalStoreId = "NicepayStoreID1",
    serviceCode = "47",
    additionalInfo = new {}
};

string requestBodyJson = Newtonsoft.Json.JsonConvert.SerializeObject(inquiryBody);

string endpoint = apiEndpoints.StatusQris; 
string inquiryResponse = await qrisService.SendPostRequest(endpoint, accessToken, timestamp, requestBodyJson, externalId);
Console.WriteLine("Inquiry Qris Response: " + inquiryResponse);


```

Laravel

```php
protected $useProd = false;
protected $useCloud = false;
protected $inquiry_qris_endpoint = "/api/v1.0/qr/qr-mpm-query";

// Credential
protected $client_id = "TNICEQR081";
PROTECTED $key = "_PRIVATE_KEY_MERCHANT";
PROTECTED $client_secret = "_CLIENT_SECRET_MERCHANT";
PROTECTED $access_token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJUTklDRVFSMDgxIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJOSUNFUEFZIiwiZXhwIjoiMjAyNC0wNC0xOFQwNTowMzo1NloifQ==.IN_MYPmwhWgxRYWnTBZ7RDgG6-UqjZSLfUx9Ayn37Ek="; // Authorization Bearer
PROTECTED $store_id = "NicepayStoreID1";

$url = HttpUtil::getNicepayDomain($this->useProd, $this->useCloud) . $this->inquiry_qris_endpoint;

$helper = new Helpers();
$http_method = "POST";

$x_time_stamp = '2024-04-18T09:00:40+07:00';
$date = Carbon::parse($x_time_stamp);
$time_stamp = $date->format("YmdHis");

$partner_id = $this->client_id;
$client_secret = $this->client_secret;
$access_token = $this->access_token;
$store_id = $this->store_id;


$external_id = "11044820240418";
$original_reference_no = "TNICEQR08108202404181012168473";
$reference_no = "ordNo2022120215134035";

$additionalInfo = (object)[];

$body = [
    "originalReferenceNo" => $original_reference_no,
    "originalPartnerReferenceNo" => $reference_no,
    "merchantId" => $partner_id,
    "externalStoreId" => $store_id,
    "serviceCode" => "47",
    "additionalInfo" => $additionalInfo
];

$string_to_sign = $helper->generateStringToSign(
    $http_method,
    $this->inquiry_qris_endpoint,
    $access_token,
    $body,
    $x_time_stamp
);

$signature = $helper->hmacSHA512Encoded(
    $string_to_sign,
    $client_secret,
    OPENSSL_ALGO_SHA512
);

$channel_id = "TNICEQR08101";

$header = $helper->generateHeader(
    $access_token,
    $x_time_stamp,
    $signature,
    $partner_id,
    $external_id,
    $channel_id
);


$response = HttpUtil::postJsonRequestWithHeader($url, $body, $header);
```

PHP Native

```php
$partnerId = "TNICEQR081";
$externalId = "11044820240418";
$timestamp = '2024-04-18T09:00:40+07:00';
$originalReferenceNo = "TNICEQR08108202404181012168473";
$originalPartnerReferenceNo = "ordNo2022120215134035";
$externalStoreId = "NicepayStoreID1";
$serviceCode = "47";
$accessToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJUTklDRVFSMDgxIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJOSUNFUEFZIiwiZXhwIjoiMjAyNC0wNC0xOFQwNTowMzo1NloifQ==.IN_MYPmwhWgxRYWnTBZ7RDgG6-UqjZSLfUx9Ayn37Ek="; 

// Step 1: Configure the SDK
$config = NICEPay::builder()
    ->setIsProduction(false)
    ->setPrivateKey("MERCHANT_PRIVATE_KEY")
    ->setClientSecret("MERCHANT_CLIENT_SECRET")
    ->setPartnerId($partnerId)
    ->setExternalID($externalId)
    ->setTimestamp($timestamp)
    ->build();

// Step 2: Define the Request Body
$requestBody = InquiryStatus::builder()
    ->setOriginalReferenceNo($originalReferenceNo)
    ->setOriginalPartnerReferenceNo($originalPartnerReferenceNo)
    ->setMerchantId($partnerId)
    ->setExternalStoreId($externalStoreId)
    ->setServiceCode($serviceCode)
    ->setAdditionalInfo((object)[])
    ->build();

// Step 3: Execute the request
try {
    $qrisService = new SnapQrisService($config);
    $response = $qrisService->inquiryStatus($requestBody, $accessToken);
} catch (\Exception $e) {
    // Handle exceptions
}
```

```kotlin
val config: NICEPay = NICEPay.Builder()
    .isProduction(false)
    .clientSecret(CLIENT_SECRET)
    .partnerId("TNICEQR081")
    .externalID("11044820240418")
    .timestamp("2024-04-18T09:00:40+07:00")
    .privateKey(PRIVATE_KEY)
    .build()

val accessToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJUTklDRVFSMDgxIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJOSUNFUEFZIiwiZXhwIjoiMjAyNC0wNC0xOFQwNTowMzo1NloifQ==.IN_MYPmwhWgxRYWnTBZ7RDgG6-UqjZSLfUx9Ayn37Ek="

val checkStatusRequest: SnapCheckStatus = SnapCheckStatus.Builder()
    .merchantId("TNICEQR081")
    .originalPartnerReferenceNo("ordNo2022120215134035")
    .originalReferenceNo("TNICEQR08108202404181012168473")
    .serviceCode("47")
    .externalStoreId("NicepayStoreID1")
    .build()

val response: NICEPayResponse? = snapQrisService.checkStatus(checkStatusRequest, accessToken, config)
```

CodeIgniter

```php

$partnerId = "TNICEQR081";
$externalId = "11044820240418";
$timestamp = '2024-04-18T09:00:40+07:00';
$originalReferenceNo = "TNICEQR08108202404181012168473";
$originalPartnerReferenceNo = "ordNo2022120215134035";
$externalStoreId = "NicepayStoreID1";
$serviceCode = "47";
$accessToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJUTklDRVFSMDgxIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJOSUNFUEFZIiwiZXhwIjoiMjAyNC0wNC0xOFQwNTowMzo1NloifQ==.IN_MYPmwhWgxRYWnTBZ7RDgG6-UqjZSLfUx9Ayn37Ek="; // Hardcoded Bearer Token

// Step 1: Configure the config
$config = NICEPay::builder()
    ->setIsCloudServer(isCloudServer: false)
    ->setPrivateKey("MERCHANT_PRIVATE_KEY")
    ->setClientSecret("MERCHANT_CLIENT_SECRET")
    ->setPartnerId($partnerId)
    ->setExternalID($externalId)
    ->setTimestamp($timestamp)
    ->build();

// Step 2: Define the Inquiry Request Body
$requestBody = InquiryStatusQris::builder()
    ->setOriginalReferenceNo($originalReferenceNo)
    ->setOriginalPartnerReferenceNo($originalPartnerReferenceNo)
    ->setMerchantId($partnerId)
    ->setExternalStoreId($externalStoreId)
    ->setServiceCode($serviceCode)
    ->setAdditionalInfo([])
    ->build();

// Step 3: Execute the request
$snapQrisService = new SnapQrisService();

// Call the inquiryStatusQris function
$response = $snapQrisService->inquiryStatusQris($requestBody, $accessToken, $config);
```
:::

### Response Parameter

:::CodeblockTabs
Sample Response

```json
{
    "responseCode": "2005100",
    "responseMessage": "Successful",
    "originalReferenceNo": "TNICEQR08108202404181012168473",
    "originalPartnerReferenceNo": "ordNo2022120215134035",
    "serviceCode": "47",
    "latestTransactionStatus": "00",
    "paidTime": "2024-04-18T10:14:07+07:00",
    "amount": {
        "value": "100.00",
        "currency": "IDR"
    },
    "additionalInfo": {
        "goodsNm": "Test SNAP Transaction Nicepay",
        "billingNm": "John Doe",
        "merchantId": "TNICEQR081",
        "paymentTrxSn": "101378968850945616",
        "cancelTrxSn": "",
        "userId": "101378968850945616",
        "externalStoreId": "NicepayStoreID1",
        "requestTime": "2024-04-18T10:12:16+07:00"
    }
}
```
:::

