---
title: Registration - API Direct Debit
slug: nicepay-api-non-snap-registration-api-direct-debit
description: Informasi tentang API Non-SNAP Payment - Registration - API Direct Debit yang terdapat pada sistem NICEPAY
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/cA7e2W8idEjHBfQEV1FUP_rdrx9d8diaz-pgm07xfz2-test-1-1.png
icon: {"faIcon":"fa-solid fa-book"}
docTags: 
createdAt: 2022-12-01T07:17:51.000Z
---

# Tentang API Direct Debit Registration

***

NICEPAY menyediakan Direct Debit sebagai fitur pembayaran. Direct Debit yang didukung NICEPAY:

1. Jenius Pay.

:::hint{type="info"}
Namun, terdapat perbedaan khusus untuk Jenius, yaitu terletak pada tambahan di Parameter *Request&#x20;*&#x64;an untuk *request staging* di Jenius dilakukan melalui HTTPS.
:::



API for Direct Debit Registration


***

| **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`                                           |



## Request Parameter for Direct Debit Registration



***

Berikut ini adalah daftar parameter untuk melakukan *request&#x20;*&#x72;egistrasi metode pembayaran Direct Debit. 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`)                                                   | 20221212155200                                                        |
| `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) <br />                               | 04&#xD;                                                               |
| `currency `<font color="#2166ae"> </font><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 />                                                        | order20221212155200                                                   |
| `goodsNm`<font color="#2166ae"> </font><br /><font color="#2166ae">Required</font>   | AN                 | 100        | Goods Name	<br />                                                                        | 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`<br /><font color="#2166ae">Required</font>                                | `JSONstring`<br /> | 4000       | Cart Data<br />                                                                          | \{}                                                                   |
| `sellers`                                                                            | `JSON String`      | 4000       | Seller Data                                                                              |                                                                       |
| `instmntType`                                                                        | N                  | 2          | [Installment Type Code](docId:7CIX-U_4z295XgtNVEsbO)                                     | 2                                                                     |
| `instmntMon`<br /><font color="#2166ae">Required for CC	</font>                      | N                  | 2          | Installment Month                                                                        | 1                                                                     |
| `recurrOpt`                                                                          | N                  | 2          | `0`: Automatic Cancel&#xD;<br />`1`: Do Not Cancel&#xD;<br />`2`: Do Not Make Token      | 0                                                                     |
| `bankCd`                                                                             | A                  | 4          | [Bank Code](docId:1U7QOax_wrzXMoCG-Mqad)                                                 | -&#xD;                                                                |
| `vacctValidDt`                                                                       | N                  | 8          | VA Expiry Date (`YYYYMMDD`)                                                              | 20200303                                                              |
| `vacctValidTm`                                                                       | N                  | 6          | VA Expiry Time (`HH24MISS`)                                                              | -                                                                     |
| `merFixAcctId`                                                                       | AN                 | 40         | Merchant Reserved VA ID                                                                  | -                                                                     |
| `mitraCd`                                                                            | A                  | 4          | [Mitra Code](docId\:DwzaQDD7DXZMECz80A6o8)                                               | JENC                                                                  |
| `userIP`                                                                             | AN                 | 15         | User IP                                                                                  | 127.0.0.1&#xD;                                                        |
| `dbProcessUrl`<br /><font color="#2166ae">Required</font>                            | ANS                | 255        | Notification URL	<br />                                                                  | https\://merchant.com/dbProcessUrl&#xD;                               |
| `merchantToken`<br /><font color="#2166ae">Required</font>                           | AN                 | 255        | Merchant Token	                                                                          | 6cfccfc0046773c1b589d8e98f8b596c284f3c70a4ecf86eba14c18944b74bcd&#xD; |
| `deliveryNm`                                                                         | A                  | 30         | Delivery Name	                                                                           | dobleh\@merchant.com&#xD;                                             |
| `deliveryPhone`                                                                      | N                  | 15         | Delivery Phone	                                                                          | 081214714045                                                          |
| `deliveryAddr`                                                                       | AN                 | 100        | Delviery 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                                                             |
| `vat`                                                                                | N                  | 12         | Vat	                                                                                     | 0                                                                     |
| `fee`                                                                                | N                  | 12         | Service Fee	                                                                             | 0                                                                     |
|  `notaxAmt`                                                                          | N                  | 12         | Tax Free Amount                                                                          | -                                                                     |
| `description`                                                                        | AN                 | 100        | Transaction Description	                                                                 | Testing&#xD;                                                          |
| `merchantToken`                                                                      | AN                 | 255        | Merchant Token                                                                           | 0dd1393f41bccbc33ed82cb514138aa5a46c24a6e55730868d264f3d80fb4fc1      |
| `reqDt`                                                                              | N                  | 8          | Request Date (`YYYYMMDD`)                                                                | -                                                                     |
| `reqTm`                                                                              | N                  | 6          | Request Time (`HH24MISS`)                                                                | -                                                                     |
| `reqDomain`                                                                          | ANS                | 100        | Request Domain	                                                                          | merchant.com&#xD;<br />                                               |
| `reqServerIP`                                                                        | ANS                | 15         | Request Server IP	                                                                       | 127.0.0.1                                                             |
| `userIP`<br /><font color="#2166ae">Required</font>                                  | AN                 | 15         | User IP Address                                                                          | 127.0.0.1                                                             |
| `reqClientVer`                                                                       | ANS                | 50         | Client Version	                                                                          | 1.0&#xD;<br />                                                        |
| `userSessionID`                                                                      | AN                 | 100        | User Session ID	                                                                         | userSessionID                                                         |
| `userAgent`                                                                          | ANS                | 100        | User Agent	                                                                              | Mozilla                                                               |
| `userLanguage`                                                                       | A                  | 2          | User Language	                                                                           | en-US&#xD;<br />                                                      |
| `shopId`                                                                             | AN                 | 32         | Shop ID                                                                                  | NICEPAY                                                               |
| `userAgent`<br /><font color="#2166ae">Required</font>                               | ANS                | 100        | User Agent Information	                                                                  | Mozilla                                                               |
| `recurrOpt`<br />                                                                    | N                  | 2          | `0`: Automatic Cancel&#xD;<br />`1`: Do Not Cancel&#xD;<br />`2`: Do Not Make Token&#xD; | 2                                                                     |

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



