---
title: Registration - API Convenience Store
slug: nicepay-api-non-snap-registration-api-convenience-store
description: Informasi tentang API Non-SNAP Payment - Registration - API Convenience Store yang terdapat pada sistem NICEPAY
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/G580Ae9wHksy_IWu1nOGW_rdrx9d8diaz-pgm07xfz2-test-1-1.png
icon: {"faIcon":"fa-solid fa-book"}
docTags: 
createdAt: 2022-12-01T07:18:40.000Z
---

# Tentang API Convenience Store Registration&#x20;

***

NICEPAY menyediakan Toserba (Indomaret dan Alfamart Group) sebagai metode pembayaran sehingga Pelanggan dapat melakukan pembayaran melalui gerai-gerai Mitra Toserba di Seluruh Indonesia. Notifikasi *real-time* secara langsung akan dikirimkan ketika pembayaran berhasil.

Mitra Toserba NICEPAY:

1. Alfamart
2. Indomaret
3. Lawson
4. Alfamidi
5. Dan+Dan Store



# API Convenience Store Registration&#x20;

***

API ini digunakan untuk mengaktifkan metode pembayaran Convenience Store pada Merchant, sehingga Pelanggan dapat melakukan transaksi pembayaran menggunakan Convenience Store dengan Merchant. Tahapan ini digunakan untuk mengintegrasikan sistem dari Merchant dengan sistem dari NICEPAY.&#x20;

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

:::hint{type="info"}
Silakan kunjungi halaman [NICEPAY Code](docId\:kYd45uYYIjwzVs3dt8_rk) untuk mengetahui daftar istilah kode yang berhubungan dengan sistem API.
:::



## Request Parameter for Convenience Store Registration

***

Berikut ini adalah daftar parameter untuk melakukan *request* registrasi metode pembayaran Convenience Store. Parameter ini digunakan melalui platform pengujian API sebagai salah satu tahapan supaya sistem milik Merchant dapat terhubung dengan layanan dari NICEPAY. &#x20;

