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

# About API Direct Debit Registration

***

NICEPAY provides Direct Debit as a payment feature. Direct Debit supported NICEPAY are:

1. Jenius Pay

:::hint{type="info"}
However, there are some specific differences for Jenius, which locates in the addition of the Request Parameters, and also for request staging in Jenius, which is done via HTTPS.
:::





# API for Direct Debit Registration&#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`                                           |



## Request Parameter for Direct Debit Registration

***

The following is a list of parameters for requesting registration of the Direct Debit payment method. This parameter uses through the API testing platform as one of the stages so that the Merchant's system can connect with services from NICEPAY.

| **Parameter**                                                                        | **Type**           | **Size** | **Description**                                                                          | **Example / Notes**                                                     |
| ------------------------------------------------------------------------------------ | ------------------ | -------- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `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\:NQ1y7vMa25ZtvQHN5He6W) <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:_Wzur5wjwhrDR8YXI-Ppi)                                     | 2                                                                       |
| `instmntMon`                                                                         | N                  | 2        | Installment Month <br />Required for CC	                                                 | 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\:HlxvgrXVxWD90n8ohNKm0)                                                | -                                                                       |
| `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:0luP35KfOWksiSrzKx6yZ)                                                | 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	                                                                          | 6cfccfc0046773c1b589d8e 98f8b596c284f3c70a4ecf8 6eba14c18944b74bcd&#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"}
Please visit [Direct Debit](docId\:PI11Vnp1CqfSZGTnF46cB) section to learn general information about the Direct Debit payment method.&#x20;
:::



## Additional Information Request for Direct Debit Registration

***

The parameters below contain additional information regarding Direct Debit Registration information.



| **Parameter**                                          | **Type** | **Size** | **Description**                                            | **Example / Notes** |
| ------------------------------------------------------ | -------- | -------- | ---------------------------------------------------------- | ------------------- |
| `payMethod`<br /><font color="#2166ae">Required</font> | N        | 2        | [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W) <br /> | 04                  |
| `mitraCd`<br /><font color="#2166ae">Required</font>   | A        | 4        | [Mitra Code](docId:0luP35KfOWksiSrzKx6yZ) <br />           | JENC                |
| `mRefNo`<br /><font color="#2166ae">Required</font>    | AN       | 18       | Direct Debit Jenius Reference Number                       |                     |



## Response Parameter for Direct Debit Registration

***

The following is a list of response parameters from registration requests in the Direct Debit transaction process.

| **Parameter**                           | **Type** | **Size** | **Decription**                                              | **Example / Notes**            |
| --------------------------------------- | -------- | -------- | ----------------------------------------------------------- | ------------------------------ |
| `resultCd`                              | N        | 14       | [Result Code](docId:9eC3yH9CQqpb6cRWauWWO)                  | 0000                           |
| `resultMsg`<br />                       | AN       | 255      | Result Message: [Error Code](docId\:FsX1GESJKxOp0T9rvUHp_)  | SUCCESS                        |
| `tXid`<br />                            | AN       | 30       | Transaction ID                                              | IONPAYTEST04202212121554299694 |
| `referenceNo`                           | ANS      | 40       | Merchant Reference Number                                   | order20221212155200            |
| `payMethod`                             | N        | 2        | [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W)         | 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\:HlxvgrXVxWD90n8ohNKm0)                   | null                           |
| `vacctNo`                               | N        | 20       | VA Number                                                   | null                           |
| `mitraCd`                               | AN       | 4        | [Mitra Code](docId:0luP35KfOWksiSrzKx6yZ)                   | 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");
```
:::

