---
title: Registration - API Checkout
slug: en/nicepay-api-registration-api-checkout
description: Information about API Checkout - Registration provided by NICEPAY
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/oTyUtOCbJV9LRYrLh6vv8_microsoftteams-image.png
icon: {"faIcon":"fa-solid fa-book"}
docTags: 
createdAt: 2022-09-08T06:42:57.000Z
---

# About Registration - API Checkout

***

The purpose of this step on **Registration - API Checkout** is to register a checkout request from your Customer to us. So that your Customer can pay the transaction amount billed on the payment page provided by NICEPAY .

Based on the principle, all payment methods on the Checkout API have the same process. The difference is just the parameter on each payment method.&#x20;

:::hint{type="info"}
When the Customer proceeds with the Checkout process, the system proceeds the order registration firsthand before the Customer can do the payment process on the chosen payment method through the received payment link.

Please visit the [Payment - API Checkout](docId\:o-4MmsbwXtZIb0ydniohw) page to know further explanations related API specific for payment.
:::



# Registration - API Checkout (All Payment Method)

***

To be able uses all payment methods on Checkout API, you are required to register the transaction with this Checkout Registration API. Here are the parameters:

| **API URL**         | `/nicepay/redirect/v2/registration`                               |
| ------------------- | ----------------------------------------------------------------- |
| **Request Method**  | <font color="#3b9f0f">**POST**</font>                             |
| **Header**          | `Content-Type: application/json`                                  |
| **Merchant Token**  | SHA256 (`timestamp`+ `iMid`+ `referenceNo`+ `amt`+ `merchantKey`) |



## Request Parameter for Registration - API Checkout

***