Additional Information Request for Direct Debit  Registration


***

Parameter di bawah berisi informasi tambahan mengenai informasi Registrasi Direct Debit.

| **Parameter**                                          | **Tipe** | **Ukuran** | **Deskripsi**                                              | **Contoh / Catatan** |
| ------------------------------------------------------ | -------- | ---------- | ---------------------------------------------------------- | -------------------- |
| `payMethod`<br /><font color="#2166ae">Required</font> | N        | 2          | [Payment Method Code](docId\:g7inRV70XcSA9lP7bpmok) <br /> | 04                   |
| `mitraCd`<br /><font color="#2166ae">Required</font>   | A        | 4          | [Mitra Code](docId\:DwzaQDD7DXZMECz80A6o8) <br />          | JENC                 |
| `mRefNo`<br /><font color="#2166ae">Required</font>    | AN       | 18         | Direct Debit Jenius Reference Number                       |                      |



## Response Parameter for Direct Debit Registration

***

Berikut ini adalah daftar *response&#x20;*&#x70;arameter dari request *registrasi&#x20;*&#x70;ada proses transaksi Direct Debit.&#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`<br />                            | AN       | 30         | Transaction ID                                              | IONPAYTEST04202212121554299694 |
| `referenceNo`                           | ANS      | 40         | Merchant Reference Number                                   | order20221212155200            |
| `payMethod`                             | N        | 2          | [Payment Method Code](docId\:g7inRV70XcSA9lP7bpmok)         | 04                             |
| `amt`                                   | N        | 12         | Payment Amount                                              | 5000                           |
| `transDt`<font color="#2166ae"> </font> | N        | 8          | Transaction Date (`YYYYMMDD`)                               | 20221212&#xD;                  |
| `transTm`                               | N        | 6          | Transaction Time (`HH24MISS`)                               | 155431&#xD;                    |
| `description`                           | AN       | 100        | Description                                                 | Testing                        |
| `bankCd`                                | AN       | 4          | [Bank Code](docId:1U7QOax_wrzXMoCG-Mqad)                    | null                           |
| `vacctNo`                               | N        | 20         | VA Number                                                   | null                           |
| `mitraCd`                               | AN       | 4          | [Mitra Code](docId\:DwzaQDD7DXZMECz80A6o8)                  | JENC                           |
| `payNo`                                 | N        | 12         | Payment Number                                              | null&#xD;                      |
| `currency`                              | A        | 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 Direct Debit Registration

