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

# About Paylater - API Checkout

***

This API uses by Merchants to requests payment to NICEPAY for the Paylater payment method using Checkout API.



# Process Flow

***

![Paylater Payment Flow](https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/c66dRPvoO-86raFpkx5ty_diagram-nicepay-paylater-payment-flow.jpg "Paylater Payment Flow")

Description of payment procedures with Paylater:

1. The Customer requests checkout to the Merchant.
2. The Merchant sends Registration API to NICEPAY.
3. In the Registration section:
   - If using Akulaku:
     - NICEPAY will request the order to Akulaku as the Paylater Partner.
     - Akulaku generates order.
     - Akulaku sends the data response to NICEPAY.
     - NICEPAY will send the capture of the API Regist response to the Merchant.
   - If using Kredivo/Indodana:
     - NICEPAY will save the Order Regist.
     - NICEPAY will send the Order Regist response.
4. The Merchant sends the Payment API to NICEPAY.
5. Then in the Payment section:
   - If using Akulaku:
     - NICEPAY will redirect the Customer to the Akulaku page.
     - The Customer login to the account.
     - The Customer confirms the payment to Akulaku as the Paylater Partner.
     - Akulaku validates the payment.
     - Akulaku redirects the Customer using `callbackUrl`.
   - If using Kredivo/Indodana:
     - NICEPAY requests checkout to Paylater Partner.
     - Paylater Partner proceeds with the checkout process.
     - Paylater Partner sends the response and redirects to the Paylater Partner page.
     - The Customer confirms the payment to Paylater Partner.
     - Paylater Partner sends OTP to the Customer.
     - The Customer inputs the OTP to the Paylater Partner.
     - Paylater Partner validates the OTP.
     - Paylater Partner confirms the result order to the Customer.
6. In the Notification section:
   - If using Akulaku:
     - Akulaku as Paylater Partner sends push capture notification to NICEPAY.
     - NICEPAY saves the notification.
     - NICEPAY sends the capture of the update notification to the Merchant.
     - The Merchant displays the response to the Customer.
   - If using Kredivo/Indodana:
     - Paylater Partner sends the push notification to NICEPAY.
     - NICEPAY validates the received notification.
     - NICEPAY requests order confirmation.
     - Paylater Partner confirms the order process.
     - Paylater Partner sends order confirmation data to NICEPAY.
     - NICEPAY sends order confirmation result.
7. If Paylater Partner used is Akulaku, the Customer can confirms the payment receipt.
   - The Customer sends payment receipt confirmation to the Merchant.
   - The Merchant requests payment receipt confirmation to NICEPAY.
   - NICEPAY requests the process of payment receipt confirmation to Akulaku.
   - Akulaku proceeds the payment receipt confirmation process.
   - Akulaku sends the data response to NICEPAY.
   - NICEPAY sends the data response to the Merchant.
   - The Merchant displays data results to the Customer.
8. The Merchant sends the request for transaction checking status by using Status API to NICEPAY.
9. NICEPAY sends the response of transaction checking status to the Merchant.
10. The Merchant receives the final status.
11. The Merchant sends the status confirmation 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 Checkout payment sample with the Paylater method using NICEPAY Secure Payment Page.

![Paylater - Secure Payment Page](https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/pgfAiIILkTgF04Edzn7VI_image-en-paylater.jpg "Paylater - Secure Payment Page")

After the process of payment registration request completes, you can continue the transaction process until settlement by following the guidelines in [Paylater Payment Guide](docId\:wG1g943POgAo1B4ztIqP2).

![Success - Secure Payment Page](https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/gEAVAS3w_bzRClSd7OEfp_image-en-paylater-success.jpg "Success - Secure Payment Page")



# API Checkout Transaction Payment

***

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



## Request Parameter for Paylater - API Checkout (CallbackUrl)

***

The following are Request Parameter lists for Paylater Payment API on Checkout API.

:::hint{type="warning"}
Note for Paylater, please give a warning message for the Customer to open by mobile devices for the Customer better user experience.&#x20;
:::

| **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 /> | PAYLOANTES00202212201645434449                              |



## Response Parameter for Paylater - API Checkout (CallbackUrl)

***

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



