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

# About Full Payment & Installment - Payment API Credit Card

***

This API uses after finishing the API [Full Payment & Installment - Registration API Credit Card](docId\:Y_bNzIdFqmkXbQJkxG2A0). API used in this stage is similar to the API for the Recurring Token and Pre-Auth & Capture payment type. However, there are several differences in the sent request parameter.



# Full Payment & Installment - Payment API Credit Card

***





| **API Endpoint**   | `/nicepay/direct/v2/payment`                                 |
| ------------------ | ------------------------------------------------------------ |
| **Request Method** | <font color="#3b9f0f">**POST**</font>****                    |
| **Description**    | Full Payment & Installment - Payment API Credit Card&#xD;    |
| **Merchant Token** | SHA256(`timeStamp`+`iMid`+`referenceNo`+`amt`+`merchantKey`) |
| **Request Format** | `application/x-www-form-urlencoded`                          |

:::hint{type="warning"}
On the Credit Card payment, if 3Ds authentication is needed, your Customer will direct to the 3Ds card Issuer Bank page to input the OTP (One Time Password) code to finish the transaction process.
:::



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

***

The following is the list of request parameters to process the payment transaction on the Credit Card Full Payment & Installment payment method. Request Parameter proceeds through Form-Url with the following detailed parameter.

| **Parameter**                                                                                   | **Type** | **Size** | **Description**                        | **Example / Notes**                                              |
| ----------------------------------------------------------------------------------------------- | -------- | -------- | -------------------------------------- | ---------------------------------------------------------------- |
| `timeStamp`<br /><font color="#2166ae">Required</font>                                          | N        | 14       | Request Timestamp (`YYYYMMDDHH24MISS`) | 20221202141217                                                   |
| `tXid`<br /><font color="#2166ae">Required</font>                                               | AN       | 30       | Transaction ID	                        | IONPAYTEST01202212021455054652                                   |
| `referenceNo`                                                                                   | N        | 40       | Reference Number for Payment           | ordNo20221202141217                                              |
| `cardNo`<br /><font color="#2166ae">Required for CC </font>                                   | N        | 20       | Credit Card Number                     | 4434260000000008&#xD;                                            |
| `cardExpYymm`<br /><font color="#2166ae">Required for CC </font><font color="#2166ae"></font> | A        | 4        | Card Expiry (`YYMM`)	                  | 3901                                                             |
| `cardCvv`<br /><font color="#2166ae">Required for CC</font>                                    | N        | 4        | Card CVV                               | 101                                                              |
| `cardHolderNm`<br /><font color="#2166ae">Required </font>                                    | AN       | 45       | Card Holder Name                       | John Doe<br /><br />**Only alphabet allowed**<br />&#xD;         |
| `cardHolderEmail`<br /><font color="#2166ae">Required</font>                                    | ANS      | 100      | Card Holder Email                      | johndoe\@gmail.com                                               |
| `merchantToken`<br /><font color="#2166ae">Required</font>                                    | AN       | 255      | Merchant Token                         | c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae |
| `callBackUrl`<br /><font color="#2166ae">Required</font>                                      | ANS      | 255      | Payment Result URL                     | https\://merchant.com/callBackUrl&#xD;                           |

Parameter needed in the transaction process is the Your Customer Credit/Debit card data such as  `cardNo`*,&#x20;*`cardExpYymm`*,&#x20;*`cardCvv`*,&#x20;*`cardHolderNm` & `cardHolderEmail`.

So, to do the transaction process, we suggest You get the card data from Your Customer beforehand before doing the Payment API process.

:::hint{type="warning"}
Include `cardCVV` on every transaction depending on the MID type of *CVV* or *Non-CVV*.
:::



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

***

After you request, you will get a response from URL Callback with the following detailed response parameter.

