---
title: Full Payment & Installment - Registration API Credit Card
slug: en/nicepay-api-non-snap-full-payment-and-installment-registration-api-credit-card
description: Information about Non-SNAP Payment API - Registration - Full Payment & Installment - Credit Card API available on NICEPAY system
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/wKCNLeuGsurTURJ2pDAXj_microsoftteams-image.png
icon: {"faIcon":"fa-solid fa-book"}
docTags: 
createdAt: 2023-05-05T07:45:51.000Z
---

# About Full Payment & Installment - Registration API Credit Card

***

Full Payment & Installment payment type is a choice of payment types using a Credit Card that pays a bill in full or installment (3, 6, or 12 months).



# Full Payment & Installment - Registration API Credit Card

***

**API Registration** on Credit Card payment method is the first step on doing [Payment API](docId\:A7AYThAxqGfPUOvB9G4Wa) integration with NICEPAY.



| **API Endpoint**   | `/nicepay/direct/v2/registration`                            |
| ------------------ | ------------------------------------------------------------ |
| **Request Method** | <font color="#3b9f0f">**POST**</font>****                    |
| **Description**    | Performs Transaction Regist to NICEPAY&#xD;                  |
| **Merchant Token** | SHA256(`timeStamp`+`iMid`+`referenceNo`+`amt`+`merchantKey`) |
| **Request Format** | `application/json`                                           |



## Request Parameter for Full Payment & Installment - Registration API Credit Card

***

Following is a list of parameters needed to request the Registration on API Credit Card payment method.

| **Parameter**                                                                       | **Type**           | **Size** | **Description**                                                                                                                           | **Example / Notes**                                                         |
| ----------------------------------------------------------------------------------- | ------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `timeStamp`<br /><font color="#2166ae">Required</font>                              | N                  | 14       | Request Timestamp (`YYYYMMDDHH24MISS`)                                                                                                    | 20221202141217                                                              |
| `iMid`<br /><font color="#2166ae">Required</font>                                   | AN                 | 10       | Merchant ID	<br />                                                                                                                        | IONPAYTEST                                                                  |
| `payMethod`<br /><font color="#2166ae">Required</font>                              | N                  | 2        | [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W)                                                                                       | 01&#xD;                                                                     |
| `currency`<br /><font color="#2166ae">Required</font>                               | A                  | 3        | Currency<br />                                                                                                                            | IDR                                                                         |
| `amt` <br /><font color="#2166ae">Required</font>                                   | N                  | 12       | Amount<br />(number not in float format)                                                                                                  | 10000 (Sum amount total goods from `cartData`)                              |
| `referenceNo`<br /><font color="#2166ae">Required</font>                            | ANS                | 40       | Merchant's Reference Number	<br />                                                                                                        | ordNo20221202141217                                                         |
| `goodsNm `<font color="#2166ae"> </font><br /><font color="#2166ae">Required</font> | AN                 | 100      | Goods Name	<br />                                                                                                                         | Testing Transaction&#xD;                                                    |
| `billingNm `<br /><font color="#2166ae">Required</font>                             | A                  | 100      | Buyer Name	<br />                                                                                                                         | John Doe&#xD;                                                               |
| `billingPhone `<br /><font color="#2166ae">Required</font>                          | N                  | 15       | Buyer Phone Number<br />                                                                                                                  | 2112345678                                                                  |
| `billingEmail `<br /><font color="#2166ae">Required</font>                          | ANS                | 40       | Buyer E-mail	<br />                                                                                                                       | buyer\@merchant.com                                                         |
| `billingAddr `<br /><font color="#2166ae">Required</font>                           | AN                 | 100      | Buyer Address	<br />                                                                                                                      | Jln. Raya Kasablanka Kav.88&#xD;                                            |
| `billingCity `<br /><font color="#2166ae">Required</font>                           | A                  | 50       | Buyer City	<br />                                                                                                                         | South Jakarta&#xD;                                                          |
| `billingState `<br /><font color="#2166ae">Required</font>                          | A                  | 50       | Billing State	<br />                                                                                                                      | DKI Jakarta&#xD;                                                            |
| `billingPostCd `<br /><font color="#2166ae">Required</font>                         | N                  | 10       | Billing Post Number	<br />                                                                                                                | 14350                                                                       |
| `billingCountry`<br /><font color="#2166ae">Required</font>                         | A                  | 10       | Billing Country	<br />                                                                                                                    | Indonesia                                                                   |
| `cartData`<br /><font color="#2166ae">Optional</font>                               | `JSONstring`<br /> | 4000     | Cart Data<br />                                                                                                                           | \{}                                                                         |
| `instmntType`<br /><font color="#2166ae">Required</font>                            | N                  | 2        | [Installment Type Code](docId:_Wzur5wjwhrDR8YXI-Ppi)                                                                                      | 1                                                                           |
| `instmntMon`<br /><font color="#2166ae">Required</font>                             | 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                                                                           |
| `recurrOpt`<br /><font color="#2166ae">Required</font>                              | N                  | 2        | `0`: Automatic Cancel&#xD;<br />`1`: Do not cancel&#xD;<br />`2`: Do not make token                                                       | 2                                                                           |
| `dbProcessUrl`<br /><font color="#2166ae">Required</font>                           | ANS                | 255      | Notification URL	<br />                                                                                                                   | https\://merchant.com/dbProcessUrl&#xD;<br />                               |
| `userIP`<br /><font color="#2166ae">Required for CC, E-Wallet, Payloan, QRIS</font> | AN                 | 15       | User IP                                                                                                                                   | 127.0.0.1                                                                   |
| `merchantToken`<br /><font color="#2166ae">Required</font>                          | AN                 | 255      | Merchant Token	<br />                                                                                                                     | c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae&#xD;<br /> |
| `description`                                                                       | AN                 | 100      | Transaction Description	                                                                                                                  | Test Transaction&#xD;                                                       |
| `userSessionID`                                                                     | AN                 | 100      | User Session ID	                                                                                                                          | userSessionID                                                               |
| `userAgent`                                                                         | ANS                | 100      | User Agent	                                                                                                                               | Mozilla                                                                     |
| `userLanguage`                                                                      | A                  | 2        | User Language	                                                                                                                            | en-US&#xD;                                                                  |