***

:::CodeblockTabs
JSON Request

```json
{
	"timeStamp":"20221212155200",
	"iMid":"IONPAYTEST",
	"payMethod":"04",
	"currency":"IDR",
	"amt":"5000",
	"referenceNo":"order20221212155200",
	"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":"Jhon D",
	"deliveryPhone":"081214714045",
	"deliveryAddr":"Jalan Bukit Berbunga 22",
	"deliveryCity":"Jakarta",
	"deliveryState":"DKI Jakarta",
	"deliveryPostCd":"12345",
	"deliveryCountry":"Indonesia",
	"dbProcessUrl":"https://ptsv2.com/t/test-nicepay-v2",
	"vat":"",
	"fee":"",
	"notaxAmt":"",
	"description":"Testing",
	"merchantToken":"0dd1393f41bccbc33ed82cb514138aa5a46c24a6e55730868d264f3d80fb4fc1",
	"reqDt":"",
	"reqTm":"",
	"reqDomain":"merchant.com",
	"reqServerIP":"127.0.0.1",
	"reqClientVer":"",
	"userIP":"127.0.0.1",
	"userSessionID":"697D6922C961070967D3BA1BA5699C2C",
	"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/60.0.3112.101 Safari/537.36",
	"userLanguage":"ko-KR,en-US;q=0.8,ko;q=0.6,en;q=0.4",
	"cartData":"{\"count\":\"1\",\"item\":[{\"img_url\":\"http://img.aaa.com/ima1.jpg\",\"goods_name\":\"Sepatu\",\"goods_detail\":\"Item 1 Detail\",\"goods_amt\":\"10000\",\"goods_quantity\":\"2\"}]}",
    "sellers": "[{\"sellersId\":\"NICEPAY-NamaMerchant\",\"sellersNm\":\"NICEPAYSHOP\",\"sellersUrl\":\"http://nicestore.store/product/beanie/\",\"sellersEmail\":\"Nicepay@nicepay.co.id\",\"sellersAddress\":{\"sellerNm\":\"NICEPAYSHOP\",\"sellerLastNm\":\"NICEPAYSHOP\",\"sellerAddr\":\"Jln. Kasablanka Kav 88\",\"sellerCity\":\"Jakarta\",\"sellerPostCd\":\"14350\",\"sellerPhone\":\"082111111111\",\"sellerCountry\":\"ID\"}}]",
	"instmntType":"2",
	"instmntMon":"1",
	"recurrOpt":"0",
	"bankCd":"",
	"vacctValidDt":"",
	"vacctValidTm":"",
	"merFixAcctId":"",
	"mitraCd":"JENC"
}
```

JSON Response

```json
{
    "resultCd": "0000",
    "resultMsg": "SUCCESS",
    "tXid": "IONPAYTEST04202212121554299694",
    "referenceNo": "order20221212155200",
    "payMethod": "04",
    "amt": "5000",
    "transDt": "20221212",
    "transTm": "155431",
    "description": "Testing",
    "bankCd": null,
    "vacctNo": null,
    "mitraCd": "JENC",
    "payNo": null,
    "currency": null,
    "goodsNm": null,
    "billingNm": null,
    "vacctValidDt": null,
    "vacctValidTm": null,
    "payValidDt": null,
    "payValidTm": null,
    "requestURL": null,
    "paymentExpDt": null,
    "paymentExpTm": null,
    "qrContent": null,
    "qrUrl": null
}
```

Java Request

```java
//Clickpay Registration//
nicePay.setTimeStamp("20180123100505");
nicePay.setiMid("IONPAYTEST");
nicePay.setPayMethod("04");
nicePay.setCurrency("IDR");
nicePay.setAmt("5000");
nicePay.setReferenceNo("ORD54321");
nicePay.setMerchantToken(nicePay.makeToken(nicePay.getMerchantToken());
nicePay.setGoodsNm("Test Transaction Nicepay");
nicePay.setBillingNm("John Doe");
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("JENC");
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 Clickpay 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");
```
:::