| **Parameter** | **Type** | **Size** | **Description**                                                                                                                                      | **Example / Notes**         |
| ------------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
| `resultCd`    | N        | 14       | [Result Code](docId:9eC3yH9CQqpb6cRWauWWO)                                                                                                           |                             |
| `resultMsg`   | AN       | 255      | Result message: [Error Code](docId\:FsX1GESJKxOp0T9rvUHp_)                                                                                           |                             |
| `tXid`        | AN       | 30&#xD;  | Transaction ID	                                                                                                                                      | When success&#xD;           |
| `referenceNo` | ANS      | 40       | Merchant Order Number                                                                                                                                | When success&#xD;           |
| `payMethod`   | N        | 2        | [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W)                                                                                                  | When success&#xD;           |
| `amt`        | N        | 12       | Payment Amount	                                                                                                                                      | When success&#xD;           |
| `currency`    | AN       | 3        | Currency                                                                                                                                             | When success&#xD;           |
| `goodsNm`     | A        | 100      | Goods Name	                                                                                                                                          | When success&#xD;           |
| `billingNm`   | A        | 100      | Buyer Name	                                                                                                                                          | When success&#xD;           |
| `transDt`     | N        | 8        | Transaction Date (`YYYYMMDD`)                                                                                                                        | When success&#xD;           |
| `transTm`     | N        | 6        | Transaction Time (`HH24MISS`)	                                                                                                                       | When success&#xD;           |
| `description` | AN       | 100      | Transaction Description	                                                                                                                             | When success&#xD;           |
| `authNo`      | N        | 10       | Approval Number	                                                                                                                                     | When success, CC&#xD;       |
| `issuBankCd`  | A        | 4        | [Issuing Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                                                                                                    | When success, CC&#xD;       |
| `acquBankCd`  | A        | 4        | [Acquiring Bank Code](docId\:HlxvgrXVxWD90n8ohNKm0)                                                                                                  | When success, CC&#xD;       |
| `cardNo`      | ANS      | 20       | Masked Card No	                                                                                                                                      | When success, CC&#xD;       |
| `cardExpYymm` | N        | 4        | Card Expiry (`YYMM`)	                                                                                                                                | When success, CC&#xD;       |
| `instmntMon`  | N        | 2        | Installment Month	                                                                                                                                   | When success, CC&#xD;       |
| `instmntType` | N        | 2        | [Installment Type Code](docId:_Wzur5wjwhrDR8YXI-Ppi)                                                                                                 | When success, CC&#xD;       |
| `ccTransType` | N        | 2        | [Credit Card Transaction Type](docId:7PAs_VD5YLG4VDurMygWo)<br />`1`: Normal&#xD;<br />`2`: Recurring&#xD;<br />`3`: Pre-Auth&#xD;<br />`4`: Capture | When Success, CC&#xD;<br /> |



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

***

### Request Parameter

:::CodeblockTabs
cURL

```curl
curl --location 'https://www.nicepay.co.id/nicepay/direct/v2/payment' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'timeStamp=20250922143200' \
  --data-urlencode 'tXid=IONPAYTEST8108202509221432005539' \
  --data-urlencode 'referenceNo=reffNo20250922143200' \
  --data-urlencode 'merchantToken=020c4c90a89a388206d057cffe7c83df2ec1ead78ec17656544e4a58430ab7ea' \
  --data-urlencode 'cardNo=5123450000000008' \
  --data-urlencode 'cardExpYymm=3601' \
  --data-urlencode 'cardCvv=100' \
  --data-urlencode 'cardHolderNm=TEST' \
  --data-urlencode 'callBackUrl=https://www.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp'

```

Node.js

```nodejs
let secondVersion = new SecondApiVersion(config);

let parameterPayment = {
  amt: "1000",
  referenceNo: "reffNo20250922143200",
  tXid: "IONPAYTEST8108202509221432005539",
  cardNo: "5123450000000008",
  callBackUrl: "https://www.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp",
  cardExpYymm: "2901",
  cardCvv: "100",
  recurringToken: "",
  cardHolderNm: "Nicepay Test",
  preauthToken: "",
  cardHolderEmail: "test@email.com",
};

let response = secondVersion.requestPayment(parameterPayment);
```

```java
NICEPay config = NICEPay.builder()
        .isProduction(false) // Set to true for production
        .build();

Card requestData = Card.builder()
        .timeStamp("20250922143200")                           // Current timestamp (yyyyMMddHHmmss)
        .tXid("IONPAYTEST8108202509221432005539")              // Transaction ID from registration
        .iMid("IONPAYTEST")                                   // Your NICEPay iMid
        .referenceNo("reffNo20250922143200")                  // Unique order reference
        .amt("1000")                                          // Payment amount
        .merchantToken(timeStamp, iMid, reffNo, amount, MERCHANT_KEY) // Secure token generation
        .cardNo("5123450000000008")                           // Test card number
        .cardExpYymm("2908")                                  // Card expiry date (YYMM)
        .cardCvv("100")                                       // 3-digit CVV
        .cardHolderNm("NICEPAY TEST")                         // Cardholder name
        .callBackUrl("https://www.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp") // Callback URL
        .recurringToken("")                                   // Leave empty if not recurring
        .preauthToken("")                                     // Leave empty if not pre-auth
        .build();

String responseHtml = V2CardService.callV2CardPaymentRequest(requestData, config);

```

```python
bodyPayment = (
    builderPayment.BuildPayment()
    .setTimestamp(datetime.now().strftime("%Y%m%d%H%M%S"))  # Current timestamp (yyyyMMddHHmmss)
    .setTxid("IONPAYTEST8108202509221432005539")            # Transaction ID from registration
    .setReferenceNo("reffNo20250922143200")                 # Unique order reference
    .setCashtag("")                                         # Leave empty if not using cashtag
    .setCardNo("5123450000000008")                          # Test card number
    .setCardExpYymm("3901")                                 # Card expiry date (YYMM)
    .setCardCvv("100")                                      # 3-digit CVV
    .setRecurringToken("")                                  # Leave empty if not recurring
    .setPreAuthToken("")                                    # Leave empty if not pre-auth
    .setAmt("1000")                                         # Payment amount
    .build()
)

environment = (
    builderEnvironment.BuildEnvironment()
    .isCloud(False)   # Set to True if using NICEPay Cloud
    .isProduction(False)  # Set to True for production
    .build()
)

response = ServiceNicepay.servicePayment(
    DataGenerator.getPaymentBody(bodyPayment.dataPayment()),
    environment
)

```

Vanilla JS

```javascript
const paymentData = {
  cardNo: "5123450000000008",              // Test card number
  cardExpYymm: "2901",                     // Card expiry in YYMM format
  cardCvv: "100",                          // 3-digit CVV
  cardHolderEmail: "customer@example.com", // Cardholder email
  cardHolderNm: "John Doe",                // Cardholder name
  callBackUrl: "https://your-domain.com/callback", // Callback URL after payment
  tXid: "IONPAYTEST8108202509221432005539", // Transaction ID from registration
  merchantToken: "020c4c90a89a388206d057cffe7c83df2ec1ead78ec17656544e4a58430ab7ea", // Secure token
  recurringToken: "",                      // Leave empty if not recurring
};

const response = await Nicepay.paymentTransaction(paymentData);

```

Laravel

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

// Request body parameters
$txid = "IONPAYTEST8108202509221432005539";
$timestamp = Carbon::now()->format("YmdHis"); // Current timestamp (yyyyMMddHHmmss)
$reference_no = "reffNO20250922143200";
$amt = "1000";

// Generate secure merchant token
$merchant_token = $this->generateMerchantToken(
    $timestamp,
    $this->imid,
    $reference_no,
    $amt,
    $this->mer_key
);

$param = [
    "timeStamp"       => $timestamp, // Current timestamp
    "tXid"            => $txid,      // Transaction ID from registration
    "merchantToken"   => $merchant_token, // Secure hash token
    "cardNo"          => "5123450000000008", // Test card number
    "cardExpYymm"     => "3901",     // Card expiry date (YYMM)
    "cardCvv"         => "100",      // 3-digit CVV
    "callBackUrl"     => "https://www.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp", // Callback URL
    "returnJsonFormat"=> "1",        // Force JSON response format
];

$response = HttpUtil::redirectWithQueryParams($url, $param);

```

PHP Native

```php
$config = NICEPay::builder()
    ->setIsProduction(true) // Set to false for sandbox/testing
    ->build();

$parameter = Card::builder()
    ->timeStamp($timestamp) // Current timestamp (yyyyMMddHHmmss)
    ->iMid("IONPAYTEST") // Your NICEPay iMid
    ->tXid("IONPAYTEST8108202509221432005539") // Transaction ID from registration
    ->referenceNo("reffNo20250922143200") // Unique order reference
    ->merchantToken(
        $timestamp,
        $iMid,
        $newCCTrx->getReferenceNo(),
        $newCCTrx->getAmt(),
        $this->merchantKey
    ) // Generate secure token
    ->cardNo(TestConst::$CARD_NO) // Test card number from constants
    ->cardExpYymm(TestConst::$CARD_EXP_YYMM) // Card expiry date (YYMM)
    ->cardCvv(TestConst::$CARD_CVV) // 3-digit CVV
    ->cardHolderNm("Nicepay test") // Cardholder name
    ->callBackUrl("https://dev.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp?") // Callback URL after payment
    ->build();

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

```

```kotlin
var config: NICEPay? = NICEPay.Builder()
    .isProduction(true) // Set to false for sandbox/testing
    .build()

val request: DirectV2RequestPaymentCard = DirectV2RequestPaymentCard.Builder()
    .timeStamp("20250922143200") // Current timestamp (yyyyMMddHHmmss)
    .tXid("IONPAYTEST8108202509221432005539") // Transaction ID from registration
    .iMid("IONPAYTEST") // Your NICEPay iMid
    .merchantKey(MERCHANT_KEY) // Secret merchant key
    .referenceNo("reffNO20250922143200") // Unique order reference number
    .amt("1000") // Payment amount
    .callBakUrl("https://www.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp") // Callback URL after payment
    .cardNo("5123450000000008") // Test card number
    .cardCvv("123") // 3-digit CVV (sample)
    .cardExpYymm("2512") // Card expiry date (YYMM)
    .build()

val response = paymentService.registration(request, config)!!
```
:::

### Response Parameter

:::CodeblockTabs
Sample Response

```html
<head>
	<style>
		body {min-width: 100%; height: auto; min-height: 500px; overflow: none; border: none; background: url("/nicepay/images/rotate.gif") no-repeat center;
	</style>
	</head>
	<body onload='javascript:getBrowserInfo();'>
		<div style='visibility:hidden'>
			<div id="initiate3dsSimpleRedirect" xmlns="http://www.w3.org/1999/html"> <iframe id="methodFrame" name="methodFrame" height="100" width="200" > </iframe> <form id ="initiate3dsSimpleRedirectForm" method="POST" action="https://mtf.gateway.mastercard.com/acs/mastercard/v2/method" target="methodFrame"> <input type="hidden" name="threeDSMethodData" value="eyJ0aHJlZURTTWV0aG9kTm90aWZpY2F0aW9uVVJMIjoiaHR0cHM6Ly9tdGYuZ2F0ZXdheS5tYXN0ZXJjYXJkLmNvbS9jYWxsYmFja0ludGVyZmFjZS9nYXRld2F5LzNjMTlhMzU0NjgwMWU2ZDMwMTYwZWJiMDllMjAxYzg2NTU0MzZkMzRjYjgwOWFjNTIyMmMxMzIwZDFhMjI3ZDUiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ImM2YTI5MTllLTdlNWMtNDcyMi1hYmJlLTY5YmVlZDAyM2IzZiJ9" /> </form> <script id="initiate-authentication-script"> var e=document.getElementById("initiate3dsSimpleRedirectForm"); if (e) { e.submit(); if (e.parentNode !== null) { e.parentNode.removeChild(e); } } </script> </div> 
		</div>
		<form name="mpgsAuthFrm" id="mpgsAuthFrm" method="post" action='https://dev.nicepay.co.id/nicepay/api/mpgsAuth.do'>
			<input type='hidden' name='tXid' value='IONPAYTEST8108202509221432005539'>
			<input type='hidden' name='cardNo' value='5123450000000008'>
			<input type='hidden' name='cardExpYymm' value='2901'>
			<input type='hidden' name='cardCvv' value='100'>
			<input type='hidden' name='callbackUrl' value='https://dev.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp'>
			<input type='hidden' name='registered' value='true'>
			<input type='hidden' name='directV1' value='false'>
			<input type='hidden' name='authResult' value='false'>
			<input type='hidden' name='browser' value=''>
			<input type='hidden' name='browserJavaEnabled' value='false'>
			<input type='hidden' name='browserJavascriptEnabled' value='2'>
			<input type='hidden' name='browserLanguage' value=''>
			<input type='hidden' name='browserScreenColorDepth' value=''>
			<input type='hidden' name='browserScreenHeight' value='0'>
			<input type='hidden' name='browserScreenWidth' value='0'>
			<input type='hidden' name='browserTimeZone' value='0'>
		</form>
	<script>
		function getBrowserInfo() {
			document.mpgsAuthFrm.browser.value = navigator.userAgent;
			document.mpgsAuthFrm.browserJavaEnabled.value = window.navigator.javaEnabled() === true ? 'true' : 'false';
			document.mpgsAuthFrm.browserJavascriptEnabled.value = "1"; 
			document.mpgsAuthFrm.browserLanguage.value = navigator.language; 
			document.mpgsAuthFrm.browserScreenColorDepth.value = screen.colorDepth; 
			document.mpgsAuthFrm.browserScreenHeight.value = screen.height; 
			document.mpgsAuthFrm.browserScreenWidth.value = screen.width; 
			document.mpgsAuthFrm.browserTimeZone.value = new Date().getTimezoneOffset(); 
			document.mpgsAuthFrm.submit(); 
		}
	</script>
	</body>
```
:::



## CallBack Handling for Full Payment & Installment - Payment API Credit Card

***

After the transaction occurs, You will get a notification from us based on the inputted Callback URL in the request parameter on [Payment - API Credit Card](docId\:LWfbOCq9GugDtOYY26W5g).

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

:::hint{type="warning"}
`CallBack Handling` is very important to minimize the Fraud act, we highly recommend the Merchant to do the verification using `callBack Handling`.
:::

:::CodeblockTabs
URL CallBack

```json
"callbackUrl" : "https://www.merchant.com/callbackUrl/"
```

Response CallBack

```json
{
    "resultCd":"0000",
    "resultMsg":"SUCCESS",
    "tXid":"IONPAYTEST01202212141112221428",
    "referenceNo":"",
    "payMethod":"01",
    "amt":"10000",
    "transDt":"20221212",
    "transTm":"121212",
    "description":"Testing Credit Card Transaction",
    "authNo":"080623",
    "issuBankCd":"OTHR"
    "acquBankCd":"BMRI",
    "cardNo":"453211*****1111",
    "goodsNm":"Test Transaction Nicepay"
    "billingNm":"John Doe",
    "currency":"IDR",
    "timeStamp":"20221212121212",
    "merchantToken":"2035d2295d9578fffb40137186f0203474142ae3e57992d4847826c5fcaffce6",
    "cardExpYymm":"2712",
    "instmntMon":"1",
    "instmntType":"1",
    "ccTransType":"1"
}
```
:::

