---
title: Direct Debit - API Checkout
slug: en/nicepay-api-direct-debit-payment-api-checkout
description: Information about API Checkout - Payment for Direct Debit payment method provided by NICEPAY
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/cpc73VHUpbd917iKgkHsV_microsoftteams-image.png
icon: {"faIcon":"fa-solid fa-credit-card"}
docTags: 
createdAt: 2022-12-19T10:12:09.000Z
---

# About Direct Debit - API Checkout

***

This API uses by Merchant to requests payment to NICEPAY for Direct Debit payment method using Checkout API.



# Process Flow

***

![Direct Debit Payment Flow](https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/we8Y5y0jhDAHQ7x5al6Ut_diagram-api-checkout-direct-debit-payment-flow.jpg "Direct Debit Payment Flow")

Steps description:

1. The Customer requests checkout to the Merchant.
2. The Merchant will register checkout by using Registration API to NICEPAY.
3. NICEPAY save order regist.
4. NICEPAY redirect Merchant to the NICEPAY page.
5. The Merchant displays NICEPAY's payment page to the Customer.
6. The Customer chooses the payment method.
7. The Customer input the payment data (Jenius: Cashtag).
8. The Customer sends the selected payment method to NICEPAY.
9. NICEPAY requests payment to Bank.
10. Bank proceeds with the authentication process.
11. Bank sends notification authentication to the Customer.
12. The Customer performs authentication.
13. The Customer requests the charge to Bank.
14. Bank does the payment process.
15. Bank sends the payment result to the Customer.
16. Bank sends push notification to NICEPAY.
17. NICEPAY validates the notification.
18. NICEPAY updates the status.
19. NICEPAY sends a notification to the Merchant.
20. The Merchant requests status checking by using Status API to the NICEPAY.
21. NICEPAY sends the response status to the Merchant.
22. The Merchant receives the final status.
23. The Merchant sends the confirmation status update to the Customer.



# NICEPAY Secure Payment Page

***

![Secure Payment Page](https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/5EARwUJAR5medSH9j-vpw_image-en-nicepay-secure-payment-page-main-dashboard.jpg "Secure Payment Page")

The image above is a payment sample with Direct Debit method using NICEPAY Secure Payment Page.

![Direct Debit - Secure Payment Page](https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/LsEwxlDAG-uZvjuozQisC_image-en-direct-debit-secure-payment-page.jpg "Direct Debit - Secure Payment Page")

After selecting the method Direct Debit, you will be redirected to the page to select the desired Direct Debit service. Next, you will be redirected to the form page to enter your identity. In the example above, if you choose Jenius service, you will be asked to enter your Cashtag data in the form provided. After completing the form, you can continue the payment process. Then, you can proceed until the order payment is successful.

![Success - Secure Payment Page](https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/2RHLrC2aAAZHfZixRZXZ0_image-en-direct-debit-success-secure-payment-page.jpg "Success - Secure Payment Page")

The process of payment registration request has been completed. You can continue the transaction process until settlement by following the guidelines in the [Direct Debit Payment Guide](docId\:EpXDduFlL2LBzpB5LeKHO).



# API Checkout Transaction Payment

***

| **API URL**         | `/nicepay/redirect/v2/payment`&#xD;           |
| ------------------- | --------------------------------------------- |
| **Request Method**  | `Redirect-GET`                                |
| **Header**          | `Content-Type: application/Form-UrlEncoded``` |



## Request Parameter for Direct Debit - API Checkout (CallbackUrl)

***

| **Parameter**                                             | **Type** | **Size** | **Description**       | **Remark**                                                  |
| --------------------------------------------------------- | -------- | -------- | --------------------- | ----------------------------------------------------------- |
| `paymentURL`  <br /><font color="#2166ae">Required</font> | ANS      | 14       | Payment URL<br />     | https\://dev.nicepay.co.id/nicepay/redirect/v2/payment&#xD; |
| `tXid` <br /><font color="#2166ae">Required</font>        | AN       | 30       | Transaction ID	<br /> | IONPAYTEST00202203211640309389                              |



## Response Parameter for Direct Debit - API Checkout (CallbackUrl)

***