:::hint{type="warning"}
**Notes for Credit Card Full Payment & Credit Card Installment**

- For **Credit Card - Full Payment** payment type, on `instmntType` parameter can fill with *1 or empty (Nul&#x6C;*)** and on `instmntMon` parameter can fill with *1 or empty (Null)*.
- For **Credit Card - Installment** payment type, on `instmntType` parameter can fill with *2* and on `instmntMon` parameter can fill with *3 (3 months), 6 (6 months) or 12 (12 months)*.
:::

### Cart Data for Full Payment & Installment - Registration API Credit Card

`cartData` on request parameter at Credit Card Registration uses to cover the goods or items will be paid to Your Customer including the item detail and each item price.&#x20;

| **Parameter** | **Description**                                                                                            | **Example** |
| ------------- | ---------------------------------------------------------------------------------------------------------- | ----------- |
| `Count`       | Total sum from the whole cart data                                                                         | 2           |
| `Item`        | Divide into 5 types of parameter such as `img_url`, `goods_id, goods_name`, `goods_detail` and `goods_amt` | -           |

***

Detail explaination on **Item&#x20;**&#x70;arameter.

| **Parameter**  | **Description**                     | **Example**                                   |
| -------------- | ----------------------------------- | --------------------------------------------- |
| `img_url`      | URL Item Picture (Size 50px x 50px) | htttps\://www\.merchant.com/image\_goods1.jpg |
| `goods_id`     | Item ID                             | NICEPRDID1                                    |
| `goods_name`   | Item Name                           | Nama Item-1                                   |
| `goods_detail` | Item Detail Description             | Detail Item-1                                 |
| `goods_amt`    | Item Price                          | 1000                                          |

### Sample JSON Cart Data

:::CodeblockTabs
cartData Credit Card Registration

```json
{
    "count": "2",  
    "item": [  
        {
            "img_url": "http://www.merchant.com/image_goods1.jpg",
            "goods_id": "NICEPRDID1",
            "goods_name": "Item 1 Name",
            "goods_detail": "Item 1 Detail",
            "goods_amt": "1000"
        },  
        {
            "img_url": "http://www.merchant.com/image_goods2.jpg",
            "goods_id": "NICEPRDID1",
            "goods_name": "Item 2 Name",
            "goods_detail": "Item 2 Detail",
            "goods_amt": "1000"
        }  
        ] 
} 
```
:::



## Response Parameter for Full Payment & Installment - Registration API Credit Card

***

Following is the response parameter as result from request parameter on Credit Card Registration API.

| **Parameter**  | **Type** | **Size** | **Description**                                            | **Example / Notes**              |
| -------------- | -------- | -------- | ---------------------------------------------------------- | -------------------------------- |
| `resultCd`     | N        | 4        | [Result Code](docId:9eC3yH9CQqpb6cRWauWWO)                 | 0000                             |
| `resultMsg`   | AN       | 255      | Result Message: [Error Code](docId\:FsX1GESJKxOp0T9rvUHp_) | SUCCESS                          |
| `tXid`         | AN       | 30       | Transaction ID&#xD;                                        | IONPAYTEST01202212151029182023   |
| `referenceNo`  | ANS      | 40       | Merchant Reference Number&#xD;                             | ordNo20221215101254              |
| `payMethod`    | N        | 2        | [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W)        | 01                               |
| `amt`          | N        | 12       | Payment Amount                                             | 10000                            |
| `transDt`      | N        | 8        | Transaction Date (`YYYYMMDD`)&#xD;                         | 20221212                         |
| `transTm`      | N        | 6        | Transaction Time (`HH24MISS`)&#xD;                         | 121212                           |
| `description`  | AN       | 100      | Transaction Description&#xD;                               | Testing Transaction Credit Card  |
| `bankCd`       | A        | 4        | [Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                  | null                             |
| `vacctNo`      | N        | 20       | Virtual Account                                            | null                             |
| `mitraCd`      | A        | 4        | [Mitra Code](docId:0luP35KfOWksiSrzKx6yZ)                  | null                             |
| `payNo`        | N        | 12       | CVS Payment Number                                         | null                             |
| `currency`    | A        | 3        | Currency                                                   | IDR                              |
| `goodsNm`      | AN       | 100      | Goods Name&#xD;                                            | Goods For Testing Transaction    |
| `billingNm`    | A        | 100&#xD; | Buyer Name                                                 | John Doe                         |
| `vacctValidDt` | N        | 8        | VA Expiry Date (`YYYYMMDD`)                                | null                             |
| `vacctValidTm` | N        | 6        | VA Expiry Time (`HH24MISS`)                                | null                             |
| `payValidDt`  | N        | 8        | Expiry Date (`YYYYMMDD`)&#xD;                              | null                             |
| `payValidTm`   | N        | 6        | Expiry Time (`HH24MISS`)&#xD;                              | null                             |
| `requestURL`   | ANS      | 360      | Request URL&#xD;                                           | null                             |
| `paymentExpDt` | N        | 6        | QR Payment Expiry Date (`YYYYMMDD`)&#xD;                   | null                             |
| `paymentExpTm` | N        | 6        | QR Payment Expiry Time (`HH24MISS`)&#xD;                   | null                             |
| `qrContent`    | ANS      | 360      | QR String in Plain Text&#xD;                               | null                             |
| `qrUrl`        | ANS      | 360      | URL for QR Image, Valid for 5 minutes&#xD;                 | null                             |

:::hint{type="info"}
Please check [NICEPAY Code](docId:5Dlvnma6exk5gdNr8asG0) to know the common code also response code on Credit Card payment method or other NICEPAY payment methods .&#x20;
:::



## Sample Parameter for Full Payment & Installment - Registration API Credit Card

***

### Request Parameter

:::CodeblockTabs
cURL

```curl
curl --location 'https://dev.nicepay.co.id/nicepay/direct/v2/registration' \
--header 'Content-Type: application/json' \
--data-raw '{
    "timeStamp": "20221202141217",
    "iMid": "IONPAYTEST",
    "payMethod": "01",
    "currency": "IDR",
    "amt": "5000",
    "merchantToken": "c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae",
    "referenceNo": "ordNo20221202141217",
    "description": "Testing Registration Credit Card",
    "goodsNm" : "Testing Transaction",
    "billingNm" : "John Doe",
    "billingPhone" : "081288998899",
    "billingEmail" : "john.doe@example.com",
    "billingAddr" : "Jln. Raya Kasablanka Kav.88",
    "billingCity" : "South Jakarta",
    "billingState" : "DKI Jakarta",
    "billingCountry" : "Indonesia",
    "billingPostCd" : "12800",
    "dbProcessUrl": "http://ptsv2.com/t/merchant/post",
    "cartData" : "{\"count\":\"1\",\"item\":[{\"goods_id\":\"NICEPRDID1\",\"img_url\":\"http://www.merchant.com/image_goods1.jpg\",\"goods_name\":\"Testing Transaction\",\"goods_detail\":\"Testing Transaction Details\",\"goods_amt\":\"5000\"}]}",
    "userIP":"127.0.0.1",
    "instmntType":"1",
	"instmntMon":"1",
    "recurrOpt":"",
    "userLanguage": "en",
    "userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"
}'
```

Node.js

```nodejs
const nicepayClient = require("nodejs-nicepay");

let secondVersion = new nicepayClient.SecondApiVersion({
  isProduction: false,
  isCloudServer: false,
  merchantKey: "YOUR_MERCHANT_KEY",
});

const parameter = {
  payMethod: "01",
  currency: "IDR",
  amt: "5000",
  referenceNo: "ordNo20221202141217",
  goodsNm: "Testing Transaction",
  billingNm: "John Doe",
  billingPhone: "081288998899",
  billingEmail: "john.doe@example.com",
  billingAddr: "Jln. Raya Kasablanka Kav.88",
  billingCity: "South Jakarta",
  billingState: "DKI Jakarta",
  billingPostCd: "12800",
  billingCountry: "Indonesia",
  description: "Testing Registration Credit Card",
  dbProcessUrl: "http://ptsv2.com/t/merchant/post",
  userIP: "127.0.0.1",
  cartData: "{\"count\":\"1\",\"item\":[{\"goods_id\":\"NICEPRDID1\",\"img_url\":\"http://www.merchant.com/image_goods1.jpg\",\"goods_name\":\"Testing Transaction\",\"goods_detail\":\"Testing Transaction Details\",\"goods_amt\":\"5000\"}]}",
  sellers: "",
  bankCd: "",
  userAgent:
    "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0",
  mitraCd: "",
  instmntMon: "1",
  instmntType: "1",
  shopId: "",
};

let endPoint = "/direct/v2/registration";
secondVersion.requestAPI(parameter, endPoint);

```

```java
String reffNo = "ordNo20221202141217";

        
Card requestData = Card.builder()
        .timeStamp("20221202141217")
        .iMid("IONPAYTEST")
        .payMethod("01")
        .currency("IDR")
        .amt("5000")
        .referenceNo(reffNo)
        .goodsNm("Testing Transaction")
        .billingNm("John Doe")
        .billingPhone("081288998899")
        .billingEmail("john.doe@example.com")
        .billingAddr("Jln. Raya Kasablanka Kav.88")
        .billingCity("South Jakarta")
        .billingState("DKI Jakarta")
        .billingPostCd("12800")
        .billingCountry("Indonesia")
        .dbProcessUrl("http://ptsv2.com/t/merchant/post")
        .userIP("127.0.0.1")
        .userAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0")
        .userLanguage("en")
        .instmntType("1")
        .instmntMon("1")
        .recurrOpt("")
        .cartData("{\"count\":\"1\",\"item\":[{\"goods_id\":\"NICEPRDID1\",\"img_url\":\"http://www.merchant.com/image_goods1.jpg\",\"goods_name\":\"Testing Transaction\",\"goods_detail\":\"Testing Transaction Details\",\"goods_amt\":\"5000\"}]}")
        .merchantToken("20221202141217", "IONPAYTEST", reffNo, "5000", merchantKey)
        .build();

NICEPayResponseV2 cardRegistResponse = V2CardService.callV2CardRegistration(requestData, config);

```

```python
$useProd = false;
$useCloud = false;
$registration_endpoint = "/nicepay/direct/v2/registration";

$url = HttpUtil::getNicepayDomain($useProd, $useCloud) . $registration_endpoint;

$timestamp = "20221202141217";
$reference_no = "ordNo20221202141217";
$amt = "5000";
$merchant_token = "c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae";

$body = [
    "timeStamp" => $timestamp,
    "iMid" => "IONPAYTEST",
    "payMethod" => "01",
    "currency" => "IDR",
    "amt" => $amt,
    "merchantToken" => $merchant_token,
    "referenceNo" => $reference_no,
    "description" => "Testing Registration Credit Card",
    "goodsNm" => "Testing Transaction",
    "billingNm" => "John Doe",
    "billingPhone" => "081288998899",
    "billingEmail" => "john.doe@example.com",
    "billingAddr" => "Jln. Raya Kasablanka Kav.88",
    "billingCity" => "South Jakarta",
    "billingState" => "DKI Jakarta",
    "billingCountry" => "Indonesia",
    "billingPostCd" => "12800",
    "dbProcessUrl" => "http://ptsv2.com/t/merchant/post",
    "cartData" => "{\"count\":\"1\",\"item\":[{\"goods_id\":\"NICEPRDID1\",\"img_url\":\"http://www.merchant.com/image_goods1.jpg\",\"goods_name\":\"Testing Transaction\",\"goods_detail\":\"Testing Transaction Details\",\"goods_amt\":\"5000\"}]}",
    "userIP" => "127.0.0.1",
    "instmntType" => "1",
    "instmntMon" => "1",
    "recurrOpt" => "",
    "userLanguage" => "en",
    "userAgent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"
];

$response = HttpUtil::postJsonRequest($url, $body);

```

C#

```csharp
string merchantKey = config.MerKey;
string clientId = config.ClientId;
string timestamp = DateTimeOffset.Now.ToString("yyyyMMddHHmmss");
string refNo = $"ordNo{timestamp}";
string amount = "5000";
bool isProduction = false;
bool isCloudServer = false;

var cartItem = new Dictionary<string, object>
{
    { "goods_id", "NICEPRDID1"},
    { "img_url", "http://www.merchant.com/image_goods1.jpg" },
    { "goods_name", "Testing Transaction" },
    { "goods_detail", "Testing Transaction Details" },
    { "goods_amt", "5000" }
};

var cartDataBuilder = new BuilderCartData()
    .SetCount("1")
    .SetItem(cartItem);

var cartData = cartDataBuilder.Build();

// Generate merchant token
var merchantTokenBuilder = new MerchantTokenBuilder()
    .SetTimeStamp(timestamp)
    .SetIMid(clientId)
    .SetRefNo(refNo)
    .SetAmount(amount)
    .SetMerchantKey(merchantKey);

string merchantToken = merchantTokenBuilder.BuildMerchantToken();

// Build Credit Card Request Body
var bodyBuilder = new NicepayRequestBuilder()
    .SetCommonFields(
        iMid: clientId,
        timeStamp: timestamp,
        payMethod: "01",        // Credit Card
        currency: "IDR",
        amt: amount,
        referenceNo: refNo,
        goodsNm: "Testing Transaction",
        merchantToken: merchantToken
    )
    .setCreditCard(
        instmntType: "1",
        instmntMon: "1",
        recurrOpt: ""
    )
    .SetBillingInfo(
        billingNm: "John Doe",
        billingPhone: "081288998899",
        billingEmail: "john.doe@example.com",
        billingAddr: "Jln. Raya Kasablanka Kav.88",
        billingCity: "South Jakarta",
        billingState: "DKI Jakarta",
        billingPostCd: "12800",
        billingCountry: "Indonesia"
    )
    .SetDbProcessUrl("http://ptsv2.com/t/merchant/post")
    .SetCartData(cartData)
    .SetUserIP("127.0.0.1")
    .SetUserLanguage("en")
    .SetUserAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0");

ApiEndpoints apiEndpoints = new ApiEndpoints();

// Build payload and send
Dictionary<string, object> payload = bodyBuilder.Build();
string jsonPayload = Newtonsoft.Json.JsonConvert.SerializeObject(payload, Newtonsoft.Json.Formatting.Indented);

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

```

Vanilla JS

```javascript
const registrationData = {
  timeStamp: "20221202141217",
  payMethod: "01",
  currency: "IDR",
  amt: "5000",
  referenceNo: "ordNo20221202141217",
  goodsNm: "Testing Transaction",
  billingNm: "John Doe",
  billingPhone: "081288998899",
  billingEmail: "john.doe@example.com",
  billingAddr: "Jln. Raya Kasablanka Kav.88",
  billingCity: "South Jakarta",
  billingState: "DKI Jakarta",
  billingPostCd: "12800",
  billingCountry: "Indonesia",
  description: "Testing Registration Credit Card",
  deliveryNm: "",
  deliveryPhone: "",
  deliveryAddr: "",
  deliveryCity: "",
  deliveryState: "",
  deliveryPostCd: "",
  deliveryCountry: "",
  dbProcessUrl: "http://ptsv2.com/t/merchant/post",
  merchantToken:
    "c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae",
  userIP: "127.0.0.1",
  cartData: "{\"count\":\"1\",\"item\":[{\"goods_id\":\"NICEPRDID1\",\"img_url\":\"http://www.merchant.com/image_goods1.jpg\",\"goods_name\":\"Testing Transaction\",\"goods_detail\":\"Testing Transaction Details\",\"goods_amt\":\"5000\"}]}",
  userAgent:
    "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0",
  instmntMon: "1",
  instmntType: "1",
};


const response = await Nicepay.registerTransaction(registrationData);

```

Laravel

```php
$useProd = false;
$useCloud = false;
$registration_endpoint = "/nicepay/direct/v2/registration";

$url = HttpUtil::getNicepayDomain($useProd, $useCloud) . $registration_endpoint;

$timestamp = "20221202141217";
$reference_no = "ordNo20221202141217";
$amt = "5000";
$merchant_token = "c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae";

$body = [
    "timeStamp" => $timestamp,
    "iMid" => "IONPAYTEST",
    "payMethod" => "01",
    "currency" => "IDR",
    "amt" => $amt,
    "merchantToken" => $merchant_token,
    "referenceNo" => $reference_no,
    "description" => "Testing Registration Credit Card",
    "goodsNm" => "Testing Transaction",
    "billingNm" => "John Doe",
    "billingPhone" => "081288998899",
    "billingEmail" => "john.doe@example.com",
    "billingAddr" => "Jln. Raya Kasablanka Kav.88",
    "billingCity" => "South Jakarta",
    "billingState" => "DKI Jakarta",
    "billingCountry" => "Indonesia",
    "billingPostCd" => "12800",
    "dbProcessUrl" => "http://ptsv2.com/t/merchant/post",
    "cartData" => "{\"count\":\"1\",\"item\":[{\"goods_id\":\"NICEPRDID1\",\"img_url\":\"http://www.merchant.com/image_goods1.jpg\",\"goods_name\":\"Testing Transaction\",\"goods_detail\":\"Testing Transaction Details\",\"goods_amt\":\"5000\"}]}",
    "userIP" => "127.0.0.1",
    "instmntType" => "1",
    "instmntMon" => "1",
    "recurrOpt" => "",
    "userLanguage" => "en",
    "userAgent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"
];

$response = HttpUtil::postJsonRequest($url, $body);

```

PHP Native

```php
$config = NICEPay::builder()
            ->setIsProduction(false)
            ->build();

$timestamp = "20221202141217";       
$reffNo = "ordNo20221202141217";       
$amount = "5000";

$parameter = Card::builder()
            ->timeStamp($timestamp)
            ->iMid("IONPAYTEST")
            ->payMethod("01")
            ->currency("IDR")
            ->amt($amount)
            ->referenceNo($reffNo)
            ->merchantToken($timestamp, "IONPAYTEST", $reffNo, $amount, $this->merchantKey)
            ->description("Testing Registration Credit Card")
            ->goodsNm("Testing Transaction")
            ->billingNm("John Doe")
            ->billingPhone("081288998899")
            ->billingEmail("john.doe@example.com")
            ->billingAddr("Jln. Raya Kasablanka Kav.88")
            ->billingCity("South Jakarta")
            ->billingState("DKI Jakarta")
            ->billingCountry("Indonesia")
            ->billingPostCd("12800")
            ->dbProcessUrl("http://ptsv2.com/t/merchant/post")
            ->cartData("{\"count\":\"1\",\"item\":[{\"goods_id\":\"NICEPRDID1\",\"img_url\":\"http://www.merchant.com/image_goods1.jpg\",\"goods_name\":\"Testing Transaction\",\"goods_detail\":\"Testing Transaction Details\",\"goods_amt\":\"5000\"}]}")
            ->userIP("127.0.0.1")
            ->instmntType("1")
            ->instmntMon("1")
            ->recurrOpt("")
            ->userLanguage("en")
            ->userAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0")
            ->build();        

$cardService = new V2CardService($config);

```

```kotlin
var config: NICEPay? = NICEPay.Builder()
            .isProduction(false)
            .clientSecret(TestingConstants.CLIENT_SECRET)
            .partnerId(TestingConstants.PARTNER_ID)
            .externalID(TestingConstants.EXTERNAL_ID)
            .timestamp(TestingConstants.TIMESTAMP)
            .privateKey(TestingConstants.PRIVATE_KEY)
            .build()
            
val request: DirectV2Card = DirectV2Card.Builder()
    .timeStamp("20221202141217")
    .iMid("IONPAYTEST")
    .payMethod("01")
    .currency("IDR")
    .amt("5000")
    .merchantToken("c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae")
    .referenceNo("ordNo20221202141217")
    .description("Testing Registration Credit Card")
    .goodsNm("Testing Transaction")
    .billingNm("John Doe")
    .billingPhone("081288998899")
    .billingEmail("john.doe@example.com")
    .billingAddr("Jln. Raya Kasablanka Kav.88")
    .billingCity("South Jakarta")
    .billingState("DKI Jakarta")
    .billingCountry("Indonesia")
    .billingPostCd("12800")
    .dbProcessUrl("http://ptsv2.com/t/merchant/post")
    .userIP("127.0.0.1")
    .instmntType("1")
    .instmntMon("1")
    .recurrOpt("")
    .cartData("{\"count\":\"1\",\"item\":[{\"goods_id\":\"NICEPRDID1\",\"img_url\":\"http://www.merchant.com/image_goods1.jpg\",\"goods_name\":\"Testing Transaction\",\"goods_detail\":\"Testing Transaction Details\",\"goods_amt\":\"5000\"}]}")
    .userLanguage("en")
    .userAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0")
    .build()
val response : NICEPayResponseV2 = v2CardService.registration(request, config)!!
```

CodeIgniter

```php
$timestamp = "20221213101276";
$configBuilder = NICEPay::builder();
$config = $configBuilder
    ->setIsProduction(false)
    ->setIsCloudServer(true)
    ->build();

$reffNo = "ordNo20221213101276";
$amount = "5000";

$CardBuilder = Card::builder();
$parameter = $CardBuilder
    ->setTimeStamp($timestamp)
    ->setIMid("RECURRTEST")
    ->setPayMethod("01")
    ->setCurrency("IDR")
    ->setAmt($amount)
    ->setReferenceNo($reffNo)
    ->setMerchantToken($timestamp, "RECURRTEST", $reffNo, $amount, $this->merchantKey) // ✅ unchanged logic
    ->setGoodsNm("Goods For Testing")
    ->setBillingNm("John Doe")
    ->setBillingPhone("081288998899")
    ->setBillingEmail("john.doe@example.com")
    ->setBillingAddr("Jln. Raya Kasablanka Kav.88")
    ->setBillingCity("South Jakarta")
    ->setBillingState("DKI Jakarta")
    ->setBillingCountry("Indonesia")
    ->setBillingPostCd("12800")
    ->setCartData("{\"count\":\"1\",\"item\":[{\"goods_id\":\"NICEPRDID1\",\"img_url\":\"http://www.merchant.com/image_goods1.jpg\",\"goods_name\":\"Testing Transaction\",\"goods_detail\":\"Testing Transaction Details\",\"goods_amt\":\"5000\"}]}")
    ->setDbProcessUrl("http://ptsv2.com/t/merchant/post")
    ->setUserIP("127.0.0.1")
    ->setInstmntType("1")
    ->setInstmntMon("1")
    ->setRecurrOpt("")
    ->setUserLanguage("en")
    ->setUserAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0")
    ->build();

$cardService = new V2CardService($config);
$response = $cardService->registration($parameter);

```
:::

### Response Parameter

:::CodeblockTabs
Sample Response

```json
{
    "resultCd": "0000",
    "resultMsg": "SUCCESS",
    "tXid": "IONPAYTEST01202510080949037182",
    "referenceNo": "ordNo20221202141217",
    "payMethod": "01",
    "amt": "5000",
    "transDt": "20251008",
    "transTm": "094903",
    "description": "Testing Registration Credit Card",
    "bankCd": null,
    "vacctNo": null,
    "mitraCd": null,
    "payNo": null,
    "currency": null,
    "goodsNm": null,
    "billingNm": null,
    "vacctValidDt": null,
    "vacctValidTm": null,
    "payValidDt": null,
    "payValidTm": null,
    "requestURL": null,
    "paymentExpDt": null,
    "paymentExpTm": null,
    "qrContent": null,
    "qrUrl": null
}
```
:::

After You done integrate this API, please continue to the [Payment - API Credit Card](docId\:LWfbOCq9GugDtOYY26W5g) process.