| **Parameter**                                                                                       | **Type**      | **Size** | **Description**                                                                     | **Remark**                                                                                                                                                                                                                                                                                                                                                                                      |
| --------------------------------------------------------------------------------------------------- | ------------- | -------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `iMid`<br /><font color="#2166ae">Required</font>                                                   | AN            | 10       | Merchant ID                                                                         | IONPAYTEST                                                                                                                                                                                                                                                                                                                                                                                      |
| `timeStamp`<br /><font color="#2166ae">Required</font>                                              | N             | 14       | Request Timestamp<br />(`YYYYMMDDHH24MISS`)                                         | 20230516660517                                                                                                                                                                                                                                                                                                                                                                                  |
| `payMethod`<br /><font color="#2166ae">Required</font>                                              | N             | 2        | [Payment Method Code](docId\:IifMsRUUw7j9VMWeFJz97)                                 | 00                                                                                                                                                                                                                                                                                                                                                                                              |
| `bankCd`<br /><font color="#2166ae">Optional for VA</font>                                          | A             | 4        | [Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                                           | CENA                                                                                                                                                                                                                                                                                                                                                                                            |
| `currency`<br /><font color="#2166ae">Required</font>                                               | AN            | 3        | Currency                                                                            | IDR                                                                                                                                                                                                                                                                                                                                                                                             |
| `amt`<br /><font color="#2166ae">Required</font>                                                    | N             | 12       | Transaction Amount                                                                  | 10000                                                                                                                                                                                                                                                                                                                                                                                           |
| `referenceNo`<br /><font color="#2166ae">Required</font>                                            | ANS           | 40       | Merchant Order Number                                                               | MerchantReferenceNumber001                                                                                                                                                                                                                                                                                                                                                                      |
| `merchantToken`<br /><font color="#2166ae">Required</font>                                          | AN            | 255      | Merchant Token                                                                      | 4686062c297a3e48cf385953f411bbd48753bb70b041f2113a3e7c2e99c54f3c                                                                                                                                                                                                                                                                                                                                |
| `callBackUrl`<br /><font color="#2166ae">Required</font>                                            | AN            | 255      | Payment Result Forward URL                                                          | https\://www\.merchant.com/callbackUrl/                                                                                                                                                                                                                                                                                                                                                         |
| `dbProcessUrl`<br /><font color="#2166ae">Required</font>                                           | AN            | 255      | Payment Notification URL                                                            | https\://www\.merchant.com/dbProcessUrl                                                                                                                                                                                                                                                                                                                                                         |
| `goodsNm`<br /><font color="#2166ae">Required</font>                                                | AN            | 100      | Goods Name                                                                          | Merchant Goods 1                                                                                                                                                                                                                                                                                                                                                                                |
| `mitraCd`<br /><font color="#2166ae">Optional For CVS, Direct Debit, E-Wallet &amp; Paylater</font> | AN            | 4        | [Mitra Code](docId\:Tm257gq3DxgZf98uZ0l33)                                          | DANA                                                                                                                                                                                                                                                                                                                                                                                            |
| `vacctValidDt`<br /><font color="#2166ae">Required For VA</font>                                    | N             | 8        | VA Expiry Date<br />(`YYYYMMDD`)                                                    | 20230531                                                                                                                                                                                                                                                                                                                                                                                        |
| `vacctValidTm`<br /><font color="#2166ae">Required For VA</font>                                    | N             | 8        | VA Expiry Time<br />(`HH24MISS`)                                                    | 235959                                                                                                                                                                                                                                                                                                                                                                                          |
| `description`<br /><font color="#2166ae">Required</font>                                            | AN            | 100      | Transaction Description                                                             | This Is The Description Of The Payment                                                                                                                                                                                                                                                                                                                                                          |
| `billingNm`<br /><font color="#2166ae">Required</font>                                              | A             | 100      | Billing Name                                                                        | John Doe                                                                                                                                                                                                                                                                                                                                                                                        |
| `billingPhone`<br /><font color="#2166ae">Required</font>                                           | N             | 15       | Billing Phone                                                                       | 08123456789                                                                                                                                                                                                                                                                                                                                                                                     |
| `billingEmail`<br /><font color="#2166ae">Required</font>                                           | AN            | 40       | Billing E-mail                                                                      | john.doe\@example.com                                                                                                                                                                                                                                                                                                                                                                           |
| `billingAddr`                                                                                       | AN            | 100      | Billing Address                                                                     | Jln. Raya Casablanka Kav.88                                                                                                                                                                                                                                                                                                                                                                     |
| `billingCity`<br /><font color="#2166ae">Required</font>                                            | A             | 50       | Billing City                                                                        | South Jakarta                                                                                                                                                                                                                                                                                                                                                                                   |
| `billingState`<br /><font color="#2166ae">Required</font>                                           | A             | 50       | Billing State                                                                       | DKI Jakarta                                                                                                                                                                                                                                                                                                                                                                                     |
| `billingPostCd`<br /><font color="#2166ae">Required</font>                                          | N             | 10       | Billing Post Number                                                                 | 10200                                                                                                                                                                                                                                                                                                                                                                                           |
| `billingCountry`<br /><font color="#2166ae">Required</font>                                         | A             | 10       | Billing Country                                                                     | Indonesia                                                                                                                                                                                                                                                                                                                                                                                       |
| `userIP`                                                                                            | AN            | 15       | User IP                                                                             | 127.0.0.1                                                                                                                                                                                                                                                                                                                                                                                       |
| `cartData`<br /><font color="#2166ae">Required</font>                                               | AN            | 4000     | Cart Data                                                                           | \{\\"count\\":\\"1\\",\\"item\\":\[\{\\"goods\_id\\":\\"BB12345678\\",\\"goods\_detail\\":\\"BB123456\\",\\"goods\_name\\":\\"iPhone5S\\",\\"goods\_amt\\":\\"10000\\",\\"goods\_type\\":\\"Smartphone\\",\\"goods\_url\\":\\"http\://merchant.com/cellphones/iphone5s\_64g\\",\\"goods\_quantity\\":\\"1\\",\\"goods\_sellers\_id\\":\\"SEL123\\",\\"goods\_sellers\_name\\":\\"Sellers1\\"}]} |
| `deliveryNm`                                                                                        | A             | 30       | Delivery Name                                                                       | Merchant's Name                                                                                                                                                                                                                                                                                                                                                                                 |
| `deliveryPhone`                                                                                     | N             | 15       | Delivery Phone                                                                      | 08123456789                                                                                                                                                                                                                                                                                                                                                                                     |
| `deliveryAddr`                                                                                      | AN            | 100      | Delivery Address                                                                    | Jln. Dr. Saharjo No.88                                                                                                                                                                                                                                                                                                                                                                          |
| `deliveryCity`                                                                                      | A             | 50       | Delivery City                                                                       | South Jakarta                                                                                                                                                                                                                                                                                                                                                                                   |
| `deliveryState`                                                                                     | A             | 50       | Delivery State                                                                      | DKI Jakarta                                                                                                                                                                                                                                                                                                                                                                                     |
| `deliveryPostCd`                                                                                    | N             | 10       | Delivery Post Number                                                                | 10201                                                                                                                                                                                                                                                                                                                                                                                           |
| `deliveryCountry`                                                                                   | A             | 10       | Delivery Country                                                                    | Indonesia                                                                                                                                                                                                                                                                                                                                                                                       |
| `vat`                                                                                               | N             | 12       | Value Added Tax (VAT)                                                               |                                                                                                                                                                                                                                                                                                                                                                                                 |
| `fee`                                                                                               | N             | 12       | Service Fee                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                 |
| `notaxAmt`                                                                                          | N             | 12       | Tax Free Amount                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                 |
| `reqDt`                                                                                             | N             | 8        | Request Date<br />(`YYYYMMDD`)                                                      |                                                                                                                                                                                                                                                                                                                                                                                                 |
| `reqTm`                                                                                             | N             | 6        | Request Time<br />(`HH24MISS`)                                                      |                                                                                                                                                                                                                                                                                                                                                                                                 |
| `reqDomain`                                                                                         | AN            | 100      | Request Domain                                                                      | merchant.com                                                                                                                                                                                                                                                                                                                                                                                    |
| `reqServerIP`                                                                                       | AN            | 15       | Request Server IP                                                                   | 127.0.0.1                                                                                                                                                                                                                                                                                                                                                                                       |
| `reqClientVer`                                                                                      | AN            | 50       | Request Client Version                                                              |                                                                                                                                                                                                                                                                                                                                                                                                 |
| `userSessionID`                                                                                     | AN            | 100      | User Session ID                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                 |
| `userAgent`                                                                                         | AN            | 100      | User Agent Information                                                              |                                                                                                                                                                                                                                                                                                                                                                                                 |
| `userLanguage`                                                                                      | A             | 2        | User Language                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                 |
| `sellers`<br /><font color="#2166ae">Required For Paylater</font>                                   | `JSON String` | 4000     | Seller Data                                                                         | \[\{"sellersId": "SEL123","sellersNm": "Sellers 1","sellersEmail":"sellers\@test.com","sellersAddress": \{"sellerNm": "Sellers","sellerLastNm": "1","sellerAddr": "jalan berbangsa 1","sellerCity":"Jakarta Barat","sellerPostCd": "12344","sellerPhone":"08123456789","sellerCountry": "ID"}}]                                                                                                 |
| `instmntType`<br /><font color="#2166ae">Required For CC &amp; Paylater</font>                      | N             | 2        | [Installment Type Code](docId\:RT2C32S9hfl_aOhYoebv5)                               | 1 (For Pre-Auth & Recurring default 1)                                                                                                                                                                                                                                                                                                                                                          |
| `instmntMon`<br /><font color="#2166ae">Required For CC &amp; Paylater </font>                      | N             | 2        | Installment Month<br />`1`: 1 Month/Full Payment, *if*`instmntType`*:* `null`*/1*   | 1 (For Pre-Auth & Recurring default 1)                                                                                                                                                                                                                                                                                                                                                          |
| `recurrOpt`<br /><font color="#2166ae">Required For CC</font>                                       | N             | 2        | `0`: Automatic Cancel&#xD;<br />`1`: Do not cancel&#xD;<br />`2`: Do not make token | 2                                                                                                                                                                                                                                                                                                                                                                                               |
| `merFixAcctId`<br /><font color="#2166ae">Required For VA (Fixed Type)</font>                       | AN            | 40       | Merchant Reserved VA ID                                                             | <br />(Max 8 Digit Numbers)                                                                                                                                                                                                                                                                                                                                                                     |
| `payValidDt`<br /><font color="#2166ae">Required For CVS</font>                                     | N             | 8        | CVS Expiry Date (`YYYYMMDD`)                                                        | 20221212                                                                                                                                                                                                                                                                                                                                                                                        |
| `payValidTm`<br /><font color="#2166ae">Required For CVS</font>                                     | N             | 6        | CVS Expiry Time (`HH24MISS`)                                                        | 201012                                                                                                                                                                                                                                                                                                                                                                                          |
| `paymentExpDt`<br /><font color="#2166ae">Required</font>                                           | N             | 8        | QR Payment Expiry Date (`YYYYMMDD`)	                                                | 20221208                                                                                                                                                                                                                                                                                                                                                                                        |
| `paymentExpTm`<br /><font color="#2166ae">Required</font>                                           | N             | 6        | QR Payment Expiry Time (`HH24MISS`)                                                 | 092330                                                                                                                                                                                                                                                                                                                                                                                          |
| `shopId`<br />                                                                                      | AN            | 25       | Shop ID                                                                             | ""                                                                                                                                                                                                                                                                                                                                                                                              |



### Payment Method & Bank/Partner Configuration for Customers

The `payMethod` parameter enables you to manage which payment methods are displayed to the Customer on the NICEPAY Checkout page.

| **payMethod** | **Impact**                                      |
| ------------- | ----------------------------------------------- |
| `00`          | Shows all available payment method s (default). |
| `01` – `08`   | Shows only one specific payment method.         |

If you prefer to display all payment methods as usual, simply use `payMethod = '00'` without adding the `bankCd` or `mitraCd` parameters.

The designated `payMethod` code to direct the Customer to a specific payment method. For certain payment methods, you can specify which payment channel are using `bankCd` or `mitraCd` parameters.

**Example:**

- Shows all available payment methods → `payMethod = '00'`.
- Shows only Credit Card → `payMethod = '01'`.
- Shows only Virtual Account BCA → `payMethod = '02'`, `bankCd = 'CENA'`.
- Shows only E-Wallet DANA → `payMethod = '05'`, `mitraCd = 'DANA'`.



:::hint{type="warning"}
**Important notes regarding the Bank/Mitra parameter:**

- The `bankCd` parameter can only be used for Virtual Account (`02`) payment method.
- The `mitraCd` parameter can only be used for Convenience Store (`03`), Direct Debit (`04`), E-Wallet (`05`), dan Paylater (`06`) payment methods.
- The `bankCd` and `mitraCd` parameters cannot be used for Credit Card (`01`) and QRIS (`08`) payment methods.
:::



## Response Parameters for API Checkout Registration

***

| **Parameter** | **Type** | **Size** | **Description**                                     | **Remark**                                                      |
| ------------- | -------- | -------- | --------------------------------------------------- | --------------------------------------------------------------- |
| `resultCd`    | N        | 4        | [Result Code](docId:9eC3yH9CQqpb6cRWauWWO)          | 0000                                                            |
| `resultMsg`   | AN       | 255      | [Result Message](docId\:FsX1GESJKxOp0T9rvUHp_)      | SUCCESS                                                         |
| `tXid`        | AN       | 30       | Transaction ID                                      | IONPAYTEST00202305161555223616<br /><br />When Success          |
| `referenceNo` | ANS      | 40       | Merchant Order Number                               | MerchantReferenceNumber001                                      |
| `payMethod`   | N        | 2        | [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W) | 00<br /><br />When Success                                      |
| `amt`         | N        | 12       | Amount                                              | 10000<br /><br />When Success                                   |
| `transDt`     | N        | 8        | Transaction Date<br />(`YYYYMMDD`)                  | 20230516<br /><br />When Success                                |
| `transTm`     | N        | 6        | Transaction Time<br />(`HH24MISS`)                  | 135959<br /><br />When Success                                  |
| `description` | AN       | 100      | Transaction Description                             | This Is The Description Of The Payment <br /><br />When Success |
| `currency`    | AN       | 3        | Currency                                            | IDR<br /><br />When Success                                     |
| `goodsNm`     | AN       | 100      | Goods Name                                          | Merchant Goods 1<br /><br />When Success                        |
| `billingNm`   | A        | 100      | Buyer Name                                          | John Doe<br /><br />When Success                                |
| `payValidDt`  | N        | 8        | CVS Expiry Date<br />(`YYYYMMDD`)                   | null                                                            |
| `payValidTm`  | N        | 6        | CVS Expiry Time<br />(`HH24MISS`)                   | null                                                            |
| `bankCd`      | A        | 4        | [Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)           | CENA                                                            |
| `mitraCd`     | A        | 4        | [Mitra Code](docId:0luP35KfOWksiSrzKx6yZ)           | DANA                                                            |
| `paymentURL`  | AN       | 40       | Redirect URL NICEPAY                                | https\://www\.nicepay.co.id/nicepay/redirect/v2/payment         |

:::hint{type="success"}
After your transaction has been registered, direct your Customer to our Payment page to proceed with the payment. Please check the [Payment - API Checkout](docId\:o-4MmsbwXtZIb0ydniohw) page to view the details.
:::



## Sample Parameter for Registration - API Checkout

***

### Request Parameter

:::CodeblockTabs
cURL

```curl
curl --location 'https://dev.nicepay.co.id/nicepay/redirect/v2/registration' \
--header 'Content-Type: application/json' \
--data-raw '{
    "timeStamp" : "20251110141120",
    "iMid" : "IONPAYTEST",
    "payMethod" : "00",
    "currency" : "IDR",
    "referenceNo" : "ordNo20251110141120",
    "merchantToken" : "9da3d4c498aab78d9aa5f320713d3fffad1d50acd4d2d1ea9d18bb164bbf0d60",
    "mitraCd" : "",
    "amt" : "10000",
    "instmntType" : "1",
    "instmntMon" : "1",
    "callBackUrl" : "https://dev.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp",
    "dbProcessUrl" : "https://ptsv2.com/t/Sibedul/post",
    "goodsNm" : "Goods",
    "billingNm" : "Hantu Kesorean",
    "billingPhone" : "081234567890",
    "billingEmail" : "sample@mail.com",
    "billingAddr" : "Jl. Sample Address",
    "billingCity" : "South Jakarta",
    "billingState" : "DKI Jakarta",
    "billingCountry" : "Indonesia",
    "billingPostCd" : "12800",
    "deliveryNm" : "John Doe",
    "deliveryPhone" : "081234567890",
    "deliveryAddr" : "Jln. Sample Address",
    "deliveryCity" : "West Jakarta",
    "deliveryState" : "DKI Jakarta",
    "deliveryCountry" : "Indonesia",
    "deliveryPostCd" : "12800",
    "description" : "Testing Checkout API",
    "userIP" : "127.0.0.1",
    "userLanguage" : "ko-KR,en-US;q=0.8,ko;q=0.6,en;q=0.4",
    "cartData" : "{\"count\":\"1\",\"item\":[{\"goods_id\":\"BB12345678\",\"goods_detail\":\"BB123456\",\"goods_name\":\"iPhone5S\",\"goods_amt\":\"10000\",\"goods_type\":\"Smartphone\",\"goods_url\":\"http://merchant.com/cellphones/iphone5s_64g\",\"goods_quantity\":\"1\",\"goods_sellers_id\":\"SEL123\",\"goods_sellers_name\":\"Sellers1\"}]}",
    "sellers" :"[{\"sellersId\":\"SEL123\",\"sellersNm\":\"Sellers1\",\"sellersEmail\":\"sellers@test.com\",\"sellersUrl\":\"http://nicestore.store\",\"sellersAddress\":{\"sellerNm\":\"Sellers\",\"sellerLastNm\":\"1\",\"sellerAddr\":\"jalanberbangsa1\",\"sellerCity\":\"JakartaBarat\",\"sellerPostCd\":\"12344\",\"sellerPhone\":\"08123456789\",\"sellerCountry\":\"ID\"}}]",
    "msId" : "",
    "msFee" : "",
    "msFeeType" : "",
    "escrowCl" : ""
}'
```

Node.js

```nodejs
const SecondApiVersion = require("../lib/secondApiVersion.js");

const config = {
  isProduction: false,
  isCloudServer: false,
  merchantKey: "YOUR_MERCHANT_KEY", 
};

const parameter = {
  timeStamp: "20251110141120",
  iMid: "IONPAYTEST",
  payMethod: "00",
  currency: "IDR",
  referenceNo: "ordNo20251110141120",
  mitraCd: "",
  amt: "10000",
  instmntType: "1",
  instmntMon: "1",
  callBackUrl: "https://dev.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp",
  dbProcessUrl: "https://ptsv2.com/t/Sibedul/post",
  goodsNm: "Goods",
  billingNm: "Hantu Kesorean",
  billingPhone: "081234567890",
  billingEmail: "sample@mail.com",
  billingAddr: "Jl. Sample Address",
  billingCity: "South Jakarta",
  billingState: "DKI Jakarta",
  billingCountry: "Indonesia",
  billingPostCd: "12800",
  deliveryNm: "John Doe",
  deliveryPhone: "081234567890",
  deliveryAddr: "Jln. Sample Address",
  deliveryCity: "West Jakarta",
  deliveryState: "DKI Jakarta",
  deliveryCountry: "Indonesia",
  deliveryPostCd: "12800",
  description: "Testing Checkout API",
  userIP: "127.0.0.1",
  userLanguage: "ko-KR,en-US;q=0.8,ko;q=0.6,en;q=0.4",
  cartData:
    '{"count":"1","item":[{"goods_id":"BB12345678","goods_detail":"BB123456","goods_name":"iPhone5S","goods_amt":"10000","goods_type":"Smartphone","goods_url":"http://merchant.com/cellphones/iphone5s_64g","goods_quantity":"1","goods_sellers_id":"SEL123","goods_sellers_name":"Sellers1"}]}',
  sellers:
    '[{"sellersId":"SEL123","sellersNm":"Sellers1","sellersEmail":"sellers@test.com","sellersUrl":"http://nicestore.store","sellersAddress":{"sellerNm":"Sellers","sellerLastNm":"1","sellerAddr":"jalanberbangsa1","sellerCity":"JakartaBarat","sellerPostCd":"12344","sellerPhone":"08123456789","sellerCountry":"ID"}}]',
  msId: "",
  msFee: "",
  msFeeType: "",
  escrowCl: "",
};

let secondVersion = new SecondApiVersion(config);
let response = secondVersion
  .requestAPI(parameter, "/redirect/v2/registration");
```

```java
config = NICEPay.builder()
        .isProduction(false)
        .isCloudServer(false)
        .build();

String timeStamp = "20251110141120";
String iMid = "IONPAYTEST";
String reffNo = "ordNo20251110141120";
String amount = "10000";

Redirect request = Redirect.builder()
        .timeStamp(timeStamp)
        .iMid(iMid)
        .payMethod("00")
        .currency("IDR")
        .amt(amount)
        .referenceNo(reffNo)
        .goodsNm("Goods")
        .billingNm("Hantu Kesorean")
        .billingPhone("081234567890")
        .billingEmail("sample@mail.com")
        .billingAddr("Jl. Sample Address")
        .billingCity("South Jakarta")
        .billingState("DKI Jakarta")
        .billingPostCd("12800")
        .billingCountry("Indonesia")
        .deliveryNm("John Doe")
        .deliveryPhone("081234567890")
        .deliveryAddr("Jln. Sample Address")
        .deliveryCity("West Jakarta")
        .deliveryState("DKI Jakarta")
        .deliveryPostCd("12800")
        .deliveryCountry("Indonesia")
        .dbProcessUrl("https://ptsv2.com/t/Sibedul/post")
        .callBackUrl("https://dev.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp")
        .vat("")
        .fee("")
        .notaxAmt("")
        .description("Testing Checkout API")
        .merchantToken(timeStamp, iMid, reffNo, amount, MERCHANT_KEY)
        .reqTm("")
        .reqDt("")
        .reqDomain("")
        .reqServerIP("")
        .reqClientVer("")
        .userIP("127.0.0.1")
        .userSessionID("")
        .userAgent("")
        .userLanguage("ko-KR,en-US;q=0.8,ko;q=0.6,en;q=0.4")
        .cartData("{\"count\":\"1\",\"item\":[{\"goods_id\":\"BB12345678\",\"goods_detail\":\"BB123456\",\"goods_name\":\"iPhone5S\",\"goods_amt\":\"10000\",\"goods_type\":\"Smartphone\",\"goods_url\":\"http://merchant.com/cellphones/iphone5s_64g\",\"goods_quantity\":\"1\",\"goods_sellers_id\":\"SEL123\",\"goods_sellers_name\":\"Sellers1\"}]}")
        .sellers("[{\"sellersId\":\"SEL123\",\"sellersNm\":\"Sellers1\",\"sellersEmail\":\"sellers@test.com\",\"sellersUrl\":\"http://nicestore.store\",\"sellersAddress\":{\"sellerNm\":\"Sellers\",\"sellerLastNm\":\"1\",\"sellerAddr\":\"jalanberbangsa1\",\"sellerCity\":\"JakartaBarat\",\"sellerPostCd\":\"12344\",\"sellerPhone\":\"08123456789\",\"sellerCountry\":\"ID\"}}]")
        .mitraCd("")
        .instmntType("1")
        .instmntMon("1")
        .recurrOpt("")
        .bankCd("")
        .vacctValidDt("")
        .vacctValidTm("")
        .payValidDt("")
        .paymentExpTm("")
        .merFixAcctId("")
        .paymentExpDt("")
        .payValidTm("")
        .shopId("")
        .msId("")
        .msFee("")
        .msFeeType("")
        .escrowCl("")
        .build();

NICEPayResponseV2 response =
        V2RedirectService.callV2RedirectRegistration(request, config);
```

```python
amt = "10000"
itemCartData = {
    "goods_id": "BB12345678",
    "goods_name": "iPhone5S",
    "goods_detail": "BB123456",
    "goods_amt": amt,
    "goods_quantity": "1",
    "goods_type": "Smartphone",
    "goods_url": "http://merchant.com/cellphones/iphone5s_64g",
    "goods_sellers_id": "SEL123",
    "goods_sellers_name": "Sellers1"
}
itemSellersAddress = {
    "sellerNm": "Sellers",
    "sellerLastNm": "1",
    "sellerAddr": "jalanberbangsa1",
    "sellerCity": "JakartaBarat",
    "sellerPostCd": "12344",
    "sellerCountry": "ID",
    "sellerPhone": "08123456789"
}

bodyCartData = (
    builderCartData.BuildCartData()
    .setCount("1")
    .setItem(itemCartData)
    .build()
)

bodySellers = (
    builderSellers.BuildSellers()
    .setSellerId("SEL123")
    .setSellerNm("Sellers1")
    .setSellerEmail("sellers@test.com")
    .setSellerUrl("http://nicestore.store")
    .setSellerAddress(itemSellersAddress)
    .build()
)

bodyRequest = (
    builderRequest.BuildRequest()
    .setPayMethod("00")
    .setInstmntType("1")
    .setInstmntMon("1")
    .setRecurrOpt("")
    .setBankCd("")
    .setMitraCd("")
    .setVacctValidDt("")
    .setVacctValidTm("")
    .setMerFixAcctId("")
    .setPayValidDt("")
    .setPayValidTm("")
    .setPaymentExpDt("")
    .setPaymentExpTm("")
    .setAmt(amt)
    .build()
)

environment = (builderEnvironment.BuildEnvironment()
               .isCloud(False)
               .isProduction(False)
               .build())

response = ServiceNicepay.serviceRedirect(DataGenerator.getTransactionBody(bodyRequest.jsonRequest(),
                                                                          bodyCartData.jsonCartData(),
                                                                          bodySellers.jsonSellers()), environment)
```

C#

```csharp
string merchantKey = "YOUR_MERCHANT_KEY";
string clientId = "IONPAYTEST";
string timestamp = "20251110141120";
string refNo = "ordNo20251110141120";
string amount = "10000";
bool isProduction = false;
bool isCloudServer = false;

var builder = new MerchantTokenBuilder()
  .SetTimeStamp(timestamp)
  .SetIMid(clientId)
  .SetRefNo(refNo)
  .SetAmount(amount)
  .SetMerchantKey(merchantKey);

// Act: Menghasilkan merchantToken
string merchantToken = builder.BuildMerchantToken();

var cartData = new
{
    count = "1",
    item = new[]
    {
        new
        {
            goods_id = "BB12345678",
            goods_detail = "BB123456",
            goods_name = "iPhone5S",
            goods_amt = amount,
            goods_type = "Smartphone",
            goods_url = "http://merchant.com/cellphones/iphone5s_64g",
            goods_quantity = "1",
            goods_sellers_id = "SEL123",
            goods_sellers_name = "Sellers1"
        }
    }
};

string cartDataJson = JsonConvert.SerializeObject(cartData);
string sellersJson = "[{\"sellersId\":\"SEL123\",\"sellersNm\":\"Sellers1\",\"sellersEmail\":\"sellers@test.com\",\"sellersUrl\":\"http://nicestore.store\",\"sellersAddress\":{\"sellerNm\":\"Sellers\",\"sellerLastNm\":\"1\",\"sellerAddr\":\"jalanberbangsa1\",\"sellerCity\":\"JakartaBarat\",\"sellerPostCd\":\"12344\",\"sellerPhone\":\"08123456789\",\"sellerCountry\":\"ID\"}}]";

var Bodybuilder = new NicepayRequestBuilder()
    // BASE REQUEST MANDATORY
    .SetCommonFields(
        iMid: clientId,
        timeStamp: timestamp,
        payMethod: "00",
        currency: "IDR",
        amt: amount,
        referenceNo: refNo,
        goodsNm: "Goods",
        merchantToken: merchantToken
    )
    .SetUserInfo(
        userIP: "127.0.0.1",
        userSessionID: "",
        userAgent: "",
        userLanguage: "ko-KR,en-US;q=0.8,ko;q=0.6,en;q=0.4"
    )
    .SetCallBackUrl(callBackUrl: "https://dev.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp")
    .SetDbProcessUrl("https://ptsv2.com/t/Sibedul/post")
    .SetCartData(cartData: cartDataJson)
    .SetSellers(sellersJson) // Assuming a .SetSellers() method exists
    .SetBillingInfo(
        billingNm: "Hantu Kesorean",
        billingPhone: "081234567890",
        billingEmail: "sample@mail.com",
        billingAddr: "Jl. Sample Address",
        billingCity: "South Jakarta",
        billingState: "DKI Jakarta",
        billingPostCd: "12800",
        billingCountry: "Indonesia"
    )
    // FOR VA
    .setBankCd(bankCd: "")
    .SetVaExpiry(
        vacctValidDt: "",
        vacctValidTm: ""
    )
    // FOR EWALLET
    .setMitraCd(mitraCd: "")
    //FOR CC
    .setCreditCard(
        instmntType: "1",
        instmntMon: "1",
        recurrOpt: ""
    )
    //FOR QRIS
    .setPaymentExp(
        paymentExpDt: "",
        paymentExpTm: ""
    )
    .SetDeliveryInfo(
        deliveryNm: "John Doe",
        deliveryPhone: "081234567890",
        deliveryAddr: "Jln. Sample Address",
        deliveryCity: "West Jakarta",
        deliveryState: "DKI Jakarta",
        deliveryPostCd: "12800",
        deliveryCountry: "Indonesia"
    );

ApiEndpoints apiEndpoints = new ApiEndpoints();
Dictionary<string, object> payload = Bodybuilder.Build();
string jsonPayload = Newtonsoft.Json.JsonConvert.SerializeObject(payload);

var registrationService = new NicepayRegistrationService(apiEndpoints, isProduction, isCloudServer);
var result = await registrationService.SendPostAsync(apiEndpoints.RegistRedirectV2, payload);
```

PHP Native

```php
$timestamp = Helper::getFormattedTimestampV2();
        $referenceNo = "ordNo20251110141120";
        $amount = "10000";
        $config = NICEPay::builder()
            ->setIsProduction(false)
            ->setTimestamp($timestamp)
            ->build();

        $parameter = Redirect::builder()
            ->setTimeStamp($timestamp)
            ->setIMid(TestConst::$IMID_TEST)
            ->setPayMethod("00")
            ->setCurrency("IDR")
            ->setReferenceNo($referenceNo)
            ->setAmt($amount)
            ->setMerchantToken($timestamp, TestConst::$IMID_TEST, $referenceNo, $amount, $this->merchantKey)
            ->setCallBackUrl("https://dev.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp")
            ->setDbProcessUrl("https://ptsv2.com/t/Sibedul/post")
            ->setGoodsNm("Goods")
            ->setBillingNm("Hantu Kesorean")
            ->setBillingPhone("081234567890")
            ->setBillingEmail("sample@mail.com")
            ->setBillingAddr("Jl. Sample Address")
            ->setBillingCity("South Jakarta")
            ->setBillingState("DKI Jakarta")
            ->setBillingCountry("Indonesia")
            ->setBillingPostCd("12800")
            ->setDeliveryNm("John Doe")
            ->setDeliveryPhone("081234567890")
            ->setDeliveryAddr("Jln. Sample Address")
            ->setDeliveryCity("West Jakarta")
            ->setDeliveryState("DKI Jakarta")
            ->setDeliveryCountry("Indonesia")
            ->setDeliveryPostCd("12800")
            ->setDescription("Testing Checkout API")
            ->setUserIP("127.0.0.1")
            ->setUserLanguage("ko-KR,en-US;q=0.8,ko;q=0.6,en;q=0.4")
            ->setCartData(
                "{\"count\":\"1\",\"item\":[{\"goods_id\":\"BB12345678\",\"goods_detail\":\"BB123456\",\"goods_name\":\"iPhone5S\",\"goods_amt\":\"10000\",\"goods_type\":\"Smartphone\",\"goods_url\":\"http://merchant.com/cellphones/iphone5s_64g\",\"goods_quantity\":\"1\",\"goods_sellers_id\":\"SEL123\",\"goods_sellers_name\":\"Sellers1\"}]}"
            )
            ->setSellers("[{\"sellersId\":\"SEL123\",\"sellersNm\":\"Sellers1\",\"sellersEmail\":\"sellers@test.com\",\"sellersUrl\":\"http://nicestore.store\",\"sellersAddress\":{\"sellerNm\":\"Sellers\",\"sellerLastNm\":\"1\",\"sellerAddr\":\"jalanberbangsa1\",\"sellerCity\":\"JakartaBarat\",\"sellerPostCd\":\"12344\",\"sellerPhone\":\"08123456789\",\"sellerCountry\":\"ID\"}}]")
            ->setMitraCd("")
            ->setInstmntType("1")
            ->setInstmntMon("1")
            ->build();

        $v2RedirectService = new V2RedirectService($config);
        try {
            $response = $v2RedirectService->registration($parameter);
        } catch (NicepayError $e) {
            $this->fail("Exception thrown: " . $e->getMessage());
        }
```

Laravel

```php
$url = HttpUtil::getNicepayDomain($this->useProd, $this->useCloud) . $this->registration_endpoint;

$timestamp = "20251110141120";
$reference_no = "ordNo20251110141120";
$amt = $this->amt;

$merchant_token = $this->generateMerchantToken($timestamp, $this->imid, $reference_no, $amt, $this->mer_key);

$cartData = '{"count":"1","item":[{"goods_id":"BB12345678","goods_detail":"BB123456","goods_name":"iPhone5S","goods_amt":"10000","goods_type":"Smartphone","goods_url":"http://merchant.com/cellphones/iphone5s_64g","goods_quantity":"1","goods_sellers_id":"SEL123","goods_sellers_name":"Sellers1"}]}';
$sellers = '[{"sellersId":"SEL123","sellersNm":"Sellers1","sellersEmail":"sellers@test.com","sellersUrl":"http://nicestore.store","sellersAddress":{"sellerNm":"Sellers","sellerLastNm":"1","sellerAddr":"jalanberbangsa1","sellerCity":"JakartaBarat","sellerPostCd":"12344","sellerPhone":"08123456789","sellerCountry":"ID"}}]';

$body = [
    "timeStamp" => $timestamp,
    "iMid" => $this->imid,
    "payMethod" => "00",
    "currency" => "IDR",
    "referenceNo" => $reference_no,
    "merchantToken" => $merchant_token,
    "mitraCd" => "",
    "amt" => $this->amt,
    "instmntType" => "1",
    "instmntMon" => "1",
    "callBackUrl" => "https://dev.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp",
    "dbProcessUrl" => "https://ptsv2.com/t/Sibedul/post",
    "goodsNm" => "Goods",
    "billingNm" => "Hantu Kesorean",
    "billingPhone" => "081234567890",
    "billingEmail" => "sample@mail.com",
    "billingAddr" => "Jl. Sample Address",
    "billingCity" => "South Jakarta",
    "billingState" => "DKI Jakarta",
    "billingCountry" => "Indonesia",
    "billingPostCd" => "12800",
    "deliveryNm" => "John Doe",
    "deliveryPhone" => "081234567890",
    "deliveryAddr" => "Jln. Sample Address",
    "deliveryCity" => "West Jakarta",
    "deliveryState" => "DKI Jakarta",
    "deliveryCountry" => "Indonesia",
    "deliveryPostCd" => "12800",
    "description" => "Testing Checkout API",
    "userIP" => "127.0.0.1",
    "userLanguage" => "ko-KR,en-US;q=0.8,ko;q=0.6,en;q=0.4",
    "cartData" => $cartData,
    "sellers" => $sellers,
    "msId" => "",
    "msFee" => "",
    "msFeeType" => "",
    "escrowCl" => ""
];

try {
    $response = HttpUtil::postJsonRequest($url, $body);
} catch (Throwable $th) {
    return HttpUtil::generateErrorResponse($th);
}
```

CodeIgniter

```php
$timestamp = "20251110141120";
$configBuilder = NICEPay::builder();
$config = $configBuilder
    ->setIsProduction(false)
    ->setIsCloudServer(false)
    ->build();
$reffNo = "ordNo20251110141120";
$amount = "10000";
$cartData = [
    "count" => "1",
    "item" => [[
        "goods_id" => "BB12345678",
        "goods_detail" => "BB123456",
        "goods_name" => "iPhone5S",
        "goods_amt" => $amount,  // Replace dynamically if needed
        "goods_type" => "Smartphone",
        "goods_url" => "http://merchant.com/cellphones/iphone5s_64g",
        "goods_quantity" => "1",
        "goods_sellers_id" => "SEL123",
        "goods_sellers_name" => "Sellers1"
    ]]
];
$sellers = "[{\"sellersId\":\"SEL123\",\"sellersNm\":\"Sellers1\",\"sellersEmail\":\"sellers@test.com\",\"sellersUrl\":\"http://nicestore.store\",\"sellersAddress\":{\"sellerNm\":\"Sellers\",\"sellerLastNm\":\"1\",\"sellerAddr\":\"jalanberbangsa1\",\"sellerCity\":\"JakartaBarat\",\"sellerPostCd\":\"12344\",\"sellerPhone\":\"08123456789\",\"sellerCountry\":\"ID\"}}]";

$RedirectBuilder = Redirect::builder();
$parameter = $RedirectBuilder
    ->setTimeStamp($timestamp)
    ->setIMid("IONPAYTEST")
    ->setPayMethod("00")
    ->setCurrency("IDR")
    ->setDescription("Testing Checkout API")
    ->setBankCd("")
    ->setAmt($amount)
    ->setReferenceNo($reffNo)
    ->setMerchantToken($timestamp, $this->iMidTest, $reffNo, $amount, $this->merchantKey) // Unchanged as requested
    ->setVacctValidDt("")
    ->setVacctValidTm("")
    ->setMerFixAcctId("")
    ->setDbProcessUrl("https://ptsv2.com/t/Sibedul/post")
    ->setCallBackUrl("https://dev.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp")
    ->setGoodsNm("Goods")
    ->setCartData(json_encode($cartData))
    ->setSellers($sellers)
    ->setBillingNm("Hantu Kesorean")
    ->setBillingPhone("081234567890")
    ->setBillingEmail("sample@mail.com")
    ->setBillingAddr("Jl. Sample Address")
    ->setBillingCity("South Jakarta")
    ->setBillingState("DKI Jakarta")
    ->setBillingPostCd("12800")
    ->setBillingCountry("Indonesia")
    ->setUserIP("127.0.0.1")
    ->setUserLanguage("ko-KR,en-US;q=0.8,ko;q=0.6,en;q=0.4")
    ->setDeliveryNm("John Doe")
    ->setDeliveryPhone("081234567890")
    ->setDeliveryAddr("Jln. Sample Address")
    ->setDeliveryCity("West Jakarta")
    ->setDeliveryState("DKI Jakarta")
    ->setDeliveryPostCd("12800")
    ->setDeliveryCountry("Indonesia")
    ->setInstmntType("1")
    ->setInstmntMon("1")
    ->setMitraCd("")
    ->setMsId("")
    ->setMsFee("")
    ->setMsFeeType("")
    ->setEscrowCl("")
    ->build();

$v2VaService = new V2RedirectService($config);

try {
    $response = $v2VaService->registration($parameter);
}
```
:::

### Response Parameter

:::CodeblockTabs
Sample Response

```json
{
    "resultCd": "0000",
    "resultMsg": "SUCCESS",
    "tXid": "IONPAYTEST00202511101446495037",
    "referenceNo": "ordNo20251110141120",
    "payMethod": "00",
    "amt": "10000",
    "transDt": "20251110",
    "transTm": "144649",
    "description": "Testing Checkout API",
    "currency": "IDR",
    "goodsNm": "Goods",
    "billingNm": "Hantu Kesorean",
    "payValidDt": null,
    "payValidTm": null,
    "bankCd": null,
    "mitraCd": null,
    "paymentURL": "https://dev.nicepay.co.id/nicepay/redirect/v2/payment"
}
```
:::



# Cart Data, Paylater Cart Data & Paylater Seller Data for Registration - API Checkout

***

The Card Data on Checkout API is useful for declaring what items will be checked out along with item details and prices per item. This Card Data applies to all payment methods, except payment method using Paylater because the Paylater payment method has special Cart Data.



## Cart Data for Registration - API Checkout

***

:::hint{type="success"}
- `cartData` must be released in the string form.
- Special characters are not supported in `cartData`.
- Make sure that `count` is the same as the number of `item` object.
- Make sure that `goods_amt` x `goods_quantity` is the same as the `amt` parameter.
:::

| **Parameter** | **Description**                                                                                                       | **Remark** |
| ------------- | --------------------------------------------------------------------------------------------------------------------- | ---------- |
| `Count`       | Total number of all cart data                                                                                         | 2          |
| `Item`        | Divided into 5 kinds of parameters, namely `img_url`, `goods_name`, `goods_detail`, `goods_amt`, and `goods_quantity` | -          |

Detailed explanation of the **Item** parameters.

| **Parameter**    | **Description**                    | **Remark**                   |
| ---------------- | ---------------------------------- | ---------------------------- |
| `img_url`        | Goods Image URL (Size 50px x 50px) | http\://img.aaa.com/ima1.jpg |
| `goods_name`     | Goods Name                         | Item 1 Name                  |
| `goods_detail`   | Goods Detail Description           | Item 1 Detail                |
| `goods_amt`      | Goods Amount                       | 700                          |
| `goods_quantity` | Goods Quantity                     | 1                            |

:::CodeblockTabs
Card Data

```json
{
    "count": "2",  
    "item": [  
        {
            "img_url": "http://img.aaa.com/ima1.jpg",  
            "goods_name": "Item 1 Name",
            "goods_detail": "Item 1 Detail",
            "goods_amt": "700",
            "goods_quantity": "1"
        },  
        {
            "img_url": "http://img.aaa.com/ima2.jpg",
            "goods_name": "Item 2 Name",
            "goods_detail": "Item 2 Detail",
            "goods_amt": "300",
            "goods_quantity": "1"
        }  
        ] 
} 
```
:::



## Paylater Cart Data for Registration - API Checkout

***

| **Parameter**                  | **Description**       |
| ------------------------------ | --------------------- |
| `count`                        | Total Cart Data Count |
| `item`                         | List of Goods         |
| `item` -> `goods_id`           | Goods ID              |
| `item` -> `goods_detail`       | Goods Detail          |
| `item` -> `goods_name`         | Goods Name            |
| `item` -> `goods_amt`          | Goods Amount          |
| `item` -> `goods_type`         | Goods Type            |
| `item` -> `goods_url`          | Goods URL             |
| `item` -> `goods_quantity`     | Goods Quantity        |
| `item` -> `goods_sellers_id`   | Seller's ID           |
| `item` -> `goods_sellers_name` | Seller's Name         |

:::hint{type="info"}
`cartData` is mandatory to be released in the string form.
:::

:::CodeblockTabs
Paylater Cart Data

```json
{
  "count": "2",
  "item": [
    {
      "goods_id": "BB12345678",
      "goods_detail": "BB123456",
      "goods_name": "iPhone 5S",
      "goods_amt": "6000000",
      "goods_type": "Smartphone",
      "goods_url": "http://merchant.com/cel lphones/iphone5s_64g",
      "goods_quantity": "1",
      "goods_sellers_id": "SEL123",
      "goods_sellers_name": "Sellers 1"
    },
    {
      "goods_id": "AZ14565678",
      "goods_name": "Hailee Sneakers Blink Silver",
      "goods_amt": "250000",
      "goods_url": "http://merchant.com/fashion/shoes/sneakers-blinkshoes",
      "goods_type": "Sneakers",
      "goods_quantity": "2",
      "goods_sellers_id": "SEL124",
      "goods_ sellers_name": "Sellers 2"
    }
  ]
}
```
:::

:::hint{type="info"}
- `cartData` is specifically for Paylater.&#x20;
- Make sure the `count` parameters are based on the goods' type number.
- Make sure the `goods_sellers_id` and `goods_sellers_name` are contained according to the `sellers` on Registration.
:::



## Paylater Sellers Data for for Registration - API Checkout

***

| **Parameter**                       | **Description**      |
| ----------------------------------- | -------------------- |
| `sellersId`                         | Seller's ID          |
| `sellersNm`                         | Seller's Name        |
| `sellersEmail`                      | Seller's E-mail      |
| `sellersUrl`                        | Seller's URL         |
| `sellersAddress` -> `sellerNm`      | Seller's Name        |
| `sellersAddress` -> `sellerLastNm`  | Seller's Last Name   |
| `sellersAddress` -> `sellerAddr`    | Seller's Address     |
| `sellersAddress` -> `sellerCity`    | Seller's City        |
| `sellersAddress` -> `sellerPostCd`  | Seller's Postal Code |
| `sellersAddress` -> `sellerPhone`   | Seller's Phone       |
| `sellersAddress` -> `sellerCountry` | Seller's Country     |

:::CodeblockTabs
Paylater Sellers Data

```json
[
  {
    "sellersId": "SEL123",
    "sellersNm": "Sellers 1",
    "sellersEmail": "sellers@test.com",
    "sellersUrl": "http://nicestore.store",
    "sellersAddress": {
      "sellerNm": "Sellers",
      "sellerLastNm": "1",
      "sellerAddr": "jalan berbangsa 1",
      "sellerCity": "Jakarta Barat",
      "sellerPostCd": "12344",
      "sellerPhone": "08123456789",
      "sellerCountry": "ID"
    }
  },
  {
    "sellersId": "SEL124",
    "sellersNm": "Sellers 2",
    "sellersEmail": "sellers2@test.com",
    "sellersUrl": "http://nicestore.store",
    "sellersAddress": {
      "sellerNm": "Sellers",
      "sellerLastNm": "2",
      "sellerAddr": "jalan berkelok 3",
      "sellerCity": "Jakarta Utara",
      "sellerPostCd": "12222",
      "sellerPhone": "081255556789",
      "sellerCountry": "ID"
    }
  }
]
```
:::