| **Parameter**                                                                 | **Type** | **Size** | **Description**                                                                                                                              | **Remark**                                                                               |
| ----------------------------------------------------------------------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `status`                                                                      | N        | 1        | [Transaction Status](docId\:QPNU5VtJKCzpxFRhiayAS)                                                                                           | 0                                                                                        |
| `merchantToken`                                                               | AN       | 255      | Merchant Token                                                                                                                               | 46ca2f8a7b0b24ad57e49f879764718e40839f67d00c22b3f79ba328f2a0a8aa<br /><br />When Success |
| `goodsNm`<br /><font color="#2166ae">Direct Debit, E-Wallet, Payloan</font>   | AN       | 100      | Goods Name                                                                                                                                   | Jhon+Doe<br /><br />When Success                                                         |
| `billingNm`<br /><font color="#2166ae">Direct Debit, E-Wallet, Payloan</font> | A        | 100      | Billing Name                                                                                                                                 | Jhon+Doe<br /><br />When Success                                                         |
| `referenceNo`                                                                 | ANS      | 40       | Order Number                                                                                                                                 | ORD20230525090536<br /><br />When Success                                                |
| `mitraCd`<br /><font color="#2166ae">Direct Debit, E-Wallet, Payloan</font>   | A        | 4        | [Mitra Code](docId:0luP35KfOWksiSrzKx6yZ)                                                                                                    | JENC<br /><br />When Success                                                             |
| `tXid`                                                                        | AN       | 30       | Transaction ID                                                                                                                               | TNICECP04100202305250918306465<br /><br />When Success                                   |
| `amt`                                                                         | N        | 12       | Transaction Amount                                                                                                                           | 5000<br /><br />When Success                                                             |
| `receiptCode`                                                                 | ANS      | 20       | Authorization Number                                                                                                                         | 951527524097<br /><br />When Success                                                     |
| `instmntType`                                                                 | N        | 2        | [Installment Type Code](docId:_Wzur5wjwhrDR8YXI-Ppi)                                                                                         | 2<br /><br />When Success                                                                |
| `instmntMon`                                                                  | N        | 2        | Installment Month<br />`1`: 1 Month/Full Payment, *if* `instmntType` *:* *null/1*<br />`3`: 3 Months<br />`6`: 6 Months<br />`12`: 12 Months | 1<br /><br />When Success                                                                |
| `matchCl`                                                                     | N        | 1        | [Notification Match Amount Indicator](docId\:HheZYw5iKlIptKqYyA5bI)                                                                          | 0<br /><br />When Success                                                                |
| `mRefNo`                                                                      | AN       | 18       | Reference Number                                                                                                                             | 202305250918303<br /><br />When Success                                                  |
| `payMethod`                                                                   | N        | 2        | [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W)                                                                                          | 04<br /><br />When Success                                                               |
| `currency`                                                                    | A        | 3        | Currency                                                                                                                                     | IDR<br /><br />When Success                                                              |

:::hint{type="info"}
Note: Response parameter will be sent through `callbackUrl` with Content-type: `application/json` and method: `POST Parameter`.
:::




Sample Parameter for Direct Debit - API Checkout (CallbackUrl)
--------------------------------------------------------------

***

:::hint{type="success"}
On the payment when Checkout, the response from the request that got hit is a Callback URL.
:::

### Request Parameter

:::CodeblockTabs
cURL

```curl
curl -X GET "https://www.merchant.com/callbackUrl?resultCd=0000&resultMsg=Please+do+payment+on+jenius+pay+apps&tXid=TNICECP04100202305250918306465&referenceNo=ORD20230525090536&amt=&transDt=20230525&transTm=091830"
```
:::

### Callback Parameter

:::CodeblockTabs
Response Callback

```curl
merchantToken=46ca2f8a7b0b24ad57e49f879764718e40839f67d00c22b3f79ba328f2a0a8aa
goodsNm=Jhon+Doe
referenceNo=ORD20230525090536
mitraCd=JENC
tXid=TNICECP04100202305250918306465
amt=5000
receiptCode=951527524097
instmntType=2
billingNm=Jhon+Doe
matchCl=0
mRefNo=202305250918303
payMethod=04
currency=IDR
instmntMon=1
status=0
```
:::



## Callback Handling API Checkout Payment

***

:::hint{type="success"}
When Your Callback already received `callbackUrl`, we recommended the Merchant to do the status verification using the [Status Inquiry - API Checkout](docId\:RhH7PmISd6IHN99yWVJHm).
:::

:::hint{type="warning"}
`Callback Handling` is necessary to minimize Fraud actions. We strongly recommend Merchant to verify using `Callback parameter`.
:::

::Image[]{src="https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/hB3AyDaMVCRKhlIgcs-V4_nicepay-api-checkout-api-callback-handling-flow-1.png" size="60" isUploading="false" position="center" caption="Callback Handling Flow" width="370" height="361" darkWidth="370" darkHeight="361" showCaption="true" alt="Callback Handling Flow"}

:::CodeblockTabs
URL Callback

```json
https://merchant.com/callback-nicepay?resultCd=0000&resultMsg=Please+do+payment+on+jenius+pay+apps&tXid=IONPAYTEST00202212211034026581&referenceNo=ORDER20221012080918&amt=&transDt=20221221&transTm=103402
```

Response Callback

```json
merchantToken=46ca2f8a7b0b24ad57e49f879764718e40839f67d00c22b3f79ba328f2a0a8aa
goodsNm=Jhon+Doe
referenceNo=ORD20230525090536
mitraCd=JENC
tXid=TNICECP04100202305250918306465
amt=5000
receiptCode=951527524097
instmntType=2
billingNm=Jhon+Doe
matchCl=0
mRefNo=202305250918303
payMethod=04
currency=IDR
instmntMon=1
status=0
```
:::