| **Parameter**                                                                       | **Tipe**     | **Ukuran** | **Deskripsi**                                        | **Contoh / Catatan**                                                  |
| ----------------------------------------------------------------------------------- | ------------ | ---------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `timeStamp`<br /><font color="#2166ae">Required</font>                              | N            | 14         | Request Timestamp (`YYYYMMDDHH24MISS`)               | 20221202152801                                                        |
| `iMid`<br /><font color="#2166ae">Required</font>                                   | AN           | 10         | Merchant ID	<br />                                   | IONPAYTEST                                                            |
| `payMethod`<br /><font color="#2166ae">Required</font>                              | N            | 2          | [Payment Method Code](docId\:g7inRV70XcSA9lP7bpmok)  | 03&#xD;                                                               |
| `currency`<br /><font color="#2166ae">Required</font>                               | A            | 3          | Currency<br />                                       | IDR                                                                   |
| `amt` <br /><font color="#2166ae">Required</font>                                   | N            | 12         | Amount<br />                                         | 5000                                                                  |
| `referenceNo`<br /><font color="#2166ae">Required</font>                            | ANS          | 40         | Merchant's Reference Number<br />                    | Order12345                                                            |
| `goodsNm `<font color="#2166ae"> </font><br /><font color="#2166ae">Required</font> | AN           | 100        | Goods Name	                                          | Test Transaction NICEPAY&#xD;                                         |
| `billingNm`<br /><font color="#2166ae">Required</font>                              | A            | 100        | Buyer Name	<br />                                    | John Doe&#xD;                                                         |
| `billingPhone `<br /><font color="#2166ae">Required</font>                          | N            | 15         | Buyer Phone Number	<br />                            | 081214714045                                                          |
| `billingEmail `<br /><font color="#2166ae">Required</font>                          | ANS          | 40         | Buyer E-Mail	<br />                                  | email\@merchant.com                                                   |
| `billingAddr `<br /><font color="#2166ae">Required</font>                           | AN           | 100        | Buyer Address	<br />                                 | Jalan Bukit Berbunga 22&#xD;                                          |
| `billingCity `<br /><font color="#2166ae">Required</font>                           | A            | 50         | Buyer City	<br />                                    | Jakarta&#xD;                                                          |
| `billingState `<br /><font color="#2166ae">Required</font>                          | A            | 50         | Billing State	<br />                                 | DKI Jakarta&#xD;                                                      |
| `billingPostCd `<br /><font color="#2166ae">Required</font>                         | N            | 10         | Billing Post Number	<br />                           | 12345                                                                 |
| `billingCountry `<br /><font color="#2166ae">Required</font>                        | A            | 10         | Billing Country	<br />                               | Indonesia                                                             |
| `cartData`                                                                          | `JSONstring` | 4000       | Cart Data                                            |                                                                       |
| `mitraCd`<br /><font color="#2166ae">Required </font>                               | A            | 4          | [Mitra Code](docId\:DwzaQDD7DXZMECz80A6o8)  <br />   | ALMA                                                                  |
| `userIP `                                                                           | AN           | 15         | User IP                                              | &#xD;127.0.0.1                                                        |
| `dbProcessUrl`<br /><font color="#2166ae">Required</font>                           | ANS          | 255        | Notification URL	                                    | https\://ptsv2.com/t/test-nicepay-v2                                  |
| `merchantToken`<br /><font color="#2166ae">Required</font><br />                    | AN           | 255        | Merchant Token	<br />                                | fa79a58a73bf9f6d07ce84daaabb8f23da6ca61d478d4e917d2e259d5c7e1106&#xD; |
| `deliveryNm`                                                                        | A            | 30         | Delivery Name	                                       | Customer\@merchant.com&#xD;                                           |
| `deliveryPhone`                                                                     | N            | 15         | Delivery Phone	                                      | 12345678                                                              |
| `deliveryAddr`                                                                      | AN           | 100        | Delivery Address	                                    | Jalan Bukit Berbunga 22&#xD;                                          |
| `deliveryCity`                                                                      | A            | 50         | Delivery City	                                       | Jakarta                                                               |
| `deliveryState`                                                                     | A            | 50         | Delivery State	                                      | DKI Jakarta                                                           |
| `deliveryPostCd`                                                                    | N            | 10         | Delivery Post Code	                                  | 12345                                                                 |
| `deliveryCountry`                                                                   | A            | 10         | Delivery Country	                                    | Indonesia                                                             |
| `description`                                                                       | AN           | 100        | Transaction Description	                             | -&#xD;                                                                |
| `reqDomain`                                                                         | ANS          | 100        | Request Domain	                                      | merchant.com&#xD;                                                     |
| `reqServerIP`                                                                       | ANS          | 15         | Request Server IP	                                   | 127.0.0.1                                                             |
| `reqClientVer`                                                                      | ANS          | 50         | Client Version	                                      | -&#xD;                                                                |
| `userSessionID`                                                                     | AN           | 100        | User Session ID	                                     | 697D6922C961070967D3BA1BA5699C2C                                      |

:::hint{type="info"}
Silakan kunjungi bagian [Convenience Store (CVS)](docId\:lyQ0ppG9p7aGo6vQwvTp5) untuk mempelajari informasi umum mengenai metode pembayaran Convenience Store.&#x20;
:::



## Additional Information Request for Convenience Store Registration

***

Parameter di bawah berisi informasi tambahan mengenai informasi Registrasi Convenience Store.