| **Parameter**                                                                | **Type** | **Size** | **Description**                                                                                                                           | **Example / Remark**                                   |
| ---------------------------------------------------------------------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `resultCd`                                                                   | N        | 4        | [Result Code](docId:9eC3yH9CQqpb6cRWauWWO)                                                                                                | 0000                                                   |
| `resultMsg`                                                                  | AN       | 255      | Result Message: [Error Code](docId\:FsX1GESJKxOp0T9rvUHp_)                                                                                | SUCCESS                                                |
| `tXid`                                                                       | AN       | 30       | Transaction ID	                                                                                                                           | PAYLOANTES00202212201645434449<br /><br />When Success |
| `referenceNo`                                                                | ANS      | 40       | Order Number                                                                                                                              | ORD20221220161200<br /><br />When Success              |
| `payMethod`<br /><font color="#2166ae">E-Wallet, Paylater</font>             | N        | 2        | [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W)                                                                                       | 06<br /><br />When Success                             |
| `amt`                                                                        | N        | 12       | Transaction Amount                                                                                                                        | 10000<br /><br />When Success                          |
| `currency`<br /><font color="#2166ae">E-Wallet, Paylater</font>              | A        | 3        | Currency                                                                                                                                  | IDR<br /><br />When Success                            |
| `goodsNm`<br /><font color="#2166ae">E-Wallet, Paylater</font>               | AN       | 100      | Goods Name	                                                                                                                               | John+Doe<br /><br />When Success                       |
| `billingNm`<br /><font color="#2166ae">E-Wallet, Paylater</font>             | A        | 100      | Billing Name                                                                                                                              | John+Doe<br /><br />When Success                       |
| `transDt`                                                                    | N        | 8        | Transaction Date (`YYYYMMDD`)	                                                                                                            | 20221220<br /><br />When Success                       |
| `transTm`                                                                    | N        | 6        | Transaction Time (`HH24MISS`)	                                                                                                            | 164543<br /><br />When Success                         |
| `description`                                                               | AN       | 100      | Transaction Description	                                                                                                                  | Test+Transaction+Nicepay<br /><br />When Success       |
| `authNo`<br /><font color="#2166ae">Only CC </font>                          | N        | 10       | Approval Number	                                                                                                                          | When Success                                           |
| `issuBankCd`<br /><font color="#2166ae">Only CC</font>                       | A        | 4        | [Issuing Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                                                                                         | When Success                                           |
| `acquBankCd`<br /><font color="#2166ae">Only CC</font>                       | A        | 4        | [Acquiring Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                                                                                       | When Success                                           |
| `issuBankNm`                                                                 | A        | 255      | Issuing Bank Name                                                                                                                         | When Success                                           |
| `acquBankNm`                                                                 | A        | 255      | Acquiring Bank Name                                                                                                                       | When Success                                           |
| `cardNo`<br /><font color="#2166ae">Only CC</font>                           | ANS      | 20       | Card Number with Masking	                                                                                                                 | When Success                                           |
| `recurringToken`<br /><font color="#2166ae">Only CC (Additional)</font>      | AN       | 255      | Recurring Token                                                                                                                           | When Success	                                          |
| `preauthToken`                                                               | AN       | 255      | Pre-Auth Token                                                                                                                            | null<br /><br />When Success                           |
| `ccTransType`                                                                | AN       | 2        | Credit Card Transaction Type:<br />`1`: Normal<br />`2`: Recurring<br />`3`: Pre-Auth<br />`4`: Capture                                   | When Success                                           |
| `mitraCd`<br /><font color="#2166ae">Direct Debit, E-Wallet, Paylater</font> | A        | 4        | [Mitra Code](docId:0luP35KfOWksiSrzKx6yZ)                                                                                                 | KDVI<br /><br />When Success                           |
| `receiptCode`                                                                | ANS      | 20       | Authorization Number                                                                                                                      | When Success                                           |
| `mRefNo`                                                                     | AN       | 18       | Reference Number                                                                                                                          | When Success                                           |
| `cardExpYymm`                                                                | N        | 4        | Card Expiry (`YYMM`)                                                                                                                      | When Success                                           |
| `instmntType`                                                                | N        | 2        | [Installment Type Code](docId:_Wzur5wjwhrDR8YXI-Ppi)                                                                                      | 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 | When Success                                           |
| `timeStamp`                                                                  | N        | 14       | API Request Timestamp                                                                                                                     | When Success                                           |
| `merchantToken`                                                              | AN       | 255      | Merchant Token                                                                                                                            | When Success                                           |


Sample Parameter for Paylater - API Checkout (CallbackUrl)
----------------------------------------------------------

***

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

### Request Parameter

:::CodeblockTabs
cURL

```curl
curl -X GET "https://www.merchant.com/callbackUrl?resultCd=0000&resultMsg=SUCCESS&tXid=PAYLOANTES00202212201645434449&referenceNo=ORD20221220161200&payMethod=06&amt=10000&transDt=20221220&transTm=164543&description=Test+Transaction+Nicepay&authNo=&issuBankCd=&acquBankCd=&cardNo=&receiptCode=&mitraCd=KDVI&recurringToken=&preauthToken=&currency=IDR&goodsNm=John+Doe&billingNm=John+Doe&ccTransType=&mRefNo=&instmntType=&instmntMon=&cardExpYymm=&issuBankNm=&acquBankNm=&timeStamp=&merchantToken="
```
:::

### Callback Parameter

:::CodeblockTabs
Response Callback

```curl
resultCd=0000
resultMsg=SUCCESS
tXid=PAYLOANTES00202212201645434449
referenceNo=ORD20221220161200
payMethod=06
amt=10000
transDt=20221220
transTm=164543
description=Test+Transaction+Nicepay
authNo=
issuBankCd=
acquBankCd=
cardNo=
receiptCode=
mitraCd=KDVI
recurringToken=
preauthToken=
currency=IDR
goodsNm=John+Doe
billingNm=John+Doe
ccTransType=
mRefNo=
instmntType=
instmntMon=
cardExpYymm=
issuBankNm=
acquBankNm=
timeStamp=
merchantToken=
```
:::



## 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 very important to minimize the Fraud act, we highly recommend the Merchant to do the verification using `Callback parameter`.
:::

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

:::CodeblockTabs
URL Callback

```json
https://merchant.com/api/callBackUrl
```

Response Callback

```json
resultCd=0000
resultMsg=SUCCESS
tXid=PAYLOANTES00202212201645434449
referenceNo=ORD20221220161200
payMethod=06
amt=10000
transDt=20221220
transTm=164543
description=Test+Transaction+Nicepay
authNo=
issuBankCd=
acquBankCd=
cardNo=
receiptCode=
mitraCd=KDVI
recurringToken=
preauthToken=
currency=IDR
goodsNm=John+Doe
billingNm=John+Doe
ccTransType=
mRefNo=
instmntType=
instmntMon=
cardExpYymm=
issuBankNm=
acquBankNm=
timeStamp=
merchantToken=
```
:::

