---
title: Payment - API GPN
slug: en/nicepay-api-non-snap-payment-api-gpn
description: Information about Non-SNAP Payment API - Payment - GPN API available on NICEPAY system
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/6BA4YLu34l5xKnV5E1LuI_nicepay-docs-logo.png
icon: {"faIcon":"fa-solid fa-book"}
docTags: 
createdAt: 2022-12-01T07:40:30.000Z
---

# About API GPN Payment

***

API Payment on the GPN method used by the Merchant to receive payment from all Bank-own cards with the GPN logo.



# API GPN Payment

***

Payment GPN aims to activate the GPN payment method on Merchants. This step uses to integrate the Merchant system with the NICEPAY system.

| **API Endpoint**   | `/nicepay/direct/v2/payment`                                 |
| ------------------ | ------------------------------------------------------------ |
| **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 GPN Payment

***

The following is a list of parameters for perform payment integration process for GPN payment method. This parameter used through API testing platform as one of the step so the Merchant system able to connect with NICEPAY service.&#x20;

| **Parameter**                                                                           | **Type** | **Size** | **Description**                        | **Example/Notes**                                                |
| --------------------------------------------------------------------------------------- | -------- | -------- | -------------------------------------- | ---------------------------------------------------------------- |
| `timeStamp`<br /><font color="#2166ae">Required</font>                                  | N        | 14       | Request Timestamp (`YYYYMMDDHH24MISS`) | 20201202110197                                                   |
| `tXid`<br /><font color="#2166ae">Required</font>                                       | AN       | 30       | Transaction ID	                        | IONPAYTEST01201804191202084760                                   |
| `cardNo`<br /><font color="#2166ae"></font><font color="#2166ae">Required</font>      | N        | 20       | Credit Card Number                     | 4222222222222222&#xD;                                            |
| `cardExpYymm`<br /><font color="#2166ae">Required</font><font color="#2166ae"></font> | A        | 4        | Card Expiry (`YYMM`)	                  | 2406                                                             |
| `cardCvv`<br /><font color="#2166ae">Required</font>                                   | N        | 4        | Card CVV                               | 123                                                              |
| `cardHolderNm`<br /><font color="#2166ae">Required </font>                            | A        | 50       | Card Holder Name                       | Thomas Alfa Edison&#xD;                                          |
| `merchantToken`<br /><font color="#2166ae">Required</font>                            | AN       | 255      | Merchant Token                         | f9d30f6c972e2b5718751bd087b178534673a91bbac845f8a24e60e8e4abbbc5 |
| `callBackUrl`<br /><font color="#2166ae">Required</font>                              | ANS      | 255      | Payment Result URL                     | http\://merchant.com/callbackUrl                                 |



## Sample Request for GPN Payment&#x20;

***

:::CodeblockTabs
Form-UrlEncoded

```json
timeStamp: "20201202110197"
tXid: "IONPAYTEST01201804191202084760"
merchantToken: "f9d30f6c972e2b5718751bd087b178534673a91bbac845f8a24e60e8e4abbbc5"
cardNo: "4222222222222222"
cardExpYymm: "2406"
cardCvv: "123"
cardHolderNm: "Thomas Alfa Edison"
callBackUrl: "http://merchant.com/callbackUrl"
```

Java Request

```java
nicePay.setTimeStamp("20201202110197");
nicePay.settXid("IONPAYTEST01201804191202084760");
nicePay.setMerchantToken(nicePay.getMerchantToken());
nicePay.setCardNo("4222222222222222");
nicePay.setCardExpYymm("2406");
nicePay.setCardCvv("123");
nicePay.setCardHolderNm("Thomas Alfa Edison");
nicePay.setCallBackUrl("http://merchant.com/callbackUrl");

// Payment Request
nicePay.payment();


```
:::



# CallBack Handling for GPN Payment

***

After the transaction occurs, You will receive a notification from us compatible with the Callback URL You input on the parameter request on [Payment - API GPN](docId\:l40iNETYxq4iE2GOmsDtU).

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

:::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
UrlCallback

```none
https://merchat.co.id/nicepay-callback?resultCd=0000&resultMsg=SUCCESS&tXid=IONPAYTEST01202212141112221428&referenceNo=815123412341&payMethod=09&amt=10000&transDt=20221214&transTm=111222&description=test+gpn&authNo=221428&issuBankCd=OTHR&acquBankCd=BNIN&cardNo=62210082****0590&receiptCode=&mitraCd=&recurringToken=&preauthToken=&currency=IDR&goodsNm=Test+Transaction+Nicepay&billingNm=John+Doe&ccTransType=1&mRefNo=&instmntType=1&instmntMon=1&cardExpYymm=2612&issuBankNm=&acquBankNm=BNI&timeStamp=20221214111238&merchantToken=e1e78e6636ca06834b1bd0ed7d21d4ebae7a1de07b22f5fc22d2ac2dd198b989
```

Response Body

```none
{
    "resultCd":"0000",
    "resultMsg":"SUCCESS",
    "tXid":"IONPAYTEST01202212141112221428",
    "referenceNo":"815123412341",
    "payMethod":"09",
    "amt":"10000",
    "transDt":"20221214",
    "transTm":"111222",
    "description":"test gpn",
    "authNo":"221428",
    "issuBankCd":"OTHR"
    "acquBankCd":"BNIN",
    "cardNo":"62210082****0590",
    "goodsNm":"Test Transaction Nicepay"
    "billingNm":"John Doe",
    "currency":"IDR",
    "timeStamp":"20221214111238",
    "merchantToken":"e1e78e6636ca06834b1bd0ed7d21d4ebae7a1de07b22f5fc22d2ac2dd198b989",
    "cardExpYymm":"2612",
    "instmntMon":"1",
    "instmntType":"1",
    "ccTransType":"1"
}
```
:::