| **Parameter**                                           | **Tipe** | **Ukuran** | **Deskripsi**                                       | **Contoh / Catatan** |
| ------------------------------------------------------- | -------- | ---------- | --------------------------------------------------- | -------------------- |
| `payMethod`<br /><font color="#2166ae">Required</font>  | N        | 2          | [Payment Method Code](docId\:g7inRV70XcSA9lP7bpmok) | 03                   |
| `mitraCd`<br /><font color="#2166ae">Required</font>    | A        | 4          | Merchant ID	<br />                                  | IONPAYTEST           |
| `payValidDt`<br /><font color="#2166ae">Required</font> | N        | 8          | CVS Expiry Date (`YYYYMMDD`)                        | 20221212&#xD;        |
| `payValidTm`<br /><font color="#2166ae">Required</font> | N        | 6          | CVS Expiry Time (`HH24MISS`)                        | 201012               |



## Response Parameter for Convenience Store Registration

***

Berikut ini adalah daftar *response* dari *request* status inquiry pada proses transaksi Convenience Store.&#x20;

| **Parameter**                           | **Tipe** | **Ukuran** | **Deskripsi**                                               | **Contoh / Catatan**           |
| --------------------------------------- | -------- | ---------- | ----------------------------------------------------------- | ------------------------------ |
| `resultCd `                             | N        | 14         | [Result Code](docId\:gvAdBBr0SQ92N1zHplSFM)                 | 0000                           |
| `resultMsg `<br />                      | AN       | 255        | Result Message: [Error Code](docId\:yEh1VA9k2y6sL1kQF2aWD)  | SUCCESS                        |
| `tXid`                                  | AN       | 30         | Transaction ID                                              | IONPAYTEST03202212021529034686 |
| `referenceNo`                           | ANS      | 40         | Merchant Reference Number                                   | Order12345                     |
| `payMethod`                             | N        | 2          | [Payment Method Code](docId\:g7inRV70XcSA9lP7bpmok)         | 03                             |
| `amt`                                   | N        | 12         | Payment Amount                                              | 5000                           |
| `transDt`<font color="#2166ae"> </font> | N        | 8          | Transaction Date (`YYYYMMDD`)                               | 20221202&#xD;                  |
| `transTm`                               | N        | 6          | Transaction Time (`HH24MISS`)                               | 152903&#xD;                    |
| `description`                           | AN       | 100        | Description                                                 | null                           |
| `bankCd`                                | AN       | 4          | [Bank Code](docId:1U7QOax_wrzXMoCG-Mqad)                    | null                           |
| `vacctNo`                               | N        | 20         | VA Number                                                   | null                           |
| `mitraCd`                               | AN       | 4          | [Mitra Code](docId\:DwzaQDD7DXZMECz80A6o8)                  | ALMA                           |
| `payNo`                                 | N        | 12         | Payment Number                                              | 9041021529034686&#xD;          |
| `currency`                              | AN       | 3          | Currency                                                    | null                           |
| `goodsNm`                               | AN       | 100        | Goods Name                                                  | null                           |
| `billingNm`                             | A        | 100        | Buyer Name                                                  | null                           |
| `vacctValidDt`                          | N        | 8          | VA Expiry Date (`YYYYMMDD`)&#xD;                            | null                           |
| `vacctValidTm`                          | N        | 6          | VA Expiry Time (`HH24MISS`)&#xD;                            | null                           |
| `payValidDt`                            | N        | 8          | Expiry Date (`YYYYMMDD`)                                    |  null&#xD;                     |
| `payValidTm `                           | N        | 6          | Expiry Time (`HH24MISS`)                                    | null                           |
| `requestURL`                            | ANS      | 360        | Request URL                                                 | null                           |
| `paymentExpDt`                          | N        | 8          | QR Payment Expiry Date (`YYYYMMDD`)&#xD;                    | null                           |
| `paymentExpTm`                          | N        | 6          | QR Payment Expiry Time (`HH24MISS`)&#xD;                    | null                           |
| `qrContent`                             | ANS      | 360        | QR String in Plain Text	                                    | null                           |
| `qrUrl`                                 | ANS      | 360        | URL for QR Image, Valid for 5 minutes	                      | null                           |



## Sample JSON for Convenience Store Registration

***

:::CodeblockTabs
JSON Request

```json
{
	"timeStamp":"20221202152801",
	"iMid":"IONPAYTEST",
	"payMethod":"03",
	"currency":"IDR",
	"amt":"5000",
	"referenceNo":"Order12345",
	"goodsNm":"Test Transaction Nicepay",
	"billingNm":"John Doe",
	"billingPhone":"081214714045",
	"billingEmail":"email@merchant.com",
	"billingAddr":"Jalan Bukit Berbunga 22",
	"billingCity":"Jakarta",
	"billingState":"DKI Jakarta",
	"billingPostCd":"12345",
	"billingCountry":"Indonesia",
	"deliveryNm":"Customer@merchant.com",
	"deliveryPhone":"12345678",
	"deliveryAddr":"Jalan Bukit Berbunga 22",
	"deliveryCity":"Jakarta",
	"deliveryState":"DKI Jakarta",
	"deliveryPostCd":"12345",
	"deliveryCountry":"Indonesia",
	"dbProcessUrl":"https://ptsv2.com/t/test-nicepay-v2",
	"description":"",
	"merchantToken":"fa79a58a73bf9f6d07ce84daaabb8f23da6ca61d478d4e917d2e259d5c7e1106",
	"reqDt":"",
	"reqTm":"",
	"reqDomain":"merchant.com",
	"reqServerIP":"127.0.0.1",
	"reqClientVer":"",
	"userIP":"127.0.0.1",
	"userSessionID":"697D6922C961070967D3BA1BA5699C2C",
	"mitraCd":"ALMA"
}
```

JSON Response

```json
{
    "resultCd": "0000",
    "resultMsg": "SUCCESS",
    "tXid": "IONPAYTEST03202212021529034686",
    "referenceNo": "Order12345",
    "payMethod": "03",
    "amt": "5000",
    "transDt": "20221202",
    "transTm": "152903",
    "description": null,
    "bankCd": null,
    "vacctNo": null,
    "mitraCd": "ALMA",
    "payNo": "9041021529034686",
    "currency": null,
    "goodsNm": null,
    "billingNm": null,
    "vacctValidDt": null,
    "vacctValidTm": null,
    "payValidDt": "20221209",
    "payValidTm": "235959",
    "requestURL": null,
    "paymentExpDt": null,
    "paymentExpTm": null,
    "qrContent": null,
    "qrUrl": null
}
```

Java Request

```java
//CSV Registration//
nicePay.setTimeStamp("20180123100505");
nicePay.setiMid("IONPAYTEST");
nicePay.setPayMethod("03");
nicePay.setCurrency("IDR");
nicePay.setAmt("5");
nicePay.setReferenceNo("ORD54321");
nicePay.setMerchantToken(nicePay.makeToken(nicePay.getMerchantToken());
nicePay.setGoodsNm("Test Transaction Nicepay");
nicePay.setBillingNm("Andi pamungkas");
nicePay.setBillingPhone("081234567890");
nicePay.setBillingEmail("email@merchant.com");
nicePay.setBillingAddr("Jln. Raya Kasablanka Kav.88");
nicePay.setBillingCity("South Jakarta");
nicePay.setBillingState("DKI Jakarta");
nicePay.setBillingCountry("Indonesia");
nicePay.setBillingPostCd("12800");
nicePay.setDbProcessUrl("https://ptsv2.com/t/rizal/post");
nicePay.setMirtaCd("ALMA");
nicePay.setCardData("{\"count\":1,\"item\":[{\"img_url\":\"http:\\\/\\\/www.jamgora.com\\\/media\\\/avatar\\\/noimage.png\",\"goods_name\":\"Hoodie\",\"goods_detail\":\"Hoodie\",\"goods_amt\":\"5\"}]}");
nicePay.setPayValidDt("20231101");
nicePay.setPayValidTm("190000");
// Request CSV Registration
nicePay.qrisRegist();

// 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 amt = nicePay.Get("amt");
String transDt = nicePay.Get("transDt");
String transTm = nicePay.Get("transTm");

```
:::

