NAV Navbar
java csharp php python
  • DOKUMENTASI API V1
  • Pengantar
  • NICEPay Professional
  • Enterprise - Credit Card
  • Enterprise - Virtual Account
  • Enterprise - Convenience Store
  • Enterprise - ClickPay
  • Enterprise - E-Wallet
  • Notifikasi
  • Cek status Transaksi
  • Membatalkan Transaksi
  • Nicepay Code
  • Inquiry
  • F.A.Q
  • Test Postman
  • Changelog
  • VA Instruction Templates
  • DOKUMENTASI API V1

    Pengantar

    Selamat datang di Referensi API NICEPay.

    NICEPay Payment Solution adalah produk dari PT IONPAY NETWORKS yang menyediakan berbagai pembayaran elektronik melalui Internet dengan aman tanpa perangkat pengaman yang terpisah. NICEPay telah berintegrasi dengan Bank melalui host ke host connection untuk kinerja yang lebih baik dan cepat. Dengan menggunakan teknologi terkini, NICEPay percaya untuk menumbuhkan bisnis Anda bersama.

    kami memiliki beberapa bahasa pemrograman seperti di java, csharp, php, python, dan ruby.

    Persiapan

    API NICEPay dapat diminta melalui HTTPS Request ke endpoint URL NICEPay Base.

    Development Environment : https://qa.nicepay.co.id/
    Production Environment : https://api.nicepay.co.id/

    Proses Integrasi

    1. Memahami SDK, Parameter, dan Flow pembayaran.
    2. Menjelajahi API Operation Calls.
    3. Integrasi.
    4. Tes pelaksanaan (Development).
    5. Minta MID dan API Key untuk production.
    6. Go Live.

    Prasyarat

    1. Test MID
    2. Test API Key
    3. SDK Bahasa Pemrograman NICEPay (Java,PHP,and other)
    4. Ubah url API : api -> qa

    Metode API NICEPay

    API Endpoint Metode Deskripsi
    /nicepay/api/onePassToken.do POST Permintaan token satu kali kartu kredit sebelum transaksi
    /nicepay/api/secureVeRequest.do POST Halaman Popup untuk 3DS Secure
    /nicepay/api/migsRequest.do POST Halaman Popup untuk MIGS Secure
    /nicepay/api/ewalletTrans.do POST API untuk melakukan registrasi pembayaran E-Wallet
    /nicepay/api/onePass.do POST API untuk melakukan registrasi pembayaran (Credit Card, VA, CVS, ClickPay)
    /nicepay/api/orderRegist.do POST API untuk melakukan registrasi transaksi (hanya untuk professional)
    /notification (example) POST Pemberitahuan hasil transaksi (ketika sukses)
    /nicepay/api/onePassStatus.do POST API untuk permintaan status Order
    /nicepay/api/onePassAllCancel.do POST API untuk membatalkan transaksi (Credit Card, VA, CVS)

    NICEPay Professional

    Semua Transaksi akan dialihkan ke NICEPay Secure Payment Page untuk proses transaksi.
    Langkah-langkah untuk NICEPay Professional:

    1. Pendaftaran Transaksi.
    2. Redirect to NICEPay Secure Payment Page.
    3. Customer menyelesaikan pembayaran di NICEPay Secure Payment Page.
    4. NICEPay redirect ke Merchant callbackUrl untuk memberikan informasi pembayaran.

    Pendaftaran Transaksi

    API ini untuk Pendaftaran Transaksi:

    1. Kartu Kredit (Credit Card)
    2. Virtual Account
    3. Convenience Store
    4. ClickPay
    5. E-Wallet

      Pendaftaran Transaksi
    API url /nicepay/api/orderRegist.do
    Metode POST
    Deskripsi API untuk melakukan registrasi transaksi Credit Card, Virtual Account, CVS, Clickpay, Ewallet
    Merchant Token SHA256 (Merchant ID + Reference Number + Amount + Merchant Key)


    Request Json Object

    Parameter Mandatory Tipe Ukuran Deskripsi Contoh Data
    iMid Y AN 10 Merchant ID IONPAYTEST
    merchantToken Y N 255 Merchant Token 6cfccfc0046773c1b589d8e98f8b596c284f3c70a4ecf86eba14c18944b74bcd
    payMethod Y AN 2 Payment Method 01: Credit Card
    02: Virtual Account
    03:Convenience Store
    04: ClickPay
    05: E-Wallet
    currency Y N 3 Currency IDR
    amt Y N 12 Transaction Amount 10000
    instmntType CC Only N 2 Installment Type, refer Code at Here 1: Customer charge
    2: Merchant charge
    instmntMon CC Only N 2 Installment Month 1
    referenceNo Y ANS 40 Merchant Order Number MerchantReferenceNumber1
    goodsNm Y AN 100 Goods Name Merchant Goods 1
    billingNm Y A 30 Billing Name Buyer Name
    billingPhone Y N 15 Billing phone number 02123456789
    billingEmail Y AN 40 Billing email buyer@merchant.com
    billingAddr N AN 100 Billing address Billing Address
    billingCity Only CC A 50 Billing city Jakarta Utara
    billingState Only CC A 50 Billing state DKI Jakarta
    billingPostCd Only CC A 10 Billing postcode 10160
    billingCountry Only CC A 10 Billing country Indonesia
    deliveryNm N A 30 Delivery name Delivery name
    deliveryPhone N N 15 Delivery phone number 02123456789
    deliveryAddr N AN 100 Delivery address Delivery Address
    deliveryCity N A 50 Delivery city Jakarta Utara
    deliveryState N A 50 Delivery state DKI Jakarta
    deliveryPostCd N N 10 Delivery postcode 10160
    deliveryCountry N A 10 Delivery Country indonesia
    callBackUrl Y AN 255 Payment result forward url https://merchant.com/callBackUrl
    dbProcessUrl Y AN 255 Payment notification https://merchant.com/dbProcessUrl
    vat N N 12 Vat Number 0
    fee N N 12 Service fee 0
    notaxAmt N N 12 Tax free amount 0
    description Y AN 100 Transaction description this is test order
    reqDt N N 8 Request date 20180303
    reqTm N N 6 Request time 135959
    reqDomain N AN 100 Request domain merchant.com
    reqServerIP N AN 15 Request Server IP address 127.0.0.1
    reqClientVer N AN 50 Request client version 1.0
    userIP N AN 15 User IP address 127.0.0.1
    userSessionID N AN 100 User session ID userSessionID
    userAgent N AN 100 User agent information Mozilla
    userLanguage N A 2 User language en-US
    recurrOpt N N 2 Recurring option 0: Automatic Cancel
    1: Do not cancel
    2: Do not make token
    cartData N JSON OBJECT 4000 JSON Format (JSON Format)
    instmntType N N 2 Installment type, refer Code at Here 1
    worker N AN 10 worker worker
    merFixAcctId N N 40 Merchant fix virtual account sign value 14015824
    vacctValidDt N N 8 Virtual account valid date 20180404
    vacctValidTm N N 6 Virtual account valid time 235959
    paymentExpDt N N 8 Permit time check date 20180404
    paymentExpTm N N 6 Permit time check time 235959
    payValidDt N N 8 CVS valid date 20180404
    payValidTm N N 6 CVS valid time 235959
    tXid N AN 30 Direct migs 3rd party add. BM...315
    mitraCd N AN 4 Mitra Code, refer Code at Here ALMA
    mRefNo N N 18 Bank Reference No. bankcd123456789
    timeStamp N N 14 Timestamp 20180404165639
    version N AN     D2

    - Credit Card

    // Payment Mandatory Field    
    nicePay.setPayMethod("01");    
    nicePay.setCurrency("IDR");    
    nicePay.setAmt("1000");    
    nicePay.setInstmntMon("1");    
    nicePay.setReferenceNo("MerchantReferenceNumber001");    
    nicePay.setGoodsNm("Merchant Goods 1");    
    nicePay.setBillingNm("Buyer Name");    
    nicePay.setBillingEmail("buyer@merchant.com");    
    nicePay.setBillingPhone("02112345678");    
    nicePay.setBillingAddr("Billing Address");    
    nicePay.setBillingCity("Jakarta");    
    nicePay.setBillingState("Jakarta");    
    nicePay.setBillingPostCd("12345");    
    nicePay.setBillingCountry("Indonesia");    
    nicePay.setDeliveryNm("Buyer Name");    
    nicePay.setDeliveryPhone("02112345678");    
    nicePay.setDeliveryAddr("Billing Address ");    
    nicePay.setDeliveryCity("Jakarta");    
    nicePay.setDeliveryState("Jakarta");    
    nicePay.setDeliveryPostCd("12345");    
    nicePay.setDeliveryCountry("Indonesia");    
    nicePay.setCallBackUrl("www.merchant.com/callback");    
    nicePay.setDbProcessUrl("www.merchant.com/dbprocess");    
    nicePay.setVat("0");
    nicePay.setFee("0");    
    nicePay.setNotaxAmt("0");    
    nicePay.setDescription("Description");    
    nicePay.setUserIP("127.0.0.1");    
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getReferenceNo()));    
    nicePay.setCartData("{}");  
    nicePay.setInstmntMon("1");    
    nicePay.setInstmntType("1");
    nicePay.setReccurOpt("0");   
    
    // Payment Optional Field    
    nicePay.setReqDt("20160301");    
    nicePay.setReqTm("135959");    
    nicePay.setReqDomain("www.merchant.com");    
    nicePay.setReqServerIP("127.0.0.1");    
    nicePay.setReqClientVer("1.0");    
    nicePay.setUserSessionID("userSessionID");    
    nicePay.setUserAgent("Mozilla");    
    nicePay.setUserLanguage("en-US");    
    nicePay.setMerFixAcctId("9999000000000001");    
    nicePay.setVacctValidDt("20160303");    
    nicePay.setVacctValidTm("135959");    
    nicePay.setPaymentExpiryDt("20160303");    
    nicePay.setPaymentExpiryTm("135959");
    
    // Payment Request    
    nicePay.payPage();   
    
    // Payment Response    
    System.out.println("Response String : " + nicePay.getResponseString()); // JSON in String format    
    
    String resultCd = nicePay.Get("resultCd");           
    String resultMsg = nicePay.Get("resultMsg");
    String tXid= nicePay.Get("tXid");        
    String requestURL= nicePay.Get("requestURL");
    
    public JsonResult ChargeCard(Nicepay Nicepay) {
        string RequestType = "CreditCard";
        Nicepay.iMid = NicepayConfig.NICEPAY_IMID;
        Nicepay.merchantToken = merchantToken(Nicepay, RequestType);
        Nicepay.dbProcessUrl = NicepayConfig.NICEPAY_DBPROCESS_URL;
        Nicepay.callBackUrl = NicepayConfig.NICEPAY_CALLBACK_URL;
        Nicepay.instmntMon = "1";
        Nicepay.instmntType = "1";
        Nicepay.userIP = GetUserIP();
        Nicepay.goodsNm = Nicepay.description;
        Nicepay.vat = "0";
        Nicepay.fee = "0";
        Nicepay.notaxAmt = "0";
        if (Nicepay.cartData == null) {
            Nicepay.cartData = "{}";
        }
        CheckParam(Nicepay.iMid, "01");
        CheckParam(Nicepay.PayMethod, "02");
        CheckParam(Nicepay.currency, "03");
        CheckParam(Nicepay.amt, "04");
        CheckParam(Nicepay.instmntMon, "05");
        CheckParam(Nicepay.referenceNo, "06");
        CheckParam(Nicepay.goodsNm, "07");
        CheckParam(Nicepay.billingNm, "08");
        CheckParam(Nicepay.billingPhone, "09");
        CheckParam(Nicepay.billingEmail, "10");
        CheckParam(Nicepay.billingAddr, "11");
        CheckParam(Nicepay.billingCity, "12");
        CheckParam(Nicepay.billingState, "13");
        CheckParam(Nicepay.billingCountry, "14");
        CheckParam(Nicepay.deliveryNm, "15");
        CheckParam(Nicepay.deliveryPhone, "16");
        CheckParam(Nicepay.deliveryAddr, "17");
        CheckParam(Nicepay.deliveryCity, "18");
        CheckParam(Nicepay.deliveryState, "19");
        CheckParam(Nicepay.deliveryPostCd, "20");
        CheckParam(Nicepay.deliveryCountry, "21");
        CheckParam(Nicepay.callBackUrl, "22");
        CheckParam(Nicepay.dbProcessUrl, "23");
        CheckParam(Nicepay.vat, "24");
        CheckParam(Nicepay.fee, "25");
        CheckParam(Nicepay.notaxAmt, "26");
        CheckParam(Nicepay.description, "27");
        CheckParam(Nicepay.merchantToken, "28");
    
        string API_Url = GetApiRequest(RequestType);
        string SingleString = BuildString(Nicepay);
        string ResultString = WebRequestPostHttp.Post_Http(SingleString, API_Url);
        ResultString = ResultString.Remove(0, 4);
        JavaScriptSerializer JsonSerializer = new JavaScriptSerializer();
    
        return JsonSerializer.Deserialize<JsonResult>(ResultString);
    }
    
    <?php
    $nicepay = new NicepayLib();
    
    //Ignore this function if you have invoice number.
    function generateReference() {
      $micro_date = microtime();
      $date_array = explode(" ",$microdate);
      $date = date("YmdHis",$date_array[1]);
      $date_array[0] = preg_replace('/[^\p{L}\p{N}\s]/u', '', $date_array[0]);
      return "Ref".$date.$date_array[0].rand(100,999);
    }
    
    if(isset($_POST['payMethod']) && $_POST['payMethod'] == '01'){
      //Populate Mandatory parameters to send
      $nicepay->set('payMethod', '01');
      $nicepay->set('currency', 'IDR');
      $nicepay->set('amt', 12000); //Total Gross Amount
      $nicepay->set('referenceNo',generateReference()); //Invoice Number or Reference Number Generated by Merchant
      $nicepay->set('description', 'Payment of Invoice No '.$nicepay->get('referenceNo'));//Transaction Description
    
      $nicepay->set('billingNm', 'John Doe'); //Customer name
      $nicepay->set('billingPhone', '02112345678'); //Customer phone number
      $nicepay->set('billingEmail', 'john@example.com');
      $nicepay->set('billingAddr', 'Jl. Jendral Sudirman No.28');
      $nicepay->set('billingCity', 'Jakarta Pusat');
      $nicepay->set('billingState', 'DKI Jakarta');
      $nicepay->set('billingPostCd', '10210');
      $nicepay->set('billingCountry', 'Indonesia');
    
      $nicepay->set('deliveryNm', 'John Doe'); //Delivery name
      $nicepay->set('deliveryPhone', '02112345678');
      $nicepay->set('deliveryEmail', 'john@example.com');
      $nicepay->set('deliveryAddr', 'Jl. Jendral Sudirman No.28');
      $nicepay->set('deliveryCity', 'Jakarta Pusat');
      $nicepay->set('deliveryState', 'DKI Jakarta');
      $nicepay->set('deliveryPostCd', '10210');
      $nicepay->set('deliveryCountry', 'Indonesia');
    
      //Send Data
      $response = $nicepay->chargeCard();
    
      //Process response from NICEPAY
      if(isset($response->data->resultCd) && $response->data->resultCd == "0000"){
        header("Location: ".$response->data->requestURL."?tXid=".$response->tXid);
        //Please save your tXid in your database
      }elseif (isset($response->resultCd)) {
        // In this sample, we echo error message
        echo "<pre>";
        echo "result code    : ".$response->resultCd."\n";
        echo "result message : ".$response->resultMsg."\n";
        echo "</pre>";
      }else {
        // In this sample, we echo error message
        echo "<pre>Connection Timeout. Please Try Again.</pre>";
      }
    }
    ?>
    
    #Set Mandatory Value  
    NICEPay.payMethod = "01" #Set Payment Method  
    NICEPay.amt = "1000" #Total Gross Amount  
    NICEPay.referenceNo = str(random.randrange(111111, 999999)) #Invoice Number By Merchant  
    NICEPay.goodsNm = NICEPay.referenceNo #Goods Name  
    NICEPay.billingNm = "John Doe"  
    NICEPay.billingPhone = "02112345678"  
    NICEPay.billingEmail = "john@example.com"  
    NICEPay.billingAddr = "Jl. Jend. Sudirman No. 28"  
    NICEPay.billingCity = "Jakarta Pusat"  
    NICEPay.billingState = "DKI Jakarta"  
    NICEPay.billingPostCd = "10210"  
    NICEPay.billingCountry = "Indonesia"  
    NICEPay.callBackUrl = "http://www.merchant.com/callback"  
    NICEPay.dbProcessUrl = "https://www.merchant.com/notification"  
    NICEPay.description = "Payment Of Ref No." + NICEPay.referenceNo  
    NICEPay.merchantToken = NICEPay.getMerchantToken()  
    NICEPay.userIP = NICEPay.getUserIp()  
    NICEPay.cartData = "{}" #Json Array Value
    NICEPay.instmntMon = "1"  
    NICEPay.instmntType = "1"
    
    #Payment Request
    resultData = NICEPay.apiRequest()
    
    #Payment Result  
    jsonResult = resultData[4:]  
    result = json.loads(jsonResult)
    
    #Payment Response String Format  
    print("resultCd : " + result['data']['resultCd'])  
    print("resultMsg : " + result['data']['resultMsg'])  
    print("requestURL: " + result['data']['requestURL'] + "?tXid=" + result['data']['tXid'])  
    print("tXid : " + result['data']['tXid'])
    

    Contoh API Response

    {
      "apiType": "M0",
      "tXid": "TESTIDTEST01201608291156552476",
      "requestDate": "20160829115655",
      "responseDate": "20160829115655",
      "data": {
        "tXid": "TESTIDTEST01201608291156552476",
        "resultCd": "0000",
        "resultMsg": "SUCCESS",
        "requestURL": "https://www.nicepay.co.id/nicepay/api/orderInquiry.do"
      }
    }
    

    Berikut contoh Pendaftaran Transaksi untuk Credit Card

    Notice  
    payMethod 01
    Description Credit Card


    Mandatory Parameter untuk Credit Card

    Parameter Tipe Ukuran Deskripsi Contoh Data
    iMid AN 10 Merchant ID IONPAYTEST
    payMethod AN 2 Pay Method 01
    currency AN 3 Currency IDR
    amt N 12 Goods Amount 1000
    instmntType N 2 Installment Type, refer Code at Here 1
    instmntMon N 2 Installment Month 1
    referenceNo ANS 40 Merchant Order No MerchantReferenceNumber001
    goodsNm AN 100 Goods Name Merchant Goods 1
    billingNm A 30 Billing Name Buyer Name
    billingPhone N 15 Billing Phone Number 02112345678
    billingEmail AN 40 Billing Email buyer@merchant.com
    billingCity A 50 Billing City Jakarta
    billingState A 50 Billing State Jakarta
    billingPostCd N 10 Billing Post Number 12345
    billingCountry A 10 Billing Country Indonesia
    callBackUrl AN 255 Payment Result Forward Url (On Browser) www.merchant.com/callback
    dbProcessUrl AN 255 Payment Result Receive Url (Server Side) www.merchant.com/dbprocess
    description AN 12 Description Description
    merchantToken AN 255 Merchant Token 6cfccfc0046773c1b589d8e98f8b596c284f3c70a4ecf86eba14c18944b74bcd
    userIP AN 15 User IP (Customer) 127.0.0.1
    cartData AN 4000 Cart Data (Json Format) {}
    recurrOpt N 2 Recurring option
    0: Automatic Cancel
    1: Do not cancel
    2: Do not make token
    null


    Optional Parameter untuk Credit Card

    Parameter Tipe Ukuran Deskripsi Contoh Data
    billingAddr AN 100 Billing Address Billing Address
    deliveryNm A 30 Delivery Name Buyer Name
    deliveryPhone N 15 Delivery Phone 02112345678
    deliveryAddr AN 100 Delivery Address Billing Address
    deliveryEmail AN   Delivery Email buyer@merchant.com
    deliveryCity A 50 Delivery City Jakarta
    deliveryState A 50 Delivery State Jakarta
    deliveryPostCd N 10 Delivery Post Number 12345
    deliveryCountry A 10 Delivery Country Indonesia
    vat N 12 Vat 0
    fee N 12 Service Tax 0
    notaxAmt N 12 Tax Free Amount 0
    reqDt N 8 Request Date(YYYYMMDD) 20160301
    reqTm N 6 Request Time(HH24MISS) 135959
    reqDomain AN 100 Request Domain merchant.com
    reqServerIP AN 15 Request Server IP 127.0.0.1
    reqClientVer AN 50 equest Client Version 1.0
    userSessionID AN 100 User Session ID userSessionID
    userAgent AN 100 User Agent Information Mozilla
    userLanguage AN 2 User Language en-US

    - Virtual Account

    // Payment Mandatory Field    
    nicePay.setPayMethod("02");    
    nicePay.setCurrency("IDR");    
    nicePay.setAmt("1000");   
    nicePay.setReferenceNo("MerchantReferenceNumber001");    
    nicePay.setGoodsNm("Merchant Goods 1");    
    nicePay.setBillingNm("Buyer Name");    
    nicePay.setBillingEmail("buyer@merchant.com");    
    nicePay.setBillingPhone("02112345678");      
    nicePay.setCallBackUrl("www.merchant.com/callback");    
    nicePay.setDbProcessUrl("www.merchant.com/dbprocess");
    nicePay.setDescription("Description");
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getReferenceNo()));    
    nicePay.setCartData("{}");
    
    // Payment Optional Field    
    nicePay.setBillingAddr("Billing Address");    
    nicePay.setBillingCity("Jakarta");    
    nicePay.setBillingState("Jakarta");    
    nicePay.setBillingPostCd("12345");    
    nicePay.setBillingCountry("Indonesia");
    nicePay.setDeliveryNm("Buyer Name");    
    nicePay.setDeliveryPhone("02112345678");    
    nicePay.setDeliveryAddr("Billing Address ");    
    nicePay.setDeliveryCity("Jakarta");    
    nicePay.setDeliveryState("Jakarta");    
    nicePay.setDeliveryPostCd("12345");    
    nicePay.setDeliveryCountry("Indonesia");  
    nicePay.setVat("0");
    nicePay.setFee("0");    
    nicePay.setNotaxAmt("0");  
    nicePay.setReqDt("20160301");    
    nicePay.setReqTm("135959");    
    nicePay.setReqDomain("www.merchant.com");    
    nicePay.setReqServerIP("127.0.0.1");    
    nicePay.setReqClientVer("1.0");    
    nicePay.setUserIP("127.0.0.1");  
    nicePay.setUserSessionID("userSessionID");    
    nicePay.setUserAgent("Mozilla");    
    nicePay.setUserLanguage("en-US");
    
    // Payment Request    
    nicePay.payPage();   
    
    // Payment Response    
    System.out.println("Response String : " + nicePay.getResponseString()); // JSON in String format    
    
    String resultCd = nicePay.Get("resultCd");           
    String resultMsg = nicePay.Get("resultMsg");
    String tXid= nicePay.Get("tXid");        
    String requestURL= nicePay.Get("requestURL");
    
    <?php
    $nicepay = new NicepayLib();
    
    //Ignore this function if you have invoice number.
    function generateReference()
    {
      $micro_date = microtime();
      $date_array = explode(" ",$microdate);
      $date = date("YmdHis",$date_array[1]);
      $date_array[0] = preg_replace('/[^\p{L}\p{N}\s]/u', '', $date_array[0]);
      return "Ref".$date.$date_array[0].rand(100,999);
    }
    
    if(isset($_POST['payMethod']) && $_POST['payMethod'] == '02'){
      //Populate Mandatory parameters to send
      $nicepay->set('payMethod', '02');
      $nicepay->set('currency', 'IDR');
      $nicepay->set('amt', 12000); //Total Gross Amount
      $nicepay->set('referenceNo',generateReference()); //Invoice Number or Reference Number Generated by Merchant
      $nicepay->set('description', 'Payment of Invoice No '.$nicepay->get('referenceNo'));//Transaction Description
    
      $nicepay->set('billingNm', 'John Doe'); //Customer name
      $nicepay->set('billingPhone', '02112345678'); //Customer phone number
      $nicepay->set('billingEmail', 'john@example.com');
      $nicepay->set('billingAddr', 'Jl. Jendral Sudirman No.28');
      $nicepay->set('billingCity', 'Jakarta Pusat');
      $nicepay->set('billingState', 'DKI Jakarta');
      $nicepay->set('billingPostCd', '10210');
      $nicepay->set('billingCountry', 'Indonesia');
    
      $nicepay->set('deliveryNm', 'John Doe'); //Delivery name
      $nicepay->set('deliveryPhone', '02112345678');
      $nicepay->set('deliveryEmail', 'john@example.com');
      $nicepay->set('deliveryAddr', 'Jl. Jendral Sudirman No.28');
      $nicepay->set('deliveryCity', 'Jakarta Pusat');
      $nicepay->set('deliveryState', 'DKI Jakarta');
      $nicepay->set('deliveryPostCd', '10210');
      $nicepay->set('deliveryCountry', 'Indonesia');
    
      //Send Data
      $response = $nicepay->requestVA();
    
      //Process response from NICEPAY
      if(isset($response->data->resultCd) && $response->data->resultCd == "0000"){
        header("Location: ".$response->data->requestURL."?tXid=".$response->tXid);
        //Please save your tXid in your database
      }elseif (isset($response->resultCd)) {
        // In this sample, we echo error message
        echo "<pre>";
        echo "result code    : ".$response->resultCd."\n";
        echo "result message : ".$response->resultMsg."\n";
        echo "</pre>";
      }else {
        // In this sample, we echo error message
        echo "<pre>Connection Timeout. Please Try Again.</pre>";
      }
    }
    ?>
    
    #Set Mandatory Value  
    NICEPay.payMethod = "02" #Set Payment Method  
    NICEPay.amt = "1000" #Total Gross Amount  
    NICEPay.referenceNo = str(random.randrange(111111, 999999)) #Invoice Number By Merchant  
    NICEPay.goodsNm = NICEPay.referenceNo #Goods Name  
    NICEPay.billingNm = "John Doe"  
    NICEPay.billingPhone = "02112345678"  
    NICEPay.billingEmail = "john@example.com"
    NICEPay.callBackUrl = "http://www.merchant.com/callback"  
    NICEPay.dbProcessUrl = "https://www.merchant.com/notification"  
    NICEPay.description = "Payment Of Ref No." + NICEPay.referenceNo  
    NICEPay.merchantToken = NICEPay.getMerchantToken()  
    NICEPay.userIP = NICEPay.getUserIp()  
    NICEPay.cartData = "{}" #Json Array Value
    
    #Payment Request
    resultData = NICEPay.apiRequest()
    
    #Payment Result  
    jsonResult = resultData[4:]  
    result = json.loads(jsonResult)
    
    #Payment Response String Format  
    print("resultCd : " + result['data']['resultCd'])  
    print("resultMsg : " + result['data']['resultMsg'])  
    print("requestURL: " + result['data']['requestURL'] + "?tXid=" + result['data']['tXid'])  
    print("tXid : " + result['data']['tXid'])
    

    Contoh API Response

    {
      "apiType": "M0",
      "tXid": "TESTIDTEST02201705261652026146",
      "requestDate": "20170526165202",
      "responseDate": "20170526165202",
      "data": {
        "tXid": "TESTIDTEST02201705261652026146",
        "resultCd": "0000",
        "resultMsg": "SUCCESS",
        "requestURL": "https://www.nicepay.co.id/nicepay/api/orderInquiry.do"
      }
    }
    

    Berikut contoh Pendaftaran Transaksi untuk Virtual Account

    Notice  
    payMethod 02
    Description Virtual Account


    Mandatory Parameter untuk Virtual Account

    Parameter Tipe Ukuran Deskripsi Contoh Data
    iMid AN 10 Merchant ID IONPAYTEST
    payMethod AN 2 Pay Method 02
    currency AN 3 Currency IDR
    amt N 12 Goods Amount 1000
    referenceNo ANS 40 Merchant Order No MerchantReferenceNumber001
    goodsNm AN 100 Goods Name Merchant Goods 1
    billingNm A 30 Billing Name Buyer Name
    billingPhone N 15 Billing Phone Number 02112345678
    billingEmail AN 40 Billing Email buyer@merchant.com
    callBackUrl AN 255 Payment Result Forward Url (On Browser) www.merchant.com/callback
    dbProcessUrl AN 255 Payment Result Receive Url (Server Side) www.merchant.com/dbprocess
    description AN 12 Description Description
    merchantToken AN 255 Merchant Token 6cfccfc0046773c1b589d8e98f8b596c284f3c70a4ecf86eba14c18944b74bcd
    cartData AN 4000 Cart Data (Json Format) {}


    Optional Parameter untuk Virtual Account

    Parameter Tipe Ukuran Deskripsi Contoh Data
    billingAddr AN 100 Billing Address Billing Address
    billingCity A 50 Billing City Jakarta
    billingState A 50 Billing State Jakarta
    billingPostCd N 10 Billing Post Number 12345
    billingCountry A 10 Billing Country Indonesia
    deliveryNm A 30 Delivery Name Buyer Name
    deliveryPhone N 15 Delivery Phone 02112345678
    deliveryAddr AN 100 Delivery Address Billing Address
    deliveryEmail AN   Delivery Email buyer@merchant.com
    deliveryCity A 50 Delivery City Jakarta
    deliveryState A 50 Delivery State Jakarta
    deliveryPostCd N 10 Delivery Post Number 12345
    deliveryCountry A 10 Delivery Country Indonesia
    vat N 12 Vat 0
    fee N 12 Service Tax 0
    notaxAmt N 12 Tax Free Amount 0
    reqDt N 8 Request Date(YYYYMMDD) 20160301
    reqTm N 6 Request Time(HH24MISS) 135959
    reqDomain AN 100 Request Domain merchant.com
    reqServerIP AN 15 Request Server IP 127.0.0.1
    reqClientVer AN 50 equest Client Version 1.0
    userIP AN 15 User IP (Customer) 127.0.0.1
    userSessionID AN 100 User Session ID userSessionID
    userAgent AN 100 User Agent Information Mozilla
    userLanguage AN 2 User Language en-US

    - Convenience Store

    nicePay.setPayMethod("03");    
    nicePay.setCurrency("IDR");    
    nicePay.setAmt("1000");   
    nicePay.setReferenceNo("MerchantReferenceNumber001");    
    nicePay.setGoodsNm("Merchant Goods 1");    
    nicePay.setBillingNm("Buyer Name");    
    nicePay.setBillingEmail("buyer@merchant.com");    
    nicePay.setBillingPhone("02112345678");      
    nicePay.setCallBackUrl("www.merchant.com/callback");    
    nicePay.setDbProcessUrl("www.merchant.com/dbprocess");
    nicePay.setDescription("Description");
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getReferenceNo()));    
    nicePay.setCartData("{}");
    
    // Payment Optional Field    
    nicePay.setBillingAddr("Billing Address");    
    nicePay.setBillingCity("Jakarta");    
    nicePay.setBillingState("Jakarta");    
    nicePay.setBillingPostCd("12345");    
    nicePay.setBillingCountry("Indonesia");
    nicePay.setDeliveryNm("Buyer Name");    
    nicePay.setDeliveryPhone("02112345678");    
    nicePay.setDeliveryAddr("Billing Address ");    
    nicePay.setDeliveryCity("Jakarta");    
    nicePay.setDeliveryState("Jakarta");    
    nicePay.setDeliveryPostCd("12345");    
    nicePay.setDeliveryCountry("Indonesia");  
    nicePay.setVat("0");
    nicePay.setFee("0");    
    nicePay.setNotaxAmt("0");  
    nicePay.setReqDt("20160301");    
    nicePay.setReqTm("135959");    
    nicePay.setReqDomain("www.merchant.com");    
    nicePay.setReqServerIP("127.0.0.1");    
    nicePay.setReqClientVer("1.0");    
    nicePay.setUserIP("127.0.0.1");  
    nicePay.setUserSessionID("userSessionID");    
    nicePay.setUserAgent("Mozilla");    
    nicePay.setUserLanguage("en-US");
    
    // Payment Request    
    nicePay.payPage();   
    
    // Payment Response    
    System.out.println("Response String : " + nicePay.getResponseString()); // JSON in String format    
    
    String resultCd = nicePay.Get("resultCd");           
    String resultMsg = nicePay.Get("resultMsg");
    String tXid= nicePay.Get("tXid");        
    String requestURL= nicePay.Get("requestURL");
    
    <?php
    $nicepay = new NicepayLib();
    
    //Ignore this function if you have invoice number.
    function generateReference()
    {
      $micro_date = microtime();
      $date_array = explode(" ",$microdate);
      $date = date("YmdHis",$date_array[1]);
      $date_array[0] = preg_replace('/[^\p{L}\p{N}\s]/u', '', $date_array[0]);
      return "Ref".$date.$date_array[0].rand(100,999);
    }
    
    if(isset($_POST['payMethod']) && $_POST['payMethod'] == '03'){
      //Populate Mandatory parameters to send
      $nicepay->set('payMethod', '03');
      $nicepay->set('currency', 'IDR');
      $nicepay->set('amt', 12000); //Total Gross Amount
      $nicepay->set('referenceNo',generateReference()); //Invoice Number or Reference Number Generated by Merchant
      $nicepay->set('description', 'Payment of Invoice No '.$nicepay->get('referenceNo'));//Transaction Description
    
      $nicepay->set('billingNm', 'John Doe'); //Customer name
      $nicepay->set('billingPhone', '02112345678'); //Customer phone number
      $nicepay->set('billingEmail', 'john@example.com');
      $nicepay->set('billingAddr', 'Jl. Jendral Sudirman No.28');
      $nicepay->set('billingCity', 'Jakarta Pusat');
      $nicepay->set('billingState', 'DKI Jakarta');
      $nicepay->set('billingPostCd', '10210');
      $nicepay->set('billingCountry', 'Indonesia');
    
      $nicepay->set('deliveryNm', 'John Doe'); //Delivery name
      $nicepay->set('deliveryPhone', '02112345678');
      $nicepay->set('deliveryEmail', 'john@example.com');
      $nicepay->set('deliveryAddr', 'Jl. Jendral Sudirman No.28');
      $nicepay->set('deliveryCity', 'Jakarta Pusat');
      $nicepay->set('deliveryState', 'DKI Jakarta');
      $nicepay->set('deliveryPostCd', '10210');
      $nicepay->set('deliveryCountry', 'Indonesia');
    
      //Send Data
      $response = $nicepay->requestCVS();
    
      //Process response from NICEPAY
      if(isset($response->data->resultCd) && $response->data->resultCd == "0000"){
        header("Location: ".$response->data->requestURL."?tXid=".$response->tXid);
        //Please save your tXid in your database
      }elseif (isset($response->resultCd)) {
        // In this sample, we echo error message
        echo "<pre>";
        echo "result code    : ".$response->resultCd."\n";
        echo "result message : ".$response->resultMsg."\n";
        echo "</pre>";
      }else {
        // In this sample, we echo error message
        echo "<pre>Connection Timeout. Please Try Again.</pre>";
      }
    }
    ?>
    
    #Set Mandatory Value  
    NICEPay.payMethod = "03" #Set Payment Method  
    NICEPay.amt = "1000" #Total Gross Amount  
    NICEPay.referenceNo = str(random.randrange(111111, 999999)) #Invoice Number By Merchant  
    NICEPay.goodsNm = NICEPay.referenceNo #Goods Name  
    NICEPay.billingNm = "John Doe"  
    NICEPay.billingPhone = "02112345678"  
    NICEPay.billingEmail = "john@example.com"
    NICEPay.callBackUrl = "http://www.merchant.com/callback"  
    NICEPay.dbProcessUrl = "https://www.merchant.com/notification"  
    NICEPay.description = "Payment Of Ref No." + NICEPay.referenceNo  
    NICEPay.merchantToken = NICEPay.getMerchantToken()  
    NICEPay.userIP = NICEPay.getUserIp()  
    NICEPay.cartData = "{}" #Json Array Value
    
    #Payment Request
    resultData = NICEPay.apiRequest()
    
    #Payment Result  
    jsonResult = resultData[4:]  
    result = json.loads(jsonResult)
    
    #Payment Response String Format  
    print("resultCd : " + result['data']['resultCd'])  
    print("resultMsg : " + result['data']['resultMsg'])  
    print("requestURL: " + result['data']['requestURL'] + "?tXid=" + result['data']['tXid'])  
    print("tXid : " + result['data']['tXid'])
    

    Contoh API response :

    {
      "apiType": "M0",
      "tXid": "TESTIDTEST03201705291553243107",
      "requestDate": "20170526165202",
      "responseDate": "20170526165202",
      "data": {
        "tXid": "TESTIDTEST03201705291553243107",
        "resultCd": "0000",
        "resultMsg": "SUCCESS",
        "requestURL": "https://www.nicepay.co.id/nicepay/api/orderInquiry.do"
      }
    }
    

    Berikut contoh Pendaftaran Transaksi untuk Convenience Store (CVS)

    Notice  
    payMethod 03
    Description Convenience Store (CVS)


    Mandatory Parameter untuk Convenience Store (CVS)

    Parameter Tipe Ukuran Deskripsi Contoh Data
    iMid AN 10 Merchant ID IONPAYTEST
    payMethod AN 2 Pay Method 03
    currency AN 3 Currency IDR
    amt N 12 Goods Amount 1000
    referenceNo ANS 40 Merchant Order No MerchantReferenceNumber001
    goodsNm AN 100 Goods Name Merchant Goods 1
    billingNm A 30 Billing Name Buyer Name
    billingPhone N 15 Billing Phone Number 02112345678
    billingEmail AN 40 Billing Email buyer@merchant.com
    callBackUrl AN 255 Payment Result Forward Url (On Browser) www.merchant.com/callback
    dbProcessUrl AN 255 Payment Result Receive Url (Server Side) www.merchant.com/dbprocess
    description AN 12 Description Description
    merchantToken AN 255 Merchant Token 6cfccfc0046773c1b589d8e98f8b596c284f3c70a4ecf86eba14c18944b74bcd
    cartData AN 4000 Cart Data (Json Format) {}


    Optional Parameter untuk Convenience Store (CVS)

    Parameter Tipe Ukuran Deskripsi Contoh Data
    payValidDt N 8 CVS valid date 20180323
    payValidTm N 6 CVS valid time 205959
    billingAddr AN 100 Billing Address Billing Address
    billingCity A 50 Billing City Jakarta
    billingState A 50 Billing State Jakarta
    billingPostCd N 10 Billing Post Number 12345
    billingCountry A 10 Billing Country Indonesia
    deliveryNm A 30 Delivery Name Buyer Name
    deliveryPhone N 15 Delivery Phone 02112345678
    deliveryAddr AN 100 Delivery Address Billing Address
    deliveryEmail AN   Delivery Email buyer@merchant.com
    deliveryCity A 50 Delivery City Jakarta
    deliveryState A 50 Delivery State Jakarta
    deliveryPostCd N 10 Delivery Post Number 12345
    deliveryCountry A 10 Delivery Country Indonesia
    vat N 12 Vat 0
    fee N 12 Service Tax 0
    notaxAmt N 12 Tax Free Amount 0
    reqDt N 8 Request Date(YYYYMMDD) 20160301
    reqTm N 6 Request Time(HH24MISS) 135959
    reqDomain AN 100 Request Domain merchant.com
    reqServerIP AN 15 Request Server IP 127.0.0.1
    reqClientVer AN 50 equest Client Version 1.0
    userIP AN 15 User IP (Customer) 127.0.0.1
    userSessionID AN 100 User Session ID userSessionID
    userAgent AN 100 User Agent Information Mozilla
    userLanguage AN 2 User Language en-US

    - ClickPay

    // Payment Mandatory Field    
    nicePay.setPayMethod("04");    
    nicePay.setCurrency("IDR");    
    nicePay.setAmt("1000");   
    nicePay.setReferenceNo("MerchantReferenceNumber001");    
    nicePay.setGoodsNm("Merchant Goods 1");    
    nicePay.setBillingNm("Buyer Name");    
    nicePay.setBillingEmail("buyer@merchant.com");    
    nicePay.setBillingPhone("02112345678");      
    nicePay.setCallBackUrl("www.merchant.com/callback");    
    nicePay.setDbProcessUrl("www.merchant.com/dbprocess");
    nicePay.setDescription("Description");
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getReferenceNo()));    
    nicePay.setCartData("{}");
    nicePay.setUserIP("127.0.0.1");
    
    // Payment Optional Field    
    nicePay.setBillingAddr("Billing Address");    
    nicePay.setBillingCity("Jakarta");    
    nicePay.setBillingState("Jakarta");    
    nicePay.setBillingPostCd("12345");    
    nicePay.setBillingCountry("Indonesia");
    nicePay.setDeliveryNm("Buyer Name");    
    nicePay.setDeliveryPhone("02112345678");    
    nicePay.setDeliveryAddr("Billing Address ");    
    nicePay.setDeliveryCity("Jakarta");    
    nicePay.setDeliveryState("Jakarta");    
    nicePay.setDeliveryPostCd("12345");    
    nicePay.setDeliveryCountry("Indonesia");  
    nicePay.setVat("0");
    nicePay.setFee("0");    
    nicePay.setNotaxAmt("0");  
    nicePay.setReqDt("20160301");    
    nicePay.setReqTm("135959");    
    nicePay.setReqDomain("www.merchant.com");    
    nicePay.setReqServerIP("127.0.0.1");    
    nicePay.setReqClientVer("1.0");
    nicePay.setUserSessionID("userSessionID");    
    nicePay.setUserAgent("Mozilla");    
    nicePay.setUserLanguage("en-US");
    
    // Payment Request    
    nicePay.payPage();   
    
    // Payment Response    
    System.out.println("Response String : " + nicePay.getResponseString()); // JSON in String format    
    
    String resultCd = nicePay.Get("resultCd");           
    String resultMsg = nicePay.Get("resultMsg");
    String tXid= nicePay.Get("tXid");        
    String requestURL= nicePay.Get("requestURL");
    
    <?php
    $nicepay = new NicepayLib();
    
    //Ignore this function if you have invoice number.
    function generateReference()
    {
      $micro_date = microtime();
      $date_array = explode(" ",$microdate);
      $date = date("YmdHis",$date_array[1]);
      $date_array[0] = preg_replace('/[^\p{L}\p{N}\s]/u', '', $date_array[0]);
      return "Ref".$date.$date_array[0].rand(100,999);
    }
    
    if(isset($_POST['payMethod']) && $_POST['payMethod'] == '04'){
      //Populate Mandatory parameters to send
      $nicepay->set('payMethod', '04');
      $nicepay->set('currency', 'IDR');
      $nicepay->set('amt', 12000); //Total Gross Amount
      $nicepay->set('referenceNo',generateReference()); //Invoice Number or Reference Number Generated by Merchant
      $nicepay->set('description', 'Payment of Invoice No '.$nicepay->get('referenceNo'));//Transaction Description
    
      $nicepay->set('billingNm', 'John Doe'); //Customer name
      $nicepay->set('billingPhone', '02112345678'); //Customer phone number
      $nicepay->set('billingEmail', 'john@example.com');
      $nicepay->set('billingAddr', 'Jl. Jendral Sudirman No.28');
      $nicepay->set('billingCity', 'Jakarta Pusat');
      $nicepay->set('billingState', 'DKI Jakarta');
      $nicepay->set('billingPostCd', '10210');
      $nicepay->set('billingCountry', 'Indonesia');
    
      $nicepay->set('deliveryNm', 'John Doe'); //Delivery name
      $nicepay->set('deliveryPhone', '02112345678');
      $nicepay->set('deliveryEmail', 'john@example.com');
      $nicepay->set('deliveryAddr', 'Jl. Jendral Sudirman No.28');
      $nicepay->set('deliveryCity', 'Jakarta Pusat');
      $nicepay->set('deliveryState', 'DKI Jakarta');
      $nicepay->set('deliveryPostCd', '10210');
      $nicepay->set('deliveryCountry', 'Indonesia');
    
      //Send Data
      $response = $nicepay->requestClickPay();
    
      //Process response from NICEPAY
      if(isset($response->data->resultCd) && $response->data->resultCd == "0000"){
        header("Location: ".$response->data->requestURL."?tXid=".$response->tXid);
        //Please save your tXid in your database
      }elseif (isset($response->resultCd)) {
        // In this sample, we echo error message
        echo "<pre>";
        echo "result code    : ".$response->resultCd."\n";
        echo "result message : ".$response->resultMsg."\n";
        echo "</pre>";
      }else {
        // In this sample, we echo error message
        echo "<pre>Connection Timeout. Please Try Again.</pre>";
      }
    }
    ?>
    
    #Set Mandatory Value  
    NICEPay.payMethod = "04" #Set Payment Method  
    NICEPay.amt = "1000" #Total Gross Amount  
    NICEPay.referenceNo = str(random.randrange(111111, 999999)) #Invoice Number By Merchant  
    NICEPay.goodsNm = NICEPay.referenceNo #Goods Name  
    NICEPay.billingNm = "John Doe"  
    NICEPay.billingPhone = "02112345678"  
    NICEPay.billingEmail = "john@example.com"
    NICEPay.callBackUrl = "http://www.merchant.com/callback"  
    NICEPay.dbProcessUrl = "https://www.merchant.com/notification"  
    NICEPay.description = "Payment Of Ref No." + NICEPay.referenceNo  
    NICEPay.merchantToken = NICEPay.getMerchantToken()  
    NICEPay.userIP = NICEPay.getUserIp()  
    NICEPay.cartData = "{}" #Json Array Value
    
    #Payment Request
    resultData = NICEPay.apiRequest()
    
    #Payment Result  
    jsonResult = resultData[4:]  
    result = json.loads(jsonResult)
    
    #Payment Response String Format  
    print("resultCd : " + result['data']['resultCd'])  
    print("resultMsg : " + result['data']['resultMsg'])  
    print("requestURL: " + result['data']['requestURL'] + "?tXid=" + result['data']['tXid'])  
    print("tXid : " + result['data']['tXid'])
    

    Contoh API Response

    {
      "apiType": "M0",
      "tXid": "TESTIDTEST02201705261652026146",
      "requestDate": "20170526165202",
      "responseDate": "20170526165202",
      "data": {
        "tXid": "TESTIDTEST02201705261652026146",
        "resultCd": "0000",
        "resultMsg": "SUCCESS",
        "requestURL": "https://www.nicepay.co.id/nicepay/api/orderInquiry.do"
      }
    }
    

    Berikut contoh Pendaftaran Transaksi untuk ClickPay

    Notice  
    payMethod 04
    Description ClickPay


    Mandatory Parameter untuk ClickPay

    Parameter Tipe Ukuran Deskripsi Contoh Data
    iMid AN 10 Merchant ID IONPAYTEST
    payMethod AN 2 Pay Method 04
    currency AN 3 Currency IDR
    amt N 12 Goods Amount 1000
    referenceNo ANS 40 Merchant Order No MerchantReferenceNumber001
    goodsNm AN 100 Goods Name Merchant Goods 1
    billingNm A 30 Billing Name Buyer Name
    billingPhone N 15 Billing Phone Number 02112345678
    billingEmail AN 40 Billing Email buyer@merchant.com
    callBackUrl AN 255 Payment Result Forward Url (On Browser) www.merchant.com/callback
    dbProcessUrl AN 255 Payment Result Receive Url (Server Side) www.merchant.com/dbprocess
    description AN 12 Description Description
    merchantToken AN 255 Merchant Token 6cfccfc0046773c1b589d8e98f8b596c284f3c70a4ecf86eba14c18944b74bcd
    cartData AN 4000 Cart Data (Json Format) {}
    userIP AN 15 User IP (Customer) 127.0.0.1


    Optional Parameter untuk ClickPay

    Parameter Tipe Ukuran Deskripsi Contoh Data
    paymentExpDt N 8 Payment expiry date 20180326
    paymentExpTm N 6 Payment Expiry time 205959
    billingAddr AN 100 Billing Address Billing Address
    billingCity A 50 Billing City Jakarta
    billingState A 50 Billing State Jakarta
    billingPostCd N 10 Billing Post Number 12345
    billingCountry A 10 Billing Country Indonesia
    deliveryNm A 30 Delivery Name Buyer Name
    deliveryPhone N 15 Delivery Phone 02112345678
    deliveryAddr AN 100 Delivery Address Billing Address
    deliveryEmail AN   Delivery Email buyer@merchant.com
    deliveryCity A 50 Delivery City Jakarta
    deliveryState A 50 Delivery State Jakarta
    deliveryPostCd N 10 Delivery Post Number 12345
    deliveryCountry A 10 Delivery Country Indonesia
    vat N 12 Vat 0
    fee N 12 Service Tax 0
    notaxAmt N 12 Tax Free Amount 0
    reqDt N 8 Request Date(YYYYMMDD) 20160301
    reqTm N 6 Request Time(HH24MISS) 135959
    reqDomain AN 100 Request Domain merchant.com
    reqServerIP AN 15 Request Server IP 127.0.0.1
    reqClientVer AN 50 equest Client Version 1.0
    userSessionID AN 100 User Session ID userSessionID
    userAgent AN 100 User Agent Information Mozilla
    userLanguage AN 2 User Language en-US

    - E-Wallet

    // Payment Mandatory Field    
    nicePay.setPayMethod("05");    
    nicePay.setCurrency("IDR");    
    nicePay.setAmt("1000");   
    nicePay.setReferenceNo("MerchantReferenceNumber001");    
    nicePay.setGoodsNm("Merchant Goods 1");    
    nicePay.setBillingNm("Buyer Name");    
    nicePay.setBillingEmail("buyer@merchant.com");    
    nicePay.setBillingPhone("02112345678");      
    nicePay.setCallBackUrl("www.merchant.com/callback");    
    nicePay.setDbProcessUrl("www.merchant.com/dbprocess");
    nicePay.setDescription("Description");
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getReferenceNo()));    
    nicePay.setCartData("{}");
    nicePay.setUserIP("127.0.0.1");
    
    // Payment Optional Field    
    nicePay.setBillingAddr("Billing Address");    
    nicePay.setBillingCity("Jakarta");    
    nicePay.setBillingState("Jakarta");    
    nicePay.setBillingPostCd("12345");    
    nicePay.setBillingCountry("Indonesia");
    nicePay.setDeliveryNm("Buyer Name");    
    nicePay.setDeliveryPhone("02112345678");    
    nicePay.setDeliveryAddr("Billing Address ");    
    nicePay.setDeliveryCity("Jakarta");    
    nicePay.setDeliveryState("Jakarta");    
    nicePay.setDeliveryPostCd("12345");    
    nicePay.setDeliveryCountry("Indonesia");  
    nicePay.setVat("0");
    nicePay.setFee("0");    
    nicePay.setNotaxAmt("0");  
    nicePay.setReqDt("20160301");    
    nicePay.setReqTm("135959");    
    nicePay.setReqDomain("www.merchant.com");    
    nicePay.setReqServerIP("127.0.0.1");    
    nicePay.setReqClientVer("1.0");
    nicePay.setUserSessionID("userSessionID");    
    nicePay.setUserAgent("Mozilla");    
    nicePay.setUserLanguage("en-US");
    
    // Payment Request    
    nicePay.payPage();   
    
    // Payment Response    
    System.out.println("Response String : " + nicePay.getResponseString()); // JSON in String format    
    
    String resultCd = nicePay.Get("resultCd");           
    String resultMsg = nicePay.Get("resultMsg");
    String tXid= nicePay.Get("tXid");        
    String requestURL= nicePay.Get("requestURL");
    
    <?php
    $nicepay = new NicepayLib();
    
    //Ignore this function if you have invoice number.
    function generateReference()
    {
      $micro_date = microtime();
      $date_array = explode(" ",$microdate);
      $date = date("YmdHis",$date_array[1]);
      $date_array[0] = preg_replace('/[^\p{L}\p{N}\s]/u', '', $date_array[0]);
      return "Ref".$date.$date_array[0].rand(100,999);
    }
    
    if(isset($_POST['payMethod']) && $_POST['payMethod'] == '04'){
      //Populate Mandatory parameters to send
      $nicepay->set('payMethod', '05');
      $nicepay->set('currency', 'IDR');
      $nicepay->set('amt', 12000); //Total Gross Amount
      $nicepay->set('referenceNo',generateReference()); //Invoice Number or Reference Number Generated by Merchant
      $nicepay->set('description', 'Payment of Invoice No '.$nicepay->get('referenceNo'));//Transaction Description
    
      $nicepay->set('billingNm', 'John Doe'); //Customer name
      $nicepay->set('billingPhone', '02112345678'); //Customer phone number
      $nicepay->set('billingEmail', 'john@example.com');
      $nicepay->set('billingAddr', 'Jl. Jendral Sudirman No.28');
      $nicepay->set('billingCity', 'Jakarta Pusat');
      $nicepay->set('billingState', 'DKI Jakarta');
      $nicepay->set('billingPostCd', '10210');
      $nicepay->set('billingCountry', 'Indonesia');
    
      $nicepay->set('deliveryNm', 'John Doe'); //Delivery name
      $nicepay->set('deliveryPhone', '02112345678');
      $nicepay->set('deliveryEmail', 'john@example.com');
      $nicepay->set('deliveryAddr', 'Jl. Jendral Sudirman No.28');
      $nicepay->set('deliveryCity', 'Jakarta Pusat');
      $nicepay->set('deliveryState', 'DKI Jakarta');
      $nicepay->set('deliveryPostCd', '10210');
      $nicepay->set('deliveryCountry', 'Indonesia');
    
      //Send Data
      $response = $nicepay->requestClickPay();
    
      //Process response from NICEPAY
      if(isset($response->data->resultCd) && $response->data->resultCd == "0000"){
        header("Location: ".$response->data->requestURL."?tXid=".$response->tXid);
        //Please save your tXid in your database
      }elseif (isset($response->resultCd)) {
        // In this sample, we echo error message
        echo "<pre>";
        echo "result code    : ".$response->resultCd."\n";
        echo "result message : ".$response->resultMsg."\n";
        echo "</pre>";
      }else {
        // In this sample, we echo error message
        echo "<pre>Connection Timeout. Please Try Again.</pre>";
      }
    }
    ?>
    
    #Set Mandatory Value  
    NICEPay.payMethod = "05" #Set Payment Method  
    NICEPay.amt = "1000" #Total Gross Amount  
    NICEPay.referenceNo = str(random.randrange(111111, 999999)) #Invoice Number By Merchant  
    NICEPay.goodsNm = NICEPay.referenceNo #Goods Name  
    NICEPay.billingNm = "John Doe"  
    NICEPay.billingPhone = "02112345678"  
    NICEPay.billingEmail = "john@example.com"
    NICEPay.callBackUrl = "http://www.merchant.com/callback"  
    NICEPay.dbProcessUrl = "https://www.merchant.com/notification"  
    NICEPay.description = "Payment Of Ref No." + NICEPay.referenceNo  
    NICEPay.merchantToken = NICEPay.getMerchantToken()  
    NICEPay.userIP = NICEPay.getUserIp()  
    NICEPay.cartData = "{}" #Json Array Value
    
    #Payment Request
    resultData = NICEPay.apiRequest()
    
    #Payment Result  
    jsonResult = resultData[4:]  
    result = json.loads(jsonResult)
    
    #Payment Response String Format  
    print("resultCd : " + result['data']['resultCd'])  
    print("resultMsg : " + result['data']['resultMsg'])  
    print("requestURL: " + result['data']['requestURL'] + "?tXid=" + result['data']['tXid'])  
    print("tXid : " + result['data']['tXid'])
    

    Contoh API Response

    {
      "apiType": "M0",
      "tXid": "TESTIDTEST02201705261652026146",
      "requestDate": "20170526165202",
      "responseDate": "20170526165202",
      "data": {
        "tXid": "TESTIDTEST02201705261652026146",
        "resultCd": "0000",
        "resultMsg": "SUCCESS",
        "requestURL": "https://www.nicepay.co.id/nicepay/api/orderInquiry.do"
      }
    }
    

    Berikut contoh Pendaftaran Transaksi untuk E-Wallet

    Notice  
    payMethod 05
    Description E-Wallet


    Mandatory Parameter untuk E-Wallet

    Parameter Tipe Ukuran Deskripsi Contoh Data
    iMid AN 10 Merchant ID IONPAYTEST
    payMethod AN 2 Pay Method 05
    currency AN 3 Currency IDR
    amt N 12 Goods Amount 1000
    referenceNo ANS 40 Merchant Order No MerchantReferenceNumber001
    goodsNm AN 100 Goods Name Merchant Goods 1
    billingNm A 30 Billing Name Buyer Name
    billingPhone N 15 Billing Phone Number 02112345678
    billingEmail AN 40 Billing Email buyer@merchant.com
    callBackUrl AN 255 Payment Result Forward Url (On Browser) www.merchant.com/callback
    dbProcessUrl AN 255 Payment Result Receive Url (Server Side) www.merchant.com/dbprocess
    description AN 12 Description Description
    merchantToken AN 255 Merchant Token 6cfccfc0046773c1b589d8e98f8b596c284f3c70a4ecf86eba14c18944b74bcd
    cartData AN 4000 Cart Data (Json Format) {}
    userIP AN 15 User IP (Customer) 127.0.0.1


    Optional Parameter untuk E-Wallet

    Parameter Tipe Ukuran Deskripsi Contoh Data
    paymentExpDt N 8 Payment expiry date 20180326
    paymentExpTm N 6 Payment Expiry time 205959
    billingAddr AN 100 Billing Address Billing Address
    billingCity A 50 Billing City Jakarta
    billingState A 50 Billing State Jakarta
    billingPostCd N 10 Billing Post Number 12345
    billingCountry A 10 Billing Country Indonesia
    deliveryNm A 30 Delivery Name Buyer Name
    deliveryPhone N 15 Delivery Phone 02112345678
    deliveryAddr AN 100 Delivery Address Billing Address
    deliveryEmail AN   Delivery Email buyer@merchant.com
    deliveryCity A 50 Delivery City Jakarta
    deliveryState A 50 Delivery State Jakarta
    deliveryPostCd N 10 Delivery Post Number 12345
    deliveryCountry A 10 Delivery Country Indonesia
    vat N 12 Vat 0
    fee N 12 Service Tax 0
    notaxAmt N 12 Tax Free Amount 0
    reqDt N 8 Request Date(YYYYMMDD) 20160301
    reqTm N 6 Request Time(HH24MISS) 135959
    reqDomain AN 100 Request Domain merchant.com
    reqServerIP AN 15 Request Server IP 127.0.0.1
    reqClientVer AN 50 equest Client Version 1.0
    userSessionID AN 100 User Session ID userSessionID
    userAgent AN 100 User Agent Information Mozilla
    userLanguage AN 2 User Language en-US

    Halaman Pembayaran NICEPay

    Setelah Registrasi Transaksi, silakan redirect ke halaman pembayaran NICEPay.

       
    API url /nicepay/api/orderInquiry.do
    Metode URL POST
    Description Menampilkan Halaman Pembayaran untuk memproses transaksi.


    Request Parameter

    Parameter Mandatory Tipe Ukuran Deskripsi Contoh Data
    tXid Y AN 30 Transaction ID IONPAYTEST02201607291027025291
    optDisplayCB N N 2 Option display change button 0
    optDisplayBL N N 2 Option display back URL link 0
    mitraCd N AN 4 Mitra Code, refer Code at Here ALMA
    isCheckPaymentExptDt N N   Check Payment Expiry Date 1

    - Credit Card

    Berikut contoh Credit Card untuk NICEPay Payment Page

    Callback URL

    Response Parameter :

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result Code
    resultMsg AN 255 Result Message
    tXid AN 30 Transaction ID
    referenceNo ANS 40 Merchant Order No
    authNo N 10 Authorization Number
    amount N 12 Transaction Amount
    transDt N 8 Registration date
    transTm N 6 Registration time
    description AN 100 Transaction Description

    - Virtual Account

    Berikut contoh Virtual Account untuk NICEPay Payment Page

    Callback URL

    Response Parameter :

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result Code
    resultMsg AN 255 Result Message
    tXid AN 30 Transaction ID
    bankVacctNo N 20 Bank Virtual Account Number
    referenceNo ANS 40 Merchant Order No
    amount N 12 Transaction Amount
    transDt N 8 Registration date
    transTm N 6 Registration time
    bankCd A 4 Bank Code, refer Code at Here
    description AN 100 Transaction Description

    - Convenience Store

    Berikut contoh Convenience Store untuk NICEPay Payment Page

    Callback URL

    Response Parameter :

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result Code
    resultMsg AN 255 Result Message
    tXid AN 30 Transaction ID
    referenceNo ANS 40 Merchant Order No
    amount N 12 Transaction Amount
    transDt N 8 Registration date
    transTm N 6 Registration time
    payNo A 16 Payment Number
    mitraCd A 4 Mitra Code, refer Code at Here

    - ClickPay

    Berikut contoh ClickPay untuk NICEPay Payment Page

    Callback URL

    Response Parameter :

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result Code
    resultMsg AN 255 Result Message
    tXid AN 30 Transaction ID
    referenceNo ANS 40 Merchant Order No
    amount N 12 Transaction Amount
    transDt N 8 Registration date
    transTm N 6 Registration time
    receiptCode ANS 20 Authorization Number

    - E-Wallet

    Berikut contoh E-Wallet untuk NICEPay Payment Page

    Callback URL

    Response Parameter :

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result Code
    resultMsg AN 255 Result Message
    tXid AN 30 Transaction ID
    referenceNo ANS 40 Merchant Order No
    amount N 12 Transaction Amount
    transDt N 8 Registration date
    transTm N 6 Registration time

    Enterprise - Credit Card

    Integration Step :

    1. Merchant meminta Token
    2. Merchant meminta 3DS Secure / MIGS Secure
    3. Customer input OTP
    4. Merchant meminta OnePass (Registrasi)
    5. NICEPay mengirim notifikasi
    6. Merchant menangani notifikasi

    Credit Card Flow

    Flow untuk Enterprise - Credit Card

    Request Token

    // Payment Mandatory Field  
    nicePay.setCardNo("5409123456789123");  
    nicePay.setCardExpYymm("2012");  
    nicePay.setAmt ("10000");  
    nicePay.setReferenceNo ("ABC123");  
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getReferenceNo())); 
    
    // Payment Request  
    nicePay.transactionToken();  
    
    // Payment Response  
    String responseString = nicePay.getResponseString()); // JSON in String format  
    Hashtable<String, String> HTResponse = nicePay.getHtResponse(); // JSON in HashTable<String, String> format   
    16.   
    String resultCd = nicePay.Get("resultCd");         
    String resultMsg = nicePay.Get("resultMsg");         
    String cardToken= nicePay.Get("cardToken");         
    String paymentType= nicePay.Get("paymentType");
    

    Sample POST

    api/onePassToken.do?jsonData={"iMid":"IONPAYTEST","referenceNo":"OrdNo20160525000-52104","amt":"1000","cardNo":"1234567890123456","cardExpYymm":"1612","merchantToken":"141fd2368aa80ea0e600b1b4d7a42c1e731e74a27a03521e8e28150cc00bc05b"}  
    

    Contoh JSON response

    {
        "resultCd": "0000",
        "cardToken": "ed5ce66bf69926c52cfa237c56fb38601f7c08985d385e615971a268b510db75",
        "resultMsg": "SUCCESS",
        "paymentType": "3"
    }
    
    Code Deskripsi.
    1 3D Secure
    2 KeyIn (process to CC Registration)
    3 MIGS Request

    Merchant perlu meminta token untuk setiap transaksi Kartu Kredit yang mengunakan NICEPay Enterprise.
    Setiap satu transaksi, membutuhkan satu token.

       
    API url /nicepay/api/onePassToken.do
    Metode POST
    Description Meminta Token Kartu Kredit
    Merchant Token SHA256 (Merchant ID + Reference Number + Amount + Merchant Key)


    Parameter Request Object

    Parameter Mandatory Tipe Ukuran Deskripsi Contoh Data
    iMid Y AN 10 Merchant ID IONPAYTEST
    merchantToken Y AN 255 Merchant Token c69fd0a2e36fb9d97fc8418f6b22699143a1177e570769dac2cf4d2008558946
    cardNo Y N   Card number 5409123456789123
    cardExpYYmm Y N 4 Card expiry (YYMM) 2012
    cardHolderNm Y (CIMB) AN 50 Card holder name
    amt Y N 12 Payment amount 10000
    referenceNo Y ANS 40 Merchant Order Number ABC123
    instmntType N N 2 Installment Type. Refer Code at Here 1
    instmntMon N N 2 Installment month 1


    Response Json Object

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 result code
    resultMsg AN 255 result message
    cardToken AN 64 one time use transaction token
    paymentType N 1 CC Authorization type

    3DS Request

    Contoh URL Parameter 3DS Request

    https://www.nicepay.co.id/nicepay/api/secureVeRequest.do?country=360&callbackUrl={callbackUrl}&onePassToken={onePassToken}
    

    Contoh URL Parameter 3DS Response

    http://merchant.com/callbackUrl?resultCd={resultCd}&resultMsg={resultMsg}&referenceNo={referenceNo}&merchantToken={merchantToken}
    

    Gunakan API ini saat anda mendapat respon paymentType='1' setelah proses Request Token integration Step:

    1. Kirim parameter termasuk URL.
    2. Halaman Popup akan redirect ke Halaman 3DS Bank
    3. Customer akan input OTP
    4. NICEPay akan mengirim respon parameter ke callbackUrl

       
    API url /nicepay/api/secureVeRequest.do
    Metode Popup Page
    Description proses selanjutnya untuk onePassToken.do ketika mendapat respon paymentType='1'


    Request Parameter URL

    Parameter Mandatory Tipe Ukuran Deskripsi Contoh Data
    country Y N 3 Currency code 360
    callbackUrl Y AN 200 Callback Url for result http://merchant.com/callback
    onePassToken Y AN 64 one time use transaction token c5bd0b91bcc3d21358cd004c60e54579441c23aa8e7553b41ce3402db1113fff


    Response Parameter URL

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result code
    resultMsg AN 255 Result message
    referenceNo ANS 40 Merchant Order Number
    merchantToken AN 255 Merchant Token

    MIGS Request

    Contoh URL Parameter 3DS Request

    https://www.nicepay.co.id/nicepay/api/migsRequest.do?instmntType=1&instmntMon=1&referenceNo={referenceNo}&cardCvv={cardCvv}&callbackUrl={callbackUrl}&onePassToken={onePassToken}
    

    Contoh URL Parameter 3DS Response

    http://merchant.com/callbackUrl?resultCd={resultCd}&resultMsg={resultMsg}
    

    Gunakan API ini saat anda menerima respon paymentType='3' setelah proses untuk Request Token integration Step:

    1. Kirim parameter termasuk URL
    2. Halaman Popup akan redirect ke Halaman MIGS Bank
    3. Customer akan input OTP
    4. NICEPay akan mengirim respon parameter ke callbackUrl

       
    API url /nicepay/api/migsRequest.do
    Metode Popup Page
    Deskripsi Proses selanjutnya untuk onePassToken.do ketika mendapat respon paymentType='3'


    Request Parameter URL

    Parameter Mandatory Tipe Ukuran Deskripsi Contoh Data
    instmntType N N 2 Installment Type . Refer Code at Here 1
    instmntMon N N 2 Installment Month 12
    referenceNo Y ANS 40 Merchant Order Number ref12345
    cardCvv N N 3 Card CVV 123
    callbackUrl Y AN 200 Callback Url for result http://merchant.com
    onePassToken Y AN 64 one time use transaction token c5bd0b91bcc3d21358cd004c60e54579441c23aa8e7553b41ce3402db1113fff


    Response Parameter URL

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result code
    resultMsg AN 255 Result message

    Registrasi Kartu Kredit

    // Payment Mandatory Field    
    nicePay.setPayMethod("01");    
    nicePay.setCurrency("IDR");    
    nicePay.setAmt("1000");    
    nicePay.setInstmntMon("1");    
    nicePay.setReferenceNo("MerchantReferenceNumber001");    
    nicePay.setGoodsNm("Merchant Goods 1");    
    nicePay.setBillingNm("Buyer Name");    
    nicePay.setBillingEmail("buyer@merchant.com");    
    nicePay.setBillingPhone("02112345678");    
    nicePay.setBillingAddr("Billing Address");    
    nicePay.setBillingCity("Jakarta");    
    nicePay.setBillingState("Jakarta");    
    nicePay.setBillingPostCd("12345");    
    nicePay.setBillingCountry("Indonesia");    
    nicePay.setDeliveryNm("Buyer Name ");    
    nicePay.setDeliveryPhone("02112345678");    
    nicePay.setDeliveryAddr("Billing Address ");    
    nicePay.setDeliveryCity("Jakarta ");    
    nicePay.setDeliveryState("Jakarta ");    
    nicePay.setDeliveryPostCd("12345");    
    nicePay.setDeliveryCountry("Indonesia ");    
    nicePay.setCallBackUrl(merchantDomain + "callback");    
    nicePay.setDbProcessUrl(merchantDomain + "dbprocess");    
    nicePay.setVat("0");    
    nicePay.setFee("0");    
    nicePay.setNotaxAmt("0");    
    nicePay.setDescription("Description");    
    nicePay.setUserIP("127.0.0.1");    
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getReferenceNo()));    
    nicePay.setCartData("{}");   
    nicePay.setInstmntMon("1");    
    nicePay.setInstmntType("1");
    nicePay.setRecurrOpt(0); // for Recurring
    nicePay.setCardCvv("123");
    nicePay.setOnePassToken("9338d54573688ae18e175240b0257de48d89c6ef1c9c7b5c094dc4beed9e435f");
    nicePay.setCardExpYymm("2012")
    
    // Payment Optional Field    
    nicePay.setReqDt("20160301");    
    nicePay.setReqTm("135959");    
    nicePay.setReqDomain("merchant.com");    
    nicePay.setReqServerIP("127.0.0.1");    
    nicePay.setReqClientVer("1.0");    
    nicePay.setUserSessionID("userSessionID");    
    nicePay.setUserAgent("Mozilla");    
    nicePay.setUserLanguage("en-US");    
    nicePay.setMerFixAcctId("9999000000000001");    
    nicePay.setPaymentExpiryDt("20160303");    
    nicePay.setPaymentExpiryTm("135959");
    
    // Payment Request    
    nicePay.payment();  
    
    // Payment Response    
    System.out.println("Response String : " + nicePay.getResponseString()); // JSON in String format    
    
    String resultCd = nicePay.Get("resultCd");           
    String resultMsg = nicePay.Get("resultMsg");           
    String tXid= nicePay.Get("tXid ");        
    String referenceNo= nicePay.Get("referenceNo");  
    String authNo= nicePay.Get("authNo");          
    String payMethod= nicePay.Get("payMethod");     
    String amount= nicePay.Get("amount");    
    String transDt = nicePay.Get("transDt ");           
    String transTm = nicePay.Get("transTm ");           
    String description= nicePay.Get("description");           
    String callbackUrl= nicePay.Get("callbackUrl");
    
    protected void CheckOutCC(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(TbillingNm.Text) && !string.IsNullOrEmpty(onePassToken.Text) )
        {
            objNicepay.currency = "IDR";
            //Populate Mandatory parameters to send
            // payment type
            objNicepay.PayMethod = "01";
            // Total gross amount
            objNicepay.amt = "100";
            // Invoice Number or Referenc Number Generated by merchant
            objNicepay.referenceNo = generateReference();
            objNicepay.description = "Payment Invoice No. " + objNicepay.referenceNo;
            // Transaction description
            objNicepay.billingNm = "Donald Duck";
            objNicepay.billingPhone = "021987456321";
            objNicepay.billingEmail = "donald@duck.com";
            objNicepay.billingAddr = "King of money street";
            objNicepay.billingCity = "King";
            objNicepay.billingState = "Money";
            objNicepay.billingPostCd = "123654";
            objNicepay.billingCountry = "Indonesia";
    
            objNicepay.deliveryNm = "Donald Duck";
            objNicepay.deliveryPhone = "021987456321";
            objNicepay.deliveryEmail = "donald@duck.com";
            objNicepay.deliveryAddr = "King of money street";
            objNicepay.deliveryCity = "King";
            objNicepay.deliveryState = "Money";
            objNicepay.deliveryPostCd = "123654";
            objNicepay.deliveryCountry = "Indonesia";
    
            objNicepay.onePassToken = onePassToken.Text;
            objNicepay.cardExpYymm = TcardExpYymm.Text;
            objNicepay.cardCvv = TcardCvv.Text;
    
            objResult = objNicepayClass.ChargeCard(objNicepay);
    
            if (!string.IsNullOrEmpty(objResult.data.resultCd) & objResult.data.resultCd == "0000")
            {
                Tresult.InnerText = objResult.resultCd;
                TtXid.InnerText = objResult.data.tXid;
                TcallbackUrl.InnerText = objResult.callbackUrl;
                Tdescription.InnerText = objResult.description;
                TreferenceNo.InnerText = objResult.referenceNo;
                TpayMethod.InnerText = objResult.payMethod;
                //YYMMDD
                TtransDT.InnerText = objResult.transDt;
                //HH24MISS
                TTranstm.InnerText = objResult.transTm;
                TresultMsg.InnerText = objResult.resultMsg;
                wrapper.Visible = false;
                Myresult.Visible = true;
            }
            else if (objResult.resultCd != null)
            {
                EresultCd.InnerText = objResult.resultCd;
                EresultMsg.InnerText = objResult.resultMsg;
                wrapper.Visible = false;
                ErrData.Visible = true;
            }
            else
            {
                //Timeout, you can redirect back to checkout page Or echo error message.
                //In this sample, we echo error message
                ERR_.InnerText = "Connection Timeout. Please Try again.";
                wrapper.Visible = false;
                ERR.Visible = true;
            }
        }
    }
    
    <?php
    // Include Config File  
    include_once "lib/NicepayLib.php";  
    $nicepay = new NicepayLib();  
    
    function generateReference()  
    {  
        $micro_date = microtime();  
        $date_array = explode(" ",$micro_date);  
        $date = date("YmdHis",$date_array[1]);  
        $date_array[0] = preg_replace('/[^\p{L}\p{N}\s]/u', '', $date_array[0]);  
        return "Ref".$date.$date_array[0].rand(100,999);  
    }  
    
    if(isset($_POST['payMethod'])  
        && $_POST['payMethod'] == '01'  
        && isset($_POST['billingNm'])  
        && $_POST['billingNm']  
        && isset($_POST['onePassToken'])  
        && $_POST['onePassToken']  
      )  
    {  
      $billingNm      = $_POST['billingNm'];  
      $onePassToken   = $_POST['onePassToken'];  
      $cardExpYymm    = $_POST['cardExpYymm'];  
      $cardCvv        = $_POST['cardCvv'];  
      $referenceNo    = $_POST['referenceNo'];  
    
      // Populate Mandatory parameters to send  
      $nicepay->set('payMethod', '01');  
      $nicepay->set('currency', 'IDR');  
      $nicepay->set('amt', 10000); // Total gross amount  
      $nicepay->set('referenceNo', $referenceNo); // Invoice Number or Reference Number Generated by merchant  
      $nicepay->set('description', 'Payment of Invoice No '.$nicepay->get('referenceNo')); // Transaction description  
    
      $nicepay->set('billingNm', 'John Doe'); // Customer name  
      $nicepay->set('billingPhone', '02112345678'); // Customer phone number  
      $nicepay->set('billingEmail', 'john@example.com'); //  
      $nicepay->set('billingAddr', 'Jl. Jend. Sudirman No. 28');  
      $nicepay->set('billingCity', 'Jakarta Pusat');  
      $nicepay->set('billingState', 'DKI Jakarta');  
      $nicepay->set('billingPostCd', '10210');  
      $nicepay->set('billingCountry', 'Indonesia');  
    
      $nicepay->set('deliveryNm', 'John Doe'); // Delivery name  
      $nicepay->set('deliveryPhone', '02112345678');  
      $nicepay->set('deliveryEmail', 'john@example.com');  
      $nicepay->set('deliveryAddr', 'Jl. Jend. Sudirman No. 28');  
      $nicepay->set('deliveryCity', 'Jakarta Pusat');  
      $nicepay->set('deliveryState', 'DKI Jakarta');  
      $nicepay->set('deliveryPostCd', '10210');  
      $nicepay->set('deliveryCountry', 'Indonesia');  
      $nicepay->set('onePassToken', $onePassToken);  
      $nicepay->set('cardExpYymm', $cardExpYymm);  
      $nicepay->set('cardCvv', $cardCvv);  
    
      // Send Data  
      $response = $nicepay->chargeCard();  
    
      // Response from NICEPAY  
      if (isset($response->resultCd) && $response->resultCd == "0000") {  
        echo "<pre>";  
        echo "tXid              : $response->tXid\n";  
        echo "callbackUrl       : $response->callbackUrl\n";  
        echo "description       : $response->description\n";  
        echo "payment date      : $response->transDt\n"; // YYYYMMDD  
        echo "payment time      : $response->transTm\n"; // HH24MISS  
        echo "result code       : $response->resultCd\n";  
        echo "result message    : $response->resultMsg\n";  
        echo "reference no      : $response->referenceNo\n";  
        echo "payment method    : $response->payMethod\n";  
        echo "recurring token   : $response->recurringToken";  
        echo "</pre>";  
      } elseif(isset($response->resultCd)) {  
        // API data not correct or error happened in bank system, you can redirect back to checkout page or echo error message.  
        // In this sample, we echo error message  
        echo "<pre>";  
        echo "Oops! Something happened, please notice your system administrator.\n\n";  
        echo "result code       : $response->resultCd\n";  
        echo "result message    : $response->resultMsg\n";  
        echo "</pre>";  
      } else {  
        // Timeout, you can redirect back to checkout page or echo error message.  
        // In this sample, we echo error message  
        echo "<pre>Connection Timeout. Please Try again.</pre>";  
      }  
    }
    ?>
    
    import json  
    
    from nicepay import NICEPay  
    
    #Set MID & Merchant Key  
    NICEPay.iMid = "BMRITEST01" #Set Merchant ID  
    NICEPay.merchantKey = "33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A==" #Set Merchant Key  
    
    #Set Mandatory Value  
    NICEPay.payMethod = "01" #Set Payment Method  
    NICEPay.amt = "100" #Total Gross Amount  
    NICEPay.referenceNo = "NiceTest00003" #Invoice Number By Merchant  
    NICEPay.goodsNm = NICEPay.referenceNo #Goods Name  
    NICEPay.billingNm = "John Doe"  
    NICEPay.billingPhone = "02112345678"  
    NICEPay.billingEmail = "john@example.co`m"  
    NICEPay.billingAddr = "Jl. Jend. Sudirman No. 28"  
    NICEPay.billingCity = "Jakarta Pusat"  
    NICEPay.billingState = "DKI Jakarta"  
    NICEPay.billingPostCd = "10210"  
    NICEPay.billingCountry = "Indonesia"  
    NICEPay.callBackUrl = "http://example.com/callback"  
    NICEPay.dbProcessUrl = "https://example.com/notification-handler.php"  
    NICEPay.description = "Payment Of Ref No." + NICEPay.referenceNo  
    NICEPay.merchantToken = NICEPay.getMerchantToken()  
    NICEPay.userIP = NICEPay.getUserIp()  
    NICEPay.cartData = "{}" #Json Array Value
    NICEPay.instmntMon = "1"  
    NICEPay.instmntType = "1"  
    NICEPay.cardCvv = "321"  
    NICEPay.ccOnePassToken = "e76b6b65dbd4a854699ee8628f0cf62916a16216bb133902d75159593fc1ed08"
    
    # // Payment Request    
    resultData = NICEPay.apiRequest()  
    result = json.loads(resultData)  
    
    #Payment Response String Format  
    try:  
        result['resultCd']  
    except NameError:  
        print "Connection Timeout. Please Try Again!"  
    else:  
        if result['resultCd'] == '0000':  
            print("resultCd : " + result['resultCd'])  
            print("resultMsg : " + result['resultMsg'])  
            print("tXid : " + result['tXid'])  
            print("referenceNo : " + result['referenceNo'])  
            print("payMethod : " + result['payMethod'])  
            print("amount : " + result['amount'])  
            print("transDt : " + result['transDt'])  
            print("transTm : " + result['transTm'])  
            print("description : " + result['description'])  
            print("callbackUrl : " + result['callbackUrl'])
            print("authNo : " + result['authNo'])
        else:  
            print("resultCd : " + result['resultCd'])  
            print("resultMsg : " + result['resultMsg'])
    

    Contoh JSON Response

    {
      "resultCd": "0000",
      "amount": "1000",
      "authNo": "005911",
      "referenceNo": "Ref20170526111736065300000988",
      "transTm": "112041",
      "recurringToken": "",
      "tXid": "BMRITEST0101201705261120395118",
      "description": "Payment Of Ref No.Ref20170526111736065300000988",
      "cardNo": "123456******3456",
      "resultMsg": "SUCCESS",
      "payMethod": "01",
      "callbackUrl": "http://www.merchant.com/ExampleCallback",
      "transDt": "20170526",
      "issuBankCd": "CENA",
      "issuBankNm": "PT Bank Central Asia, TBK",
      "acquBankCd": "BMRI",
      "acquBankNm": "PT Bank Mandiri (Persero)"
    }
    
       
    API url /nicepay/api/onePass.do
    Metode POST
    Description Credit Card Transaction
    Merchant Token SHA256 (Merchant ID + Reference Number + Amount + Merchant Key)

    Request POST Parameter

    Parameter Mandatory Tipe Ukuran Deskripsi Contoh Data
    iMid Y AN 10 Merchant ID IONPAYTEST
    payMethod Y AN 2 Pay Method 01
    currency Y AN 3 Currency IDR
    amt Y N 12 Goods Amount 1000
    referenceNo Y ANS 40 Merchant Order No MerchantReferenceNumber001
    goodsNm Y AN 100 Goods Name Merchant Goods 1
    billingNm Y A 30 Billing Name Buyer Name
    billingPhone Y N 15 Billing Phone Number 02112345678
    billingEmail Y AN 40 Billing Email buyer@merchant.com
    billingCity Y A 50 Billing City Jakarta
    billingState Y A 50 Billing State Jakarta
    billingPostCd Y N 10 Billing Post Number 12345
    billingCountry Y A 10 Billing Country Indonesia
    callBackUrl Y AN 255 Payment Result Forward Url (On Browser) www.merchant.com/callback
    dbProcessUrl Y AN 255 Payment Result Receive Url (Server Side) www.merchant.com/dbprocess
    description Y AN 100 Description Description
    merchantToken Y AN 255 Merchant Token 6cfccfc0046773c1b589d8e98f8b596c284f3c70a4ecf86eba14c18944b74bcd
    userIP Y AN 15 User IP (Customer) 127.0.0.1
    cartData Y AN 4000 Cart Data (Json Format) {}
    instmntType Y N 2 Installment Type. Refer Code at Here 1
    instmntMon Y N 2 Installment Month 1
    cardCvv Y N 3 Card CVV 123
    onePassToken Y AN   One time use transaction token(Created by onePassToken.do) 9338d54573688ae18e175240b0257de48d89c6ef1c9c7b5c094dc4beed9e435f
    recurrOpt Y N 2 Recurring option
    0: Automatic Cancel
    1: Do not cancel
    2: Do not make token
    1
    billingAddr N AN AN Billing Address Billing Address
    deliveryNm N A 30 Delivery Name Buyer Name
    deliveryPhone N N 15 Delivery Phone 02112345678
    deliveryAddr N AN 100 Delivery Address Billing Address
    deliveryEmail N AN   Delivery Email buyer@merchant.com
    deliveryCity N A 50 Delivery City Jakarta
    deliveryState N A 50 Delivery State Jakarta
    deliveryPostCd N N 10 Delivery Post Number 12345
    deliveryCountry N A 10 Delivery Country Indonesia
    vat N N 12 Vat 0
    fee N N 12 Service Tax 0
    notaxAmt N N 12 Tax Free Amount 0
    reqDt N N 8 Request Date(YYYYMMDD) 20160301
    reqTm N N 6 Request Time(HH24MISS) 135959
    reqDomain N AN 100 Request Domain merchant.com
    reqServerIP N AN 15 Request Server IP 127.0.0.1
    reqClientVer N AN 50 equest Client Version 1.0
    userSessionID N AN 100 User Session ID userSessionID
    userAgent N AN 100 User Agent Information Mozilla
    userLanguage N AN 2 User Language en-US


    Response JSON Object

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result Code
    resultMsg AN 255 Result Message
    tXid AN 30 Transaction ID
    referenceNo ANS 40 Merchant Order No
    payMethod N 2 Payment Method. Refer Code at Here
    amount N 12 Transaction Amount
    currency AN 3 Currency
    goodsNm N 100 Goods Name
    billingNm N 30 Buyer Name
    transDt N 8 Transaction date (YYYYMMDD)
    transTm N 6 Transaction time (HH24MISS)
    description N 100 Transaction description
    callbackUrl N 100 Callback Url
    authNo N 10 Authorization Number
    issuBankCd N 4 Issue Bank Code. Refer Code at Here
    issuBankNm A   Issue Bank Name.
    acquBankCd N 4 Acquire Bank Code. Refer Code at Here
    acquBankNm A   Acquire Bank Name.
    cardNo N 20 Card Number (Masked)
    instmntMon N 2 Installment month
    istmntType N 2 Installment type. Refer Code at Here
    recurringToken N 64 Token for Recurring Payment
    preauthToken N 64 Token for Preauth Payment
    ccTransType N 2 Credit Card Transaction Type
    vat N 12 Vat number
    fee N 12 Service fee
    notaxAmt N 12 Tax free amount

    Enterprise - Virtual Account

    NICEPay menawarkan Virtual Account sebagai metode pembayaran. Dengan menggunakan metode ini, nasabah akan memiliki pilihan untuk melakukan pembayaran melalui ATM, SMS Banking, Internet Banking, atau Mobile Banking. Pemberitahuan Real Time akan dikirim saat pelanggan menyelesaikan pembayaran.
    Bank yang Didukung oleh NICEPay:

    1. Bank Mandiri
    2. Bank International Indonesia Maybank
    3. Bank Permata
    4. Bank Central Asia (BCA)
    5. Bank Negara Indonesia 46 (BNI)
    6. Bank KEB Hana Indonesia
    7. Bank Rakyat Indonesia (BRI)
    8. Bank CIMB Niaga
    9. Bank DANAMON

    NICEPay juga mendukung Virtual Account (VA) untuk bank lain melalui ATM BERSAMA, ALTO, LINK, and PRIMA.

    Integration Step :

    1. Merchant meminta registrasi VA ke NICEPay.
    2. Merchant menampilkan detail VA dan customer journey, kemudian mengirimkan detail VA melalui email / sms / riwayat transaksi nasabah.
    3. Pelanggan membayarkan VA di saluran pembayaran yang diinginkan.
    4. NICEPay kirim notifikasi.
    5. Merchant handle notifikasi.

    VA Flow

    Flow untuk Enterprise - Virtual Account

    Registrasi VA

    // Payment Mandatory Field    
    nicePay.setPayMethod("02");    
    nicePay.setCurrency("IDR");    
    nicePay.setAmt("1000");    
    nicePay.setReferenceNo("MerchantReferenceNumber001");
    nicePay.setBankCd("BMRI");  
    nicePay.setGoodsNm("Merchant Goods 1");    
    nicePay.setBillingNm("Buyer Name");    
    nicePay.setBillingEmail("buyer@merchant.com");    
    nicePay.setBillingPhone("02112345678");    
    nicePay.setBillingAddr("Billing Address");    
    nicePay.setBillingCity("Jakarta");    
    nicePay.setBillingState("Jakarta");    
    nicePay.setBillingPostCd("12345");    
    nicePay.setBillingCountry("Indonesia");    
    nicePay.setDeliveryNm("Buyer Name ");    
    nicePay.setDeliveryPhone("02112345678");    
    nicePay.setDeliveryAddr("Billing Address ");    
    nicePay.setDeliveryCity("Jakarta ");    
    nicePay.setDeliveryState("Jakarta ");    
    nicePay.setDeliveryPostCd("12345");    
    nicePay.setDeliveryCountry("Indonesia ");    
    nicePay.setCallBackUrl(merchantDomain + "callback");    
    nicePay.setDbProcessUrl(merchantDomain + "dbprocess");    
    nicePay.setVat("0");    
    nicePay.setFee("0");    
    nicePay.setNotaxAmt("0");    
    nicePay.setDescription("Description");    
    nicePay.setUserIP("127.0.0.1");    
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getReferenceNo()));    
    nicePay.setCartData("{}");
    
    // Payment Optional Field    
    nicePay.setReqDt("20160301");    
    nicePay.setReqTm("135959");    
    nicePay.setReqDomain("merchant.com");    
    nicePay.setReqServerIP("127.0.0.1");    
    nicePay.setReqClientVer("1.0");    
    nicePay.setUserSessionID("userSessionID");    
    nicePay.setUserAgent("Mozilla");    
    nicePay.setUserLanguage("en-US");    
    nicePay.setMerFixAcctId("9999000000000001");    
    nicePay.setPaymentExpiryDt("20160303");    
    nicePay.setPaymentExpiryTm("135959");
    nicePay.setVacctValidDt("20160303");    
    nicePay.setVacctValidTm("135959");
    
    
    // Payment Request    
    nicePay.payment();  
    
    // Payment Response    
    System.out.println("Response String : " + nicePay.getResponseString()); // JSON in String format    
    
    String resultCd = nicePay.Get("resultCd");           
    String resultMsg = nicePay.Get("resultMsg");           
    String tXid= nicePay.Get("tXid ");        
    String referenceNo= nicePay.Get("referenceNo");
    String bankVacctNo= nicePay.Get("bankVacctNo");              
    String payMethod= nicePay.Get("payMethod");     
    String amount= nicePay.Get("amount");    
    String transDt = nicePay.Get("transDt ");           
    String transTm = nicePay.Get("transTm ");           
    String description= nicePay.Get("description");           
    String callbackUrl= nicePay.Get("callbackUrl");
    
    protected void CheckOut(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(BankCd.SelectedValue))
        {
            objNicepay.currency = "IDR";
            objNicepay.BankCd = BankCd.SelectedValue;
            objNicepay.DateNow = DateTime.Now.ToString("yyyymmdd");
            // Set VA expiry date +1 day (optional)
            objNicepay.vaExpDate = DateTime.Now.AddDays(1).ToString("yyyymmdd");
            //Populate Mandatory parameters to send
            // payment type Bank
            objNicepay.PayMethod = "02";
            // Total gross amount
            objNicepay.amt = "100";
            // Invoice Number or Referenc Number Generated by merchant
            objNicepay.referenceNo = generateReference();
            objNicepay.description = "Payment Invoice No. " + objNicepay.referenceNo;
            // Transaction description
            objNicepay.billingNm = "Donald Duck";
            objNicepay.billingPhone = "021987456321";
            objNicepay.billingEmail = "donald@duck.com";
            objNicepay.billingAddr = "King of money street";
            objNicepay.billingCity = "King";
            objNicepay.billingState = "Money";
            objNicepay.billingPostCd = "123654";
            objNicepay.billingCountry = "Indonesia";
    
            objNicepay.deliveryNm = "Donald Duck";
            objNicepay.deliveryPhone = "021987456321";
            objNicepay.deliveryEmail = "donald@duck.com";
            objNicepay.deliveryAddr = "King of money street";
            objNicepay.deliveryCity = "King";
            objNicepay.deliveryState = "Money";
            objNicepay.deliveryPostCd = "123654";
            objNicepay.deliveryCountry = "Indonesia";
    
            objNicepay.vacctValidDt = objNicepay.vaExpDate;
            objNicepay.vacctValidTm = DateTime.Now.ToString("hhmmss");
    
            objResult = objNicepayClass.CreateVA(objNicepay);
    
            if (objResult.resultCd == "0000")
            {
                Tresult.InnerText = objResult.resultCd;
                TtXid.InnerText = objResult.tXid;
                TcallbackUrl.InnerText = objResult.callbackUrl;
                Tdescription.InnerText = objResult.description;
                TreferenceNo.InnerText = objResult.referenceNo;
                TpayMethod.InnerText = objResult.payMethod;
                //YYMMDD
                TtransDT.InnerText = objResult.transDt;
                //HH24MISS
                TTranstm.InnerText = objResult.transTm;
                tbankVacctNo.InnerText = objResult.bankVacctNo;
                TresultMsg.InnerText = objResult.resultMsg;
                wrapper.Visible = false;
                Myresult.Visible = true;
            }
            else if (objResult.resultCd != null)
            {
                //API data Not correct, you can redirect back to checkout page Or echo error message.
                //In this sample, we echo error message
                EresultCd.InnerText = objResult.resultCd;
                EresultMsg.InnerText = objResult.resultMsg;
                wrapper.Visible = false;
                ErrData.Visible = true;
            }
            else
            {
                //Timeout, you can redirect back to checkout page Or echo error message.
                //In this sample, we echo error message
                ERR_.InnerText = "Connection Timeout. Please Try again.";
                wrapper.Visible = false;
                ERR.Visible = true;
            }
    
        }
    
    }
    
    <?php
    // Include Config File  
    include_once "lib/NicepayLib.php";  
    $nicepay = new NicepayLib();  
    
    function generateReference()  
    {  
        $micro_date = microtime();  
        $date_array = explode(" ",$micro_date);  
        $date = date("YmdHis",$date_array[1]);  
        $date_array[0] = preg_replace('/[^\p{L}\p{N}\s]/u', '', $date_array[0]);  
        return "Ref".$date.$date_array[0].rand(100,999);  
    }  
    
    if(isset($_POST['payMethod']) && $_POST['payMethod'] == '02'  
        && isset($_POST['bankCd']) && $_POST['bankCd'])  
    {  
      $billingNm      = $_POST['billingNm'];
      $referenceNo    = $_POST['referenceNo'];  
      $bankCd         = $_POST['bankCd'];
    
      // Populate Mandatory parameters to send  
      $nicepay->set('payMethod', '02');  
      $nicepay->set('currency', 'IDR');  
      $nicepay->set('amt', 10000); // Total gross amount  
      $nicepay->set('referenceNo', $referenceNo); // Invoice Number or Reference Number Generated by merchant  
      $nicepay->set('description', 'Payment of Invoice No '.$nicepay->get('referenceNo')); // Transaction description  
      $nicepay->set('bankCd', $bankCd);
    
      $nicepay->set('billingNm', 'John Doe'); // Customer name  
      $nicepay->set('billingPhone', '02112345678'); // Customer phone number  
      $nicepay->set('billingEmail', 'john@example.com'); //  
      $nicepay->set('billingAddr', 'Jl. Jend. Sudirman No. 28');  
      $nicepay->set('billingCity', 'Jakarta Pusat');  
      $nicepay->set('billingState', 'DKI Jakarta');  
      $nicepay->set('billingPostCd', '10210');  
      $nicepay->set('billingCountry', 'Indonesia');  
    
      $nicepay->set('deliveryNm', 'John Doe'); // Delivery name  
      $nicepay->set('deliveryPhone', '02112345678');  
      $nicepay->set('deliveryEmail', 'john@example.com');  
      $nicepay->set('deliveryAddr', 'Jl. Jend. Sudirman No. 28');  
      $nicepay->set('deliveryCity', 'Jakarta Pusat');  
      $nicepay->set('deliveryState', 'DKI Jakarta');  
      $nicepay->set('deliveryPostCd', '10210');  
      $nicepay->set('deliveryCountry', 'Indonesia');
    
      // Send Data  
      $response = $nicepay->requestVA();  
    
      // Response from NICEPAY  
      if (isset($response->resultCd) && $response->resultCd == "0000") {  
        echo "<pre>";  
        echo "tXid              : $response->tXid\n";  
        echo "callbackUrl       : $response->callbackUrl\n";  
        echo "description       : $response->description\n";  
        echo "payment date      : $response->transDt\n"; // YYYYMMDD  
        echo "payment time      : $response->transTm\n"; // HH24MISS  
        echo "virtual account   : $response->bankVacctNo\n";  
        echo "result code       : $response->resultCd\n";  
        echo "result message    : $response->resultMsg\n";  
        echo "reference no      : $response->referenceNo\n";  
        echo "payment method    : $response->payMethod\n";
        echo "</pre>";  
      } elseif(isset($response->resultCd)) {  
        // API data not correct or error happened in bank system, you can redirect back to checkout page or echo error message.  
        // In this sample, we echo error message  
        echo "<pre>";  
        echo "Oops! Something happened, please notice your system administrator.\n\n";  
        echo "result code       : $response->resultCd\n";  
        echo "result message    : $response->resultMsg\n";  
        echo "</pre>";  
      } else {  
        // Timeout, you can redirect back to checkout page or echo error message.  
        // In this sample, we echo error message  
        echo "<pre>Connection Timeout. Please Try again.</pre>";  
      }  
    }
    ?>
    
    import json  
    
    from nicepay import NICEPay  
    
    #Set MID & Merchant Key  
    NICEPay.iMid = "BMRITEST01" #Set Merchant ID  
    NICEPay.merchantKey = "33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A==" #Set Merchant Key  
    
    #Set Mandatory Value  
    NICEPay.payMethod = "02" #Set Payment Method  
    NICEPay.amt = "1000" #Total Gross Amount  
    NICEPay.referenceNo = "NiceTest00003" #Invoice Number By Merchant  
    NICEPay.goodsNm = NICEPay.referenceNo #Goods Name  
    NICEPay.billingNm = "John Doe"  
    NICEPay.billingPhone = "02112345678"  
    NICEPay.billingEmail = "john@example.co`m"  
    NICEPay.billingAddr = "Jl. Jend. Sudirman No. 28"  
    NICEPay.billingCity = "Jakarta Pusat"  
    NICEPay.billingState = "DKI Jakarta"  
    NICEPay.billingPostCd = "10210"  
    NICEPay.billingCountry = "Indonesia"  
    NICEPay.callBackUrl = "http://example.com/callback"  
    NICEPay.dbProcessUrl = "https://example.com/notification-handler.php"  
    NICEPay.description = "Payment Of Ref No." + NICEPay.referenceNo  
    NICEPay.merchantToken = NICEPay.getMerchantToken()  
    NICEPay.userIP = NICEPay.getUserIp()  
    NICEPay.cartData = "{}" #Json Array Value
    NICEPay.bankCd = "BMRI"  
    NICEPay.vacctValidDt = "20160303"  
    NICEPay.vacctValidTm = "135959"  
    
    
    # // Payment Request    
    resultData = NICEPay.apiRequest()  
    result = json.loads(resultData)  
    
    #Payment Response String Format  
    try:  
        result['resultCd']  
    except NameError:  
        print "Connection Timeout. Please Try Again!"  
    else:  
        if result['resultCd'] == '0000':  
            print("resultCd : " + result['resultCd'])  
            print("resultMsg : " + result['resultMsg'])  
            print("tXid : " + result['tXid'])  
            print("referenceNo : " + result['referenceNo'])  
            print("payMethod : " + result['payMethod'])  
            print("amount : " + result['amount'])  
            print("transDt : " + result['transDt'])  
            print("transTm : " + result['transTm'])  
            print("description : " + result['description'])  
            print("callbackUrl : " + result['callbackUrl'])
            print("bankVacctNo : " + result['bankVacctNo'])  
        else:  
            print("resultCd : " + result['resultCd'])  
            print("resultMsg : " + result['resultMsg'])
    

    Contoh JSON Response

    {
        "resultCd": "0000",
        "amount": "10000",
        "goodsNm": "Test Transaction Nicepay",
        "referenceNo": "99997",
        "transTm": "104721",
        "tXid": "TESTIDTEST02201803011047210789",
        "description": "Payment of referenceNo 99997,This Description",
        "bankVacctNo": "1047210789",
        "resultMsg": "SUCCESS",
        "billingNm": "Thomas Alfa Edison",
        "vacctValidDt": "20180308",
        "payMethod": "02",
        "bankCd": "BMRI",
        "callbackUrl": "http://www.merchant.com/callbackUrl",
        "currency": "IDR",
        "transDt": "20180301",
        "vacctValidTm": "235959"
    }
    
       
    API url /nicepay/api/onePass.do
    Metode POST
    Deskripsi Virtual Account Transaction
    Merchant Token SHA256 (Merchant ID + Reference Number + Amount + Merchant Key)

    Request POST Parameter
    for bankCd, please refer to Bank Code

    Parameter Mandatory Tipe Deskripsi Contoh Data
    iMid Y AN 10 Merchant ID
    payMethod Y AN 2 Pay Method. Refer Code at Here
    currency Y AN 3 Currency
    amt Y N 12 Goods Amount
    referenceNo Y AN 40 Merchant Order No
    goodsNm Y AN 100 Goods Name
    billingNm Y A 30 Billing Name
    billingPhone Y N 15 Billing Phone Number
    billingEmail Y AN 40 Billing Email
    billingCity Y A 50 Billing City
    billingState Y A 50 Billing State
    billingPostCd Y N 10 Billing Post Number
    billingCountry Y A 10 Billing Country
    callBackUrl Y AN 255 Payment Result Forward Url (On Browser)
    dbProcessUrl Y AN 255 Payment Result Receive Url (Server Side)
    description Y AN 100 Description
    merchantToken Y AN 255 Merchant Token
    userIP Y AN 15 User IP (Customer)
    cartData Y AN 4000 Cart Data (Json Format)
    bankCd Y AN 4 Bank Code, refer to Link
    billingAddr N AN AN Billing Address
    deliveryNm N A 30 Delivery Name
    deliveryPhone N N 15 Delivery Phone
    deliveryAddr N AN 100 Delivery Address
    deliveryEmail N AN   Delivery Email buyer@merhcant.com
    deliveryCity N A 50 Delivery City
    deliveryState N A 50 Delivery State
    deliveryPostCd N N 10 Delivery Post Number
    deliveryCountry N A 10 Delivery Country
    vat N N 12 Vat
    fee N N 12 Service Tax
    notaxAmt N N 12 Tax Free Amount
    reqDt N N 8 Request Date(YYYYMMDD)
    reqTm N N 6 Request Time(HH24MISS)
    reqDomain N AN 100 Request Domain
    reqServerIP N AN 15 Request Server IP
    reqClientVer N AN 50 Request Client Version
    userSessionID N AN 100 User Session ID
    userAgent N AN 100 User Agent Information
    userLanguage N AN 2 User Language
    vacctValidDt N N 8 VA expiry date (YYYYMMDD)
    vacctValidTm N N 6 VA expiry time (HH24MISS)


    Response JSON Object

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result Code
    resultMsg AN 255 Result Message
    tXid AN 30 Transaction ID
    referenceNo ANS 40 Merchant Order No
    payMethod N 2 Payment Method. Refer Code at Here
    amount N 12 Transaction Amount
    currency AN 3 Currency
    goodsNm N 100 Goods Name
    billingNm N 30 Buyer Name
    transDt N 8 Transaction date (YYYYMMDD)
    transTm N 6 Transaction time (HH24MISS)
    description N 100 Transaction description
    callbackUrl N 100 Callback Url
    bankCd AN 4 Bank Code, refer to Link
    bankVacctNo N 20 Bank Virtual Account Number
    vacctValidDt N 8 VA expiry date
    vacctValidTm N 6 Va expiry time

    Enterprise - Convenience Store

    NICEPay menawarkan Convenience Store (CVS) sebagai metode pembayaran. Pemberitahuan Real Time akan dikirim saat pelanggan menyelesaikan pembayaran.
    CVS yang didukung oleh NICEPay:

    1. Alfamart
    2. Indomaret
    3. Lawson
    4. Alfamidi
    5. Dan+Dan Store

    Proses Integrasi :

    1. Merchant meminta registrasi CVS ke NICEPay.
    2. Merchant menampilkan detail CVS dan customer journey, kemudian mengirimkan detail CVS melalui email / sms / riwayat transaksi nasabah.
    3. Pelanggan membayarkan CVS di saluran pembayaran yang diinginkan.
    4. NICEPay kirim notifikasi.
    5. Merchant handle notifikasi.

    CVS Flow

    Flow untuk Enterprise - Convenience Store

    Registrasi CVS

    // Payment Mandatory Field    
    nicePay.setPayMethod("03");    
    nicePay.setCurrency("IDR");    
    nicePay.setAmt("1000");    
    nicePay.setReferenceNo("MerchantReferenceNumber001");
    nicePay.setMitraCd("ALMA");  
    nicePay.setGoodsNm("Merchant Goods 1");    
    nicePay.setBillingNm("Buyer Name");    
    nicePay.setBillingEmail("buyer@merchant.com");    
    nicePay.setBillingPhone("02112345678");    
    nicePay.setBillingAddr("Billing Address");    
    nicePay.setBillingCity("Jakarta");    
    nicePay.setBillingState("Jakarta");    
    nicePay.setBillingPostCd("12345");    
    nicePay.setBillingCountry("Indonesia");    
    nicePay.setDeliveryNm("Buyer Name ");    
    nicePay.setDeliveryPhone("02112345678");    
    nicePay.setDeliveryAddr("Billing Address ");    
    nicePay.setDeliveryCity("Jakarta ");    
    nicePay.setDeliveryState("Jakarta ");    
    nicePay.setDeliveryPostCd("12345");    
    nicePay.setDeliveryCountry("Indonesia ");    
    nicePay.setCallBackUrl(merchantDomain + "callback");    
    nicePay.setDbProcessUrl(merchantDomain + "dbprocess");    
    nicePay.setVat("0");    
    nicePay.setFee("0");    
    nicePay.setNotaxAmt("0");    
    nicePay.setDescription("Description");    
    nicePay.setUserIP("127.0.0.1");    
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getReferenceNo()));    
    nicePay.setCartData("{}");
    
    // Payment Optional Field    
    nicePay.setReqDt("20160301");    
    nicePay.setReqTm("135959");    
    nicePay.setReqDomain("merchant.com");    
    nicePay.setReqServerIP("127.0.0.1");    
    nicePay.setReqClientVer("1.0");    
    nicePay.setUserSessionID("userSessionID");    
    nicePay.setUserAgent("Mozilla");    
    nicePay.setUserLanguage("en-US");    
    nicePay.setMerFixAcctId("9999000000000001");    
    nicePay.setPaymentExpiryDt("20160303");    
    nicePay.setPaymentExpiryTm("135959");
    nicePay.setPayValidDt("20160303");    
    nicePay.setPayValidTm("135959");
    
    
    // Payment Request    
    nicePay.payment();  
    
    // Payment Response    
    System.out.println("Response String : " + nicePay.getResponseString()); // JSON in String format    
    
    String resultCd = nicePay.Get("resultCd");           
    String resultMsg = nicePay.Get("resultMsg");           
    String tXid= nicePay.Get("tXid ");        
    String referenceNo= nicePay.Get("referenceNo");
    String payNo= nicePay.Get("payNo");              
    String payMethod= nicePay.Get("payMethod");     
    String amount= nicePay.Get("amount");    
    String transDt = nicePay.Get("transDt ");           
    String transTm = nicePay.Get("transTm ");           
    String description= nicePay.Get("description");           
    String callbackUrl= nicePay.Get("callbackUrl");
    String mitraCd= nicePay.Get("mitraCd");
    
    protected void CheckOut(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(BankCd.SelectedValue))
        {
            objNicepay.currency = "IDR";
            objNicepay.DateNow = DateTime.Now.ToString("yyyymmdd");
            // Set VA expiry date +1 day (optional)
            objNicepay.vaExpDate = DateTime.Now.AddDays(1).ToString("yyyymmdd");
            //Populate Mandatory parameters to send
            // payment type Bank
            objNicepay.PayMethod = "03";
            // Total gross amount
            objNicepay.amt = "10000";
            // Invoice Number or Referenc Number Generated by merchant
            objNicepay.referenceNo = generateReference();
            objNicepay.description = "Payment Invoice No. " + objNicepay.referenceNo;
            // Transaction description
            objNicepay.billingNm = "Donald Duck";
            objNicepay.billingPhone = "021987456321";
            objNicepay.billingEmail = "donald@duck.com";
            objNicepay.billingAddr = "King of money street";
            objNicepay.billingCity = "King";
            objNicepay.billingState = "Money";
            objNicepay.billingPostCd = "123654";
            objNicepay.billingCountry = "Indonesia";
    
            objNicepay.deliveryNm = "Donald Duck";
            objNicepay.deliveryPhone = "021987456321";
            objNicepay.deliveryEmail = "donald@duck.com";
            objNicepay.deliveryAddr = "King of money street";
            objNicepay.deliveryCity = "King";
            objNicepay.deliveryState = "Money";
            objNicepay.deliveryPostCd = "123654";
            objNicepay.deliveryCountry = "Indonesia";
    
            objNicepay.MitraCd = "ALMA";
            objNicepay.PayValidDt = "20170404";
            objNicepay.PayValidTm = "131300";
    
            objResult = objNicepayClass.CreateCVS(objNicepay);
    
            if (objResult.resultCd == "0000")
            {
                Tresult.InnerText = objResult.resultCd;
                TtXid.InnerText = objResult.tXid;
                TcallbackUrl.InnerText = objResult.callbackUrl;
                Tdescription.InnerText = objResult.description;
                TreferenceNo.InnerText = objResult.referenceNo;
                TpayMethod.InnerText = objResult.payMethod;
                //YYMMDD
                TtransDT.InnerText = objResult.transDt;
                //HH24MISS
                TTranstm.InnerText = objResult.transTm;
                payNo.InnerText = objResult.payNo;
                TresultMsg.InnerText = objResult.resultMsg;
                mitraCd.InnerText = objResult.mitraCd;
                amount.InnerText = objResult.amount;
                wrapper.Visible = false;
                Myresult.Visible = true;
            }
            else if (objResult.resultCd != null)
            {
                //API data Not correct, you can redirect back to checkout page Or echo error message.
                //In this sample, we echo error message
                EresultCd.InnerText = objResult.resultCd;
                EresultMsg.InnerText = objResult.resultMsg;
                wrapper.Visible = false;
                ErrData.Visible = true;
            }
            else
            {
                //Timeout, you can redirect back to checkout page Or echo error message.
                //In this sample, we echo error message
                ERR_.InnerText = "Connection Timeout. Please Try again.";
                wrapper.Visible = false;
                ERR.Visible = true;
            }
        }
    }
    
    <?php
    // Include Config File  
    include_once "lib/NicepayLib.php";  
    $nicepay = new NicepayLib();  
    
    function generateReference()  
    {  
        $micro_date = microtime();  
        $date_array = explode(" ",$micro_date);  
        $date = date("YmdHis",$date_array[1]);  
        $date_array[0] = preg_replace('/[^\p{L}\p{N}\s]/u', '', $date_array[0]);  
        return "Ref".$date.$date_array[0].rand(100,999);  
    }  
    
    if(isset($_POST['payMethod']) && $_POST['payMethod'] == '03'  
        && isset($_POST['mitraCd']) && $_POST['mitraCd'])  
    {  
      $billingNm      = $_POST['billingNm'];
      $referenceNo    = $_POST['referenceNo'];  
      $mitraCd         = $_POST['mitraCd'];
    
      // Populate Mandatory parameters to send  
      $nicepay->set('payMethod', '03');  
      $nicepay->set('currency', 'IDR');  
      $nicepay->set('amt', 10000); // Total gross amount  
      $nicepay->set('referenceNo', $referenceNo); // Invoice Number or Reference Number Generated by merchant  
      $nicepay->set('description', 'Payment of Invoice No '.$nicepay->get('referenceNo')); // Transaction description  
      $nicepay->set('mitraCd', $mitraCd);
    
      $nicepay->set('billingNm', 'John Doe'); // Customer name  
      $nicepay->set('billingPhone', '02112345678'); // Customer phone number  
      $nicepay->set('billingEmail', 'john@example.com'); //  
      $nicepay->set('billingAddr', 'Jl. Jend. Sudirman No. 28');  
      $nicepay->set('billingCity', 'Jakarta Pusat');  
      $nicepay->set('billingState', 'DKI Jakarta');  
      $nicepay->set('billingPostCd', '10210');  
      $nicepay->set('billingCountry', 'Indonesia');  
    
      $nicepay->set('deliveryNm', 'John Doe'); // Delivery name  
      $nicepay->set('deliveryPhone', '02112345678');  
      $nicepay->set('deliveryEmail', 'john@example.com');  
      $nicepay->set('deliveryAddr', 'Jl. Jend. Sudirman No. 28');  
      $nicepay->set('deliveryCity', 'Jakarta Pusat');  
      $nicepay->set('deliveryState', 'DKI Jakarta');  
      $nicepay->set('deliveryPostCd', '10210');  
      $nicepay->set('deliveryCountry', 'Indonesia');
    
      // Send Data  
      $response = $nicepay->requestCVS();  
    
      // Response from NICEPAY  
      if (isset($response->resultCd) && $response->resultCd == "0000") {  
        echo "<pre>";  
        echo "tXid              : $response->tXid\n";  
        echo "callbackUrl       : $response->callbackUrl\n";  
        echo "description       : $response->description\n";  
        echo "payment date      : $response->transDt\n"; // YYYYMMDD  
        echo "payment time      : $response->transTm\n"; // HH24MISS  
        echo "pay number        : $response->payNo\n";  
        echo "result code       : $response->resultCd\n";  
        echo "result message    : $response->resultMsg\n";  
        echo "reference no      : $response->referenceNo\n";  
        echo "payment method    : $response->payMethod\n";
        echo "</pre>";  
      } elseif(isset($response->resultCd)) {  
        // API data not correct or error happened in bank system, you can redirect back to checkout page or echo error message.  
        // In this sample, we echo error message  
        echo "<pre>";  
        echo "Oops! Something happened, please notice your system administrator.\n\n";  
        echo "result code       : $response->resultCd\n";  
        echo "result message    : $response->resultMsg\n";  
        echo "</pre>";  
      } else {  
        // Timeout, you can redirect back to checkout page or echo error message.  
        // In this sample, we echo error message  
        echo "<pre>Connection Timeout. Please Try again.</pre>";  
      }  
    }
    ?>
    
    import json  
    
    from nicepay import NICEPay  
    
    #Set MID & Merchant Key  
    NICEPay.iMid = "BMRITEST01" #Set Merchant ID  
    NICEPay.merchantKey = "33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A==" #Set Merchant Key  
    
    #Set Mandatory Value  
    NICEPay.payMethod = "03" #Set Payment Method  
    NICEPay.amt = "1000" #Total Gross Amount  
    NICEPay.referenceNo = "NiceTest00003" #Invoice Number By Merchant  
    NICEPay.goodsNm = NICEPay.referenceNo #Goods Name  
    NICEPay.billingNm = "John Doe"  
    NICEPay.billingPhone = "02112345678"  
    NICEPay.billingEmail = "john@example.co`m"  
    NICEPay.billingAddr = "Jl. Jend. Sudirman No. 28"  
    NICEPay.billingCity = "Jakarta Pusat"  
    NICEPay.billingState = "DKI Jakarta"  
    NICEPay.billingPostCd = "10210"  
    NICEPay.billingCountry = "Indonesia"  
    NICEPay.callBackUrl = "http://example.com/callback"  
    NICEPay.dbProcessUrl = "https://example.com/notification-handler.php"  
    NICEPay.description = "Payment Of Ref No." + NICEPay.referenceNo  
    NICEPay.merchantToken = NICEPay.getMerchantToken()  
    NICEPay.userIP = NICEPay.getUserIp()  
    NICEPay.cartData = "{}" #Json Array Value
    NICEPay.mitraCd = "INDO"  
    NICEPay.payValidDt = "20160303"  
    NICEPay.payValidTm = "135959"  
    
    
    
    # // Payment Request    
    resultData = NICEPay.apiRequest()  
    result = json.loads(resultData)  
    
    #Payment Response String Format  
    try:  
        result['resultCd']  
    except NameError:  
        print "Connection Timeout. Please Try Again!"  
    else:  
        if result['resultCd'] == '0000':  
            print("resultCd : " + result['resultCd'])  
            print("resultMsg : " + result['resultMsg'])  
            print("tXid : " + result['tXid'])  
            print("referenceNo : " + result['referenceNo'])  
            print("payMethod : " + result['payMethod'])  
            print("amount : " + result['amount'])  
            print("transDt : " + result['transDt'])  
            print("transTm : " + result['transTm'])  
            print("description : " + result['description'])  
            print("callbackUrl : " + result['callbackUrl'])
            print("payNo : " + result['payNo'])  
            print("mitraCd : " + result['mitraCd'])
        else:  
            print("resultCd : " + result['resultCd'])  
            print("resultMsg : " + result['resultMsg'])
    

    Contoh JSON Response

    {
        "resultCd": "0000",
        "amount": "10000",
        "goodsNm": "Test Transaction Nicepay",
        "referenceNo": "99997",
        "transTm": "110847",
        "mitraCd": "ALMA",
        "tXid": "TESTIDTEST03201803011108471311",
        "description": "Payment of referenceNo 99997,This Description",
        "resultMsg": "SUCCESS",
        "billingNm": "Thomas Alfa Edison",
        "payNo": "011108471311",
        "payValidTm": "235959",
        "payMethod": "03",
        "callbackUrl": "http://www.merchant.com/callbackUrl",
        "payValidDt": "20180308",
        "currency": "IDR",
        "transDt": "20180301"
    }
    
       
    API url /nicepay/api/onePass.do
    Metode POST
    Deskripsi Convenience Store (CVS) Transaction
    Merchant Token SHA256 (Merchant ID + Reference Number + Amount + Merchant Key)

    Request POST Parameter

    Parameter Mandatory Tipe Ukuran Deskripsi
    iMid Y AN 10 Merchant ID
    payMethod Y AN 2 Pay Method, refer to here
    currency Y AN 3 Currency
    amt Y N 12 Goods Amount
    referenceNo Y AN 40 Merchant Order No
    goodsNm Y AN 100 Goods Name
    billingNm Y A 30 Billing Name
    billingPhone Y N 15 Billing Phone Number
    billingEmail Y AN 40 Billing Email
    billingCity Y A 50 Billing City
    billingState Y A 50 Billing State
    billingPostCd Y N 10 Billing Post Number
    billingCountry Y A 10 Billing Country
    callBackUrl Y AN 255 Payment Result Forward Url (On Browser)
    dbProcessUrl Y AN 255 Payment Result Receive Url (Server Side)
    description Y AN 100 Description
    merchantToken Y AN 255 Merchant Token
    userIP Y AN 15 User IP (Customer)
    cartData Y AN 4000 Cart Data (Json Format)
    mitraCd Y AN 4 Mitra Code, refer to here
    billingAddr N 100 AN Billing Address
    deliveryNm N A 30 Delivery Name
    deliveryPhone N N 15 Delivery Phone
    deliveryAddr N AN 100 Delivery Address
    deliveryEmail N AN   Delivery Email
    deliveryCity N A 50 Delivery City
    deliveryState N A 50 Delivery State
    deliveryPostCd N N 10 Delivery Post Number
    deliveryCountry N A 10 Delivery Country
    vat N N 12 Vat
    fee N N 12 Service Tax
    notaxAmt N N 12 Tax Free Amount
    reqDt N N 8 Request Date(YYYYMMDD)
    reqTm N N 6 Request Time(HH24MISS)
    reqDomain N AN 100 Request Domain
    reqServerIP N AN 15 Request Server IP
    reqClientVer N AN 50 Request Client Version
    userSessionID N AN 100 User Session ID
    userAgent N AN 100 User Agent Information
    userLanguage N AN 2 User Language
    payValidDt N N 8 CVS expiry date (YYYYMMDD)
    payValidTm N N 6 CVS expiry time (HH24MISS)


    Response JSON Object

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result Code
    resultMsg AN 255 Result Message
    tXid AN 30 Transaction ID
    referenceNo ANS 40 Merchant Order No
    payMethod N 2 Payment Method. Refer Code at Here
    amount N 12 Transaction Amount
    currency AN 3 Currency
    goodsNm N 100 Goods Name
    billingNm N 30 Buyer Name
    transDt N 8 Transaction date (YYYYMMDD)
    description N 100 Transaction description
    callbackUrl N 100 Callback Url
    mitraCd AN 4 Mitra Code, refer to Link
    payNo N 16 CVS Number
    payValidTm N 8 CVS Expiry Time (HH24MISS)
    payValidDt N 6 CVS Expiry Date (YYYYMMDD)

    Enterprise - ClickPay

    NICEPay menawarkan ClickPay sebagai metode pembayaran. Pemberitahuan Real Time akan dikirim saat pelanggan menyelesaikan pembayaran.
    ClickPay yang didukung oleh NICEPay:

    1. Mandiri Clickpay
    2. CIMB Clicks
    3. BCA KlikPay

    Proses Integrasi :

    1. Merchant meminta registrasi ClickPay ke NICEPay.
    2. NICEPay redirect ke halaman Bank.
    3. Pelanggan membayarkan ClickPay.
    4. NICEPay kirim notifikasi.
    5. Merchant handle notifikasi.

    ClickPay Flow

    Flow for Enterprise - ClickPay

    Registrasi KlikPay

    // Payment Mandatory Field    
    nicePay.setPayMethod("04");    
    nicePay.setCurrency("IDR");    
    nicePay.setAmt("1000");    
    nicePay.setReferenceNo("MerchantReferenceNumber001");
    nicePay.setMitraCd("MDRC");  
    nicePay.setGoodsNm("Merchant Goods 1");    
    nicePay.setBillingNm("Buyer Name");    
    nicePay.setBillingEmail("buyer@merchant.com");    
    nicePay.setBillingPhone("02112345678");    
    nicePay.setBillingAddr("Billing Address");    
    nicePay.setBillingCity("Jakarta");    
    nicePay.setBillingState("Jakarta");    
    nicePay.setBillingPostCd("12345");    
    nicePay.setBillingCountry("Indonesia");    
    nicePay.setDeliveryNm("Buyer Name ");    
    nicePay.setDeliveryPhone("02112345678");    
    nicePay.setDeliveryAddr("Billing Address ");    
    nicePay.setDeliveryCity("Jakarta ");    
    nicePay.setDeliveryState("Jakarta ");    
    nicePay.setDeliveryPostCd("12345");    
    nicePay.setDeliveryCountry("Indonesia ");    
    nicePay.setCallBackUrl(merchantDomain + "callback");    
    nicePay.setDbProcessUrl(merchantDomain + "dbprocess");    
    nicePay.setVat("0");    
    nicePay.setFee("0");    
    nicePay.setNotaxAmt("0");    
    nicePay.setDescription("Description");    
    nicePay.setUserIP("127.0.0.1");    
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getReferenceNo()));    
    nicePay.setCartData("{}");
    nicePay.setClickPayNo("1234567890123456");
    nicePay.setClickPayToken("000000");
    nicePay.setDataField3("3");
    
    // Payment Optional Field    
    nicePay.setReqDt("20160301");    
    nicePay.setReqTm("135959");    
    nicePay.setReqDomain("merchant.com");    
    nicePay.setReqServerIP("127.0.0.1");    
    nicePay.setReqClientVer("1.0");    
    nicePay.setUserSessionID("userSessionID");    
    nicePay.setUserAgent("Mozilla");    
    nicePay.setUserLanguage("en-US");    
    nicePay.setMerFixAcctId("9999000000000001");    
    nicePay.setPaymentExpiryDt("20160303");    
    nicePay.setPaymentExpiryTm("135959");
    
    
    // Payment Request    
    nicePay.payment();  
    
    // Payment Response    
    System.out.println("Response String : " + nicePay.getResponseString()); // JSON in String format    
    
    String resultCd = nicePay.Get("resultCd");           
    String resultMsg = nicePay.Get("resultMsg");           
    String tXid= nicePay.Get("tXid ");        
    String referenceNo= nicePay.Get("referenceNo");
    String receiptCode= nicePay.Get("receiptCode");              
    String payMethod= nicePay.Get("payMethod");     
    String amount= nicePay.Get("amount");    
    String transDt = nicePay.Get("transDt ");           
    String transTm = nicePay.Get("transTm ");           
    String description= nicePay.Get("description");           
    String callbackUrl= nicePay.Get("callbackUrl");
    String mitraCd= nicePay.Get("mitraCd");
    
    protected void CheckOut(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(BankCd.SelectedValue))
        {
            objNicepay.currency = "IDR";
            objNicepay.DateNow = DateTime.Now.ToString("yyyymmdd");
            // Set VA expiry date +1 day (optional)
            objNicepay.vaExpDate = DateTime.Now.AddDays(1).ToString("yyyymmdd");
            //Populate Mandatory parameters to send
            // payment type Bank
            objNicepay.PayMethod = "04";
            // Total gross amount
            objNicepay.amt = "10000";
            // Invoice Number or Referenc Number Generated by merchant
            objNicepay.referenceNo = generateReference();
            objNicepay.description = "Payment Invoice No. " + objNicepay.referenceNo;
            // Transaction description
            objNicepay.billingNm = "Donald Duck";
            objNicepay.billingPhone = "021987456321";
            objNicepay.billingEmail = "donald@duck.com";
            objNicepay.billingAddr = "King of money street";
            objNicepay.billingCity = "King";
            objNicepay.billingState = "Money";
            objNicepay.billingPostCd = "123654";
            objNicepay.billingCountry = "Indonesia";
    
            objNicepay.deliveryNm = "Donald Duck";
            objNicepay.deliveryPhone = "021987456321";
            objNicepay.deliveryEmail = "donald@duck.com";
            objNicepay.deliveryAddr = "King of money street";
            objNicepay.deliveryCity = "King";
            objNicepay.deliveryState = "Money";
            objNicepay.deliveryPostCd = "123654";
            objNicepay.deliveryCountry = "Indonesia";
    
            objNicepay.MitraCd = "MDRC";
            objNicepay.clickPayNo = "1234567890123456";
            objNicepay.clickPayToken = "000000";
            objNicepay.dataField3 = "3";
    
    
            objResult = objNicepayClass.CreateCVS(objNicepay);
    
            if (objResult.resultCd == "0000")
            {
                Tresult.InnerText = objResult.resultCd;
                TtXid.InnerText = objResult.tXid;
                TcallbackUrl.InnerText = objResult.callbackUrl;
                Tdescription.InnerText = objResult.description;
                TreferenceNo.InnerText = objResult.referenceNo;
                TpayMethod.InnerText = objResult.payMethod;
                //YYMMDD
                TtransDT.InnerText = objResult.transDt;
                //HH24MISS
                TTranstm.InnerText = objResult.transTm;
                receiptCode.InnerText = objResult.receiptCode;
                TresultMsg.InnerText = objResult.resultMsg;
                mitraCd.InnerText = objResult.mitraCd;
                amount.InnerText = objResult.amount;
                wrapper.Visible = false;
                Myresult.Visible = true;
            }
            else if (objResult.resultCd != null)
            {
                //API data Not correct, you can redirect back to checkout page Or echo error message.
                //In this sample, we echo error message
                EresultCd.InnerText = objResult.resultCd;
                EresultMsg.InnerText = objResult.resultMsg;
                wrapper.Visible = false;
                ErrData.Visible = true;
            }
            else
            {
                //Timeout, you can redirect back to checkout page Or echo error message.
                //In this sample, we echo error message
                ERR_.InnerText = "Connection Timeout. Please Try again.";
                wrapper.Visible = false;
                ERR.Visible = true;
            }
        }
    }
    
    <?php
    // Include Config File  
    include_once "lib/NicepayLib.php";  
    $nicepay = new NicepayLib();  
    
    function generateReference()  
    {  
        $micro_date = microtime();  
        $date_array = explode(" ",$micro_date);  
        $date = date("YmdHis",$date_array[1]);  
        $date_array[0] = preg_replace('/[^\p{L}\p{N}\s]/u', '', $date_array[0]);  
        return "Ref".$date.$date_array[0].rand(100,999);  
    }  
    
    if(isset($_POST['payMethod']) && $_POST['payMethod'] == '04'  
        && isset($_POST['mitraCd']) && $_POST['mitraCd'])  
    {  
      $billingNm      = $_POST['billingNm'];
      $referenceNo    = $_POST['referenceNo'];  
      $mitraCd         = $_POST['mitraCd'];
    
      // Populate Mandatory parameters to send  
      $nicepay->set('payMethod', '04');  
      $nicepay->set('currency', 'IDR');  
      $nicepay->set('amt', 10000); // Total gross amount  
      $nicepay->set('referenceNo', $referenceNo); // Invoice Number or Reference Number Generated by merchant  
      $nicepay->set('description', 'Payment of Invoice No '.$nicepay->get('referenceNo')); // Transaction description  
      $nicepay->set('mitraCd', $mitraCd);
    
      $nicepay->set('billingNm', 'John Doe'); // Customer name  
      $nicepay->set('billingPhone', '02112345678'); // Customer phone number  
      $nicepay->set('billingEmail', 'john@example.com'); //  
      $nicepay->set('billingAddr', 'Jl. Jend. Sudirman No. 28');  
      $nicepay->set('billingCity', 'Jakarta Pusat');  
      $nicepay->set('billingState', 'DKI Jakarta');  
      $nicepay->set('billingPostCd', '10210');  
      $nicepay->set('billingCountry', 'Indonesia');  
    
      $nicepay->set('deliveryNm', 'John Doe'); // Delivery name  
      $nicepay->set('deliveryPhone', '02112345678');  
      $nicepay->set('deliveryEmail', 'john@example.com');  
      $nicepay->set('deliveryAddr', 'Jl. Jend. Sudirman No. 28');  
      $nicepay->set('deliveryCity', 'Jakarta Pusat');  
      $nicepay->set('deliveryState', 'DKI Jakarta');  
      $nicepay->set('deliveryPostCd', '10210');  
      $nicepay->set('deliveryCountry', 'Indonesia');
    
      // Send Data  
      $response = $nicepay->requestClickPay();  
    
      // Response from NICEPAY  
      if (isset($response->resultCd) && $response->resultCd == "0000") {  
        echo "<pre>";  
        echo "tXid              : $response->tXid\n";  
        echo "callbackUrl       : $response->callbackUrl\n";  
        echo "description       : $response->description\n";  
        echo "payment date      : $response->transDt\n"; // YYYYMMDD  
        echo "payment time      : $response->transTm\n"; // HH24MISS  
        echo "receipt Code      : $response->receiptCode\n";  
        echo "result code       : $response->resultCd\n";  
        echo "result message    : $response->resultMsg\n";  
        echo "reference no      : $response->referenceNo\n";  
        echo "payment method    : $response->payMethod\n";
        echo "</pre>";  
      } elseif(isset($response->resultCd)) {  
        // API data not correct or error happened in bank system, you can redirect back to checkout page or echo error message.  
        // In this sample, we echo error message  
        echo "<pre>";  
        echo "Oops! Something happened, please notice your system administrator.\n\n";  
        echo "result code       : $response->resultCd\n";  
        echo "result message    : $response->resultMsg\n";  
        echo "</pre>";  
      } else {  
        // Timeout, you can redirect back to checkout page or echo error message.  
        // In this sample, we echo error message  
        echo "<pre>Connection Timeout. Please Try again.</pre>";  
      }  
    }
    ?>
    
    import json  
    
    from nicepay import NICEPay  
    
    #Set MID & Merchant Key  
    NICEPay.iMid = "BMRITEST01" #Set Merchant ID  
    NICEPay.merchantKey = "33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A==" #Set Merchant Key  
    
    #Set Mandatory Value  
    NICEPay.payMethod = "04" #Set Payment Method  
    NICEPay.amt = "1000" #Total Gross Amount  
    NICEPay.referenceNo = "NiceTest00003" #Invoice Number By Merchant  
    NICEPay.goodsNm = NICEPay.referenceNo #Goods Name  
    NICEPay.billingNm = "John Doe"  
    NICEPay.billingPhone = "02112345678"  
    NICEPay.billingEmail = "john@example.co`m"  
    NICEPay.billingAddr = "Jl. Jend. Sudirman No. 28"  
    NICEPay.billingCity = "Jakarta Pusat"  
    NICEPay.billingState = "DKI Jakarta"  
    NICEPay.billingPostCd = "10210"  
    NICEPay.billingCountry = "Indonesia"  
    NICEPay.callBackUrl = "http://example.com/callback"  
    NICEPay.dbProcessUrl = "https://example.com/notification-handler.php"  
    NICEPay.description = "Payment Of Ref No." + NICEPay.referenceNo  
    NICEPay.merchantToken = NICEPay.getMerchantToken()  
    NICEPay.userIP = NICEPay.getUserIp()  
    NICEPay.cartData = "{}" #Json Array Value
    NICEPay.mitraCd = "MDRC"  
    NICEPay.clickPayNo = "1234567890123456"  
    NICEPay.clickPayToken = "000000"  
    NICEPay.dataField3 = "3"  
    
    
    
    # // Payment Request    
    resultData = NICEPay.apiRequest()  
    result = json.loads(resultData)  
    
    #Payment Response String Format  
    try:  
        result['resultCd']  
    except NameError:  
        print "Connection Timeout. Please Try Again!"  
    else:  
        if result['resultCd'] == '0000':  
            print("resultCd : " + result['resultCd'])  
            print("resultMsg : " + result['resultMsg'])  
            print("tXid : " + result['tXid'])  
            print("referenceNo : " + result['referenceNo'])  
            print("payMethod : " + result['payMethod'])  
            print("amount : " + result['amount'])  
            print("transDt : " + result['transDt'])  
            print("transTm : " + result['transTm'])  
            print("description : " + result['description'])  
            print("callbackUrl : " + result['callbackUrl'])
            print("receiptCode : " + result['receiptCode'])  
            print("mitraCd : " + result['mitraCd'])
        else:  
            print("resultCd : " + result['resultCd'])  
            print("resultMsg : " + result['resultMsg'])
    

    Contoh JSON Response

    {
        "resultCd": "0000",
        "amount": "10000",
        "goodsNm": "Test Transaction Nicepay",
        "referenceNo": "99997",
        "transTm": "113152",
        "mitraCd": "MDRC",
        "tXid": "TESTIDTEST04201803011131521855",
        "description": "Payment of referenceNo 99997",
        "receiptCode": "1831B3127001",
        "resultMsg": "SUCCESS",
        "billingNm": "Customer Name",
        "mRefNo": "201803011131521884",
        "payMethod": "04",
        "callbackUrl": "http://www.merchant.com/callbackUrl",
        "currency": "IDR",
        "transDt": "20180301"
    }
    
       
    API url /nicepay/api/onePass.do
    Metode POST
    Deskripsi ClickPay Transaction
    Merchant Token SHA256 (Merchant ID + Reference Number + Amount + Merchant Key)


    Request POST Parameter

    Parameter Mandatory Tipe Ukuran Deskripsi
    iMid Y AN 10 Merchant ID
    payMethod Y AN 2 Pay Method, refer to here
    currency Y AN 3 Currency
    amt Y N 12 Goods Amount
    referenceNo Y AN 40 Merchant Order No
    goodsNm Y AN 100 Goods Name
    billingNm Y A 30 Billing Name
    billingPhone Y N 15 Billing Phone Number
    billingEmail Y AN 40 Billing Email
    billingCity Y A 50 Billing City
    billingState Y A 50 Billing State
    billingPostCd Y N 10 Billing Post Number
    billingCountry Y A 10 Billing Country
    callBackUrl Y AN 255 Payment Result Forward Url (On Browser)
    dbProcessUrl Y AN 255 Payment Result Receive Url (Server Side)
    description Y AN 100 Description
    merchantToken Y AN 255 Merchant Token
    userIP Y AN 15 User IP (Customer)
    cartData Y AN 4000 Cart Data (Json Format)
    mitraCd Y AN 4 Mitra Code, refer to here
    clickPayNo Y N 16 Clickpay card number
    dataField3 Y N 16 Token input 3 for Clickpay
    clickPayToken Y N 6 Code response from token
    billingAddr N 100 AN Billing Address
    deliveryNm N A 30 Delivery Name
    deliveryPhone N N 15 Delivery Phone
    deliveryAddr N AN 100 Delivery Address
    deliveryEmail N AN   Delivery Email
    deliveryCity N A 50 Delivery City
    deliveryState N A 50 Delivery State
    deliveryPostCd N N 10 Delivery Post Number
    deliveryCountry N A 10 Delivery Country
    vat N N 12 Vat
    fee N N 12 Service Tax
    notaxAmt N N 12 Tax Free Amount
    reqDt N N 8 Request Date(YYYYMMDD)
    reqTm N N 6 Request Time(HH24MISS)
    reqDomain N AN 100 Request Domain
    reqServerIP N AN 15 Request Server IP
    reqClientVer N AN 50 Request Client Version
    userSessionID N AN 100 User Session ID
    userAgent N AN 100 User Agent Information
    userLanguage N AN 2 User Language


    Response JSON Object

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result Code
    resultMsg AN 255 Result Message
    tXid AN 30 Transaction ID
    referenceNo ANS 40 Merchant Order No
    payMethod N 2 Payment Method. Refer Code at Here
    amount N 12 Transaction Amount
    currency AN 3 Currency
    goodsNm N 100 Goods Name
    billingNm N 30 Buyer Name
    description N 100 Transaction description
    callbackUrl N 100 Callback Url
    mitraCd AN 4 Mitra Code, refer to Link
    transDt N 8 Transaction date (YYYYMMDD)
    transTm N 6 Transaction Time (HH24MISS)
    receiptCode ANS 20 Authorization Number
    mRefNo AN 18 Bank Reference No

    Enterprise - E-Wallet

    NICEPay menawarkan E-Wallet sebagai metode pembayaran. Pemberitahuan Real Time akan dikirim saat pelanggan menyelesaikan pembayaran.
    E-Wallet yang didukung oleh NICEPay:

    1. Mandiri E-Cash

    Proses Integrasi :

    1. Merchant meminta registrasi E-Wallet ke NICEPay.
    2. NICEPay akan me-redirect halaman ke halaman Bank
    3. Pelanggan membayarkan E-Wallet.
    4. NICEPay kirim notifikasi.
    5. Merchant handle notifikasi.

    Registrasi E-Wallet

    Contoh JSON Request

    {
        "iMid":"TESTIDTEST",
        "payMethod":"Credit Card",
        "currency":"IDR",
        "Amt":"1000",
        "referenceNo":"MerchantReferenceNumber001",
        "goodsNm":"Merchant Goods 1",
        "billingNm":"Buyer Name",
        "billingPhone":"02112345678",
        "billingEmail":"buyer@merchant.com",
        "billingAddr":"Billing Address",
        "billingCity":"Jakarta",
        "billingState":"Jakarta",
        "billingPostCd":"12345",
        "billingCountry":"Indonesia",
        "deliveryNm":"Buyer Name",
        "deliveryPhone":"02112345678",
        "deliveryAddr":"Billing Address",
        "deliveryCity":"Jakarta",
        "deliveryState":"Jakarta",
        "deliveryPostCd":"12345",
        "deliveryCountry":"Indonesia",
        "callBackUrl":"http://www.merchant.com/callback",
        "dbProcessUrl":"http://www.merchant.com/notification",
        "Vat":"0",
        "Fee":"0",
        "notaxAmt":"0",
        "description":"Description",
        "merchantToken":"6cfccfc0046773c1b589d8e98f8b596c284f3c70a4ecf86eba14c18944b74bcd",
        "reqDt":"20160301",
        "reqTm":"135959",
        "reqDomain":"merchant.com",
        "reqServerIP":"127.0.0.1",
        "reqClientVer":"1.0",
        "userIP":"127.0.0.1",
        "userSessionID":"userSessionID",
        "userAgent":"Mozilla",
        "userLanguage":"en-US",
        "cartData":"{}"
    }
    

    Contoh Parameter Response

    {
        "resultCd": "0000",
        "amount": "10000",
        "referenceNo": "99997",
        "transTm": "141408",
        "mitraCd": "MDRE",
        "tXid": "TESTIDTEST03201803011414085658",
        "resultMsg": "SUCCESS",
        "payMethod": "03",
        "transDt": "20180301"
    }
    
       
    API url /nicepay/api/ewalletTrans.do
    Metode POPUP (POST)
    Deskripsi E-Wallet Transaction
    Merchant Token SHA256 (Merchant ID + Reference Number + Amount + Merchant Key)


    Request POST Parameter

    Parameter Mandatory Tipe Ukuran Deskripsi
    iMid Y AN 10 Merchant ID
    payMethod Y AN 2 Pay Method, refer to here
    currency Y AN 3 Currency
    amt Y N 12 Goods Amount
    referenceNo Y AN 40 Merchant Order No
    goodsNm Y AN 100 Goods Name
    billingNm Y A 30 Billing Name
    billingPhone Y N 15 Billing Phone Number
    billingEmail Y AN 40 Billing Email
    billingCity Y A 50 Billing City
    billingState Y A 50 Billing State
    billingPostCd Y N 10 Billing Post Number
    billingCountry Y A 10 Billing Country
    callBackUrl Y AN 255 Payment Result Forward Url (On Browser)
    dbProcessUrl Y AN 255 Payment Result Receive Url (Server Side)
    description Y AN 100 Description
    merchantToken Y AN 255 Merchant Token
    userIP Y AN 15 User IP (Customer)
    cartData Y AN 4000 Cart Data (Json Format)
    mitraCd Y AN 4 Mitra Code, refer to here
    billingAddr N 100 AN Billing Address
    deliveryNm N A 30 Delivery Name
    deliveryPhone N N 15 Delivery Phone
    deliveryAddr N AN 100 Delivery Address
    deliveryEmail N AN   Delivery Email
    deliveryCity N A 50 Delivery City
    deliveryState N A 50 Delivery State
    deliveryPostCd N N 10 Delivery Post Number
    deliveryCountry N A 10 Delivery Country
    vat N N 12 Vat
    fee N N 12 Service Tax
    notaxAmt N N 12 Tax Free Amount
    reqDt N N 8 Request Date(YYYYMMDD)
    reqTm N N 6 Request Time(HH24MISS)
    reqDomain N AN 100 Request Domain
    reqServerIP N AN 15 Request Server IP
    reqClientVer N AN 50 Request Client Version
    userSessionID N AN 100 User Session ID
    userAgent N AN 100 User Agent Information
    userLanguage N AN 2 User Language


    Response Data

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result Code
    resultMsg AN 255 Result Message
    tXid AN 30 Transaction ID
    referenceNo ANS 40 Merchant Order No
    payMethod N 2 Payment Method. Refer Code at Here
    amount N 12 Transaction Amount
    mitraCd AN 4 Mitra Code, refer to Link
    transDt N 8 Transaction date (YYYYMMDD)
    transTm N 6 Transaction Time (HH24MISS)

    Notifikasi

    Contoh POST for Notification

    tXid={tXid}  
    referenceNo={referenceNo}  
    amt={amt}  
    merchantToken={merchantToken}  
    matchCl={matchCl}
    status={status}
    bankCd={bankCd}
    vacctNo={vacctNo}
    authNo={authNo}
    cardNo={cardNo}
    issuBankCd = {issuBankCd}
    issuBankNm = {issuBankNm}
    acquBankCd = {acquBankCd}
    acquBankNm = {acquBankNm}
    depositDt = {depositDt}
    depositTm = {depositTm}
    payNo={payNo}
    mitraCd={mitraCd}
    

    Server NICEPay akan mengirimkan pemberitahuan ke sisi Merchant dbProcessUrl untuk menginformasikan kepada Merchant mengenai Transaksi.

       
    Merchant notification url https://example.com/notificationUrl
    Metode POST
    Deskripsi Pemberitahuan hasil transaksi (bila berhasil).
    Jika sistem Anda menggunakan firewall, mohon tambahkan allow policy untuk IP NICEpay. :
    development: 103.20.51.39
    production: 103.20.51.34
    Merchant Token SHA256 (Merchant ID + Transaction ID + amount + Merchant Key)

    Common Parameter for Notification

    Parameter Tipe Ukuran Deskripsi
    tXid N 30 Transaction ID
    merchantToken AN 255 Merchant Token
    referenceNo N 40 Merchant Order No
    payMethod N 2 Payment method. Refer Code at Here
    amt N 12 Payment amount
    transDt N 8 Transaction date
    transTm N 6 Transaction time
    currency N 3 Currency
    goodsNm N 100 Goods name
    billingNm N 30 Billing name
    matchCl N 1 Payment amount match flag. Refer Code at Here
    status AN 1 Deposit Status
    0: Deposit
    1: Reversal

    Parameter Tambahan untuk Credit Card Notification

    Parameter Tipe Ukuran Deskripsi
    authNo N 10 Approval number
    IssueBankCd A 4 Issue bank code. Refer Code at Here
    IssueBankNm A   Issue bank name.
    acquBankCd A   Acquire bank code. Refer Code at Here
    acquBankNm A   Acquire bank name.
    cardNo AN 20 Card no with masking
    cardExpYymm N   Card expiry (YYMM)
    instmntMon N 2 Installment month
    instmntType N 2 Installment Type. Refer Code at Here
    preauthToken AN 255 Preauth Token
    recurringToken AN 255 Recurring token
    ccTransType AN 2 Credit card transaction type
    1: Normal
    2: Recurring
    3: Pre-auth
    4: Captured
    vat N 12 Vat number
    fee N 12 service fee
    notaxAmt N 12 tax free amount

    Parameter Tambahan untuk Virtual Account Notification

    Parameter Tipe Ukuran Deskripsi
    bankCd N 4 Bank Code. Refer Code at Here
    vacctNo N 16 Bank Virtual Account number
    vacctValidDt N 8 VA expiry date
    vacctValidTm N 6 VA expiry time
    depositDt N   Deposit date
    depositTm N   Deposit time

    Parameter Tambahan untuk Others Payment Method Notification

    Parameter Tipe Ukuran Deskripsi
    mitraCd A 4 Mitra Code. Refer Code at Here
    payNo N 12 Pay number to mitra
    payValidDt N 8 CVS expiry date
    payValidTm N 6 CVS expiry time
    receiptCode ANS 20 Authorization number
    mRefNo AN 18 Bank reference No
    depositDt N   Deposit date
    depositTm N   Deposit time

    Cek status Transaksi

    // Order Status Mandatory Field    
    nicePay.setTrxId("IONPAYTEST02201603091207051498");    
    nicePay.setReferenceNo("MerchantReferenceNumber001");    
    nicePay.setAmt("1000");    
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getReferenceNo()));    
    // Order Status Request    
    nicePay.orderStatus();    
    // Order Status Response    
    System.out.println("Response String : " + nicePay.getResponseString()); // JSON in String format    
    nicePay.getHtResponse(); // JSON in HashTable<String, String> format    
    
    String resultCd = nicePay.Get("resultCd");           
    String resultMsg = nicePay.Get("resultMsg");           
    String tXid= nicePay.Get("tXid ");           
    String iMid= nicePay.Get("iMid");     
    String currency= nicePay.Get("currency");  
    String amount= nicePay.Get("amount");           
    String instmntMon= nicePay.Get("instmntMon");           
    String instmntType= nicePay.Get("instmntType");     
    String referenceNo= nicePay.Get("referenceNo");    
    String goodsNm = nicePay.Get("goodsNm");           
    String payMethod = nicePay.Get("payMethod");           
    String billingNm= nicePay.Get("billingNm");           
    String merchantToken= nicePay.Get("merchantToken");     
    String reqDt= nicePay.Get("reqDt");    
    String reqTm = nicePay.Get("reqTm");           
    String status = nicePay.Get("status");           
    String bankCd= nicePay.Get("bankCd");  
    String vacctValidDt= nicePay.Get("vacctValidDt");            
    String vacctValidTm= nicePay.Get("vacctValidTm");     
    String vacctNo= nicePay.Get("vacctNo");
    
    public NotificationResult ChargcheckPaymentStatuseCard(string tXid, string referenceNo, string amt)
    {
        string RequestType = "checkPaymentStatus";
        Nicepay Nicepay = new Nicepay();
    
        Nicepay.iMid = NicepayConfig.NICEPAY_IMID;
        Nicepay.tXid = tXid;
        Nicepay.referenceNo = referenceNo;
        Nicepay.amt = amt;
        Nicepay.merchantToken = merchantToken(Nicepay, RequestType);
    
        CheckParam(Nicepay.iMid, "01");
        CheckParam(Nicepay.amt, "04");
        CheckParam(Nicepay.referenceNo, "06");
        CheckParam(Nicepay.merchantToken, "28");
        CheckParam(Nicepay.tXid, "30");
    
        string API_Url = GetApiRequest(RequestType);
        string SingleString = BuildString(Nicepay);
    
        string ResultString = WebRequestPostHttp.Post_Http(SingleString, API_Url);
        JavaScriptSerializer JsonSerializer = new JavaScriptSerializer();
    
        return JsonSerializer.Deserialize<NotificationResult>(ResultString);
    
    }
    
    <?php
    $nicepay->set('tXid',$tXid);
    $nicepay->set('referenceNo',$referenceNo);
    $nicepay->set('amt',$amt);
    $nicepay->set('iMid',$iMid);
    $merchantToken = $nicepay->merchantTokenC();
    $nicepay->set('merchantToken', $merchantToken);
    
    //Request To Nicepay
    $paymentStatus = $nicepay->checkPaymentStatus($tXid,$referenceNo, $amt);
    
    //Response From Nicepay
    if($pushedToken == $merchantToken){
      if(isset($paymentStatus->status) && $paymentStatus->status == '0'){
        echo "<pre>Success</pre>";
      }elseif (isset($paymentStatus->status) && $paymentStatus->status == '1') {
        echo "<pre>Void</pre>";
      }elseif (isset($paymentStatus->status) && $paymentStatus->status == '2') {
        echo "<pre>Refund</pre>";
      }elseif (isset($paymentStatus->status) && $paymentStatus->status == '9') {
        echo "<pre>Reversal</pre>";
      }else {
        echo "<pre>Status Unknown</pre>";
      }
    }
    ?>
    
    import json
    from library import NICEPay  
    
    #Set Parameters For Check Status  
    NICEPay.iMid = "IONPAYTEST" #Set Merchant ID  
    NICEPay.merchantKey = "33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A==" #Set Merchant Key  
    NICEPay.amt = "100"  
    NICEPay.referenceNo = "379072"  
    NICEPay.merchantToken = NICEPay.getMerchantToken()  
    NICEPay.tXid = "IONPAYTEST02201609161449136760"  
    
    #Check Status Request  
    resultCheckStatus = NICEPay.checkStatus()  
    
    #Check Status Response  
    result = json.loads(resultCheckStatus)  
    
    #Check Payment Response String Format  
    print("resultCd : " + result['resultCd'])  
    print("resultMsg : " + result['resultMsg'])  
    print("tXid : " + result['tXid'])  
    print("iMid : " + result['iMid'])  
    print("currency : " + result['currency'])  
    print("amount : " + result['amt'])  
    print("instmntMon : " + result['instmntMon'])  
    print("instmntType : " + result['instmntType'])  
    print("referenceNo : " + result['referenceNo'])  
    print("goodsNm : " + result['goodsNm'])  
    print("payMethod : " + result['payMethod'])  
    print("billingNm : " + result['billingNm'])  
    print("merchantToken : " + result['merchantToken'])  
    print("reqDt : " + result['reqDt'])  
    print("reqTm : " + result['reqTm'])  
    print("status : " + result['status'])
    

    Contoh response JSON structured (when success) :

    {
        "reqTm": "151024",
        "resultCd": "0000",
        "goodsNm": "Test Transaction Nicepay",
        "referenceNo": "99999",
        "transTm": "151024",
        "tXid": "IONPAYTEST02201706131510248946",
        "amt": "10000",
        "cancelAmt": null,
        "depositTm": "175005",
        "vacctNo": "1510248946",
        "resultMsg": "paid",
        "iMid": "IONPAYTEST",
        "billingNm": "Customer Name",
        "vacctValidDt": "20170620",
        "depositDt": "20170613",
        "payMethod": "02",
        "reqDt": "20170613",
        "bankCd": "BNIA",
        "currency": "IDR",
        "transDt": "20170613",
        "vacctValidTm": "235959",
        "status": "0"
    }
    

    API ini untuk permintaan untuk memeriksa status transaksi.

       
    API url /nicepay/api/onePassStatus.do
    Metode POST
    Deskripsi Permintaan Status Pesanan
    Merchant Token SHA256 (Merchant ID + Reference Number + amt + Merchant Key)

    Request POST Parameter

    Parameter Mandatory Tipe Ukuran Deskripsi
    iMid Y AN 10 Merchant ID
    merchantToken Y AN 255 generate SHA256 (Merchant ID + Reference Number + amt + Merchant Key)
    tXid Y AN 30 Transaction ID
    amt Y N 12 Transaction amount
    referenceNo Y ANS 40 Merchant order No

    Response Json Object

    Parameter Tipe Ukuran Deskripsi
    resultCd N 4 Result Code
    resultMsg N 255 Result Message
    tXid N 30 Transaction ID
    iMid N 10 Merchant ID
    referenceNo N 40 Merchant Order No
    payMethod N 2 Payment method. Refer Code at Here
    amt N 12 Payment amount
    cancelAmt N 12 Cancel amount
    reqDt N 8 Transaction request date
    reqTm N 6 Transaction request time
    transDt N 8 Transaction date
    transTm N 6 Transaction time
    depositDt N &nbsp Transaction deposit date
    depositTm N &nbsp Transaction deposit time
    currency N 3 Currency
    goodsNm N 100 Goods name
    billingNm N 30 Billing name
    status N 1 Transaction status<. Refer Code at Here
    authNo N 10 Approval number
    issueBankCd A 4 Issue bank code. Refer Code at Here
    acquBankCd A 4 Acquire bank code. Refer Code at Here
    cardNo AN 20 Card no with masking
    instmntMon N 2 Installment month
    instmntType N 2 Installment Type. Refer Code at Here
    preauthToken AN 255 Preauth Token
    recurringToken AN 255 Recurring token
    ccTransType AN 2 Credit card transaction type
    1: Normal
    2: Recurring
    3: Pre-auth
    4: Captured
    acquStatus AN 2 Purchase status
    00: not purchase
    01: later cancel not purchase
    10: finish purchase
    99: etc
    vat N 12 Vat number
    fee N 12 service fee
    notaxAmt N 12 tax free amount

    Additional Response Json Object for Virtual Account

    Parameter Tipe Ukuran Deskripsi
    bankCd N 4 Bank Code. Refer Code at Here
    vacctNo N 16 Bank Virtual Account number
    vacctValidDt N 8 VA expiry date
    vacctValidTm N 6 VA expiry time

    Additional Response Json Object for Others Payment Method

    Parameter Tipe Ukuran Deskripsi
    mitraCd A 4 Mitra Code. Refer Code at Here
    payNo N 12 CVS number
    payValidDt N 8 CVS expiry date
    payValidTm N 6 CVS expiry time
    receiptCode ANS 18 Authorization number
    mRefNo AN 20 Bank reference No

    Membatalkan Transaksi

    nicePay.setCancelMsg("Cancel Message");    
    nicePay.setAmt("1000");    
    nicePay.setFee("0");    
    nicePay.setVat("0");    
    nicePay.setNotaxAmt("0");    
    nicePay.setReqServerIP("127.0.0.1");    
    nicePay.setCancelUserId("");    
    nicePay.setUserIP("127.0.0.1");    
    nicePay.setCancelUserInfo("Customer cancel transaction");    
    nicePay.setCancelRetryCnt("3");    
    nicePay.setWorker("");    
    // Cancel Mandatory Field    
    nicePay.setTrxId("IONPAYTEST02201603091207051498");    
    nicePay.setPayMethod("02");    
    nicePay.setCancelType("1");    
    nicePay.setMerchantToken(nicePay.makeToken(nicePay.getAmt(), nicePay.getTrxId()));    
    // Cancel request    
    nicePay.cancel();    
    // Cancel Response    
    System.out.println("Response String : " + nicePay.getResponseString()); // JSON in String format    
    nicePay.getHtResponse(); // JSON in HashTable<String, String> format    
    String resultCd = nicePay.Get("resultCd");         
    String resultMsg = nicePay.Get("resultMsg");         
    String tXid= nicePay.Get("tXid ");         
    String referenceNo= nicePay.Get("referenceNo");   
    String transDt= nicePay.Get("transDt");   
    String transTm= nicePay.Get("transTm");   
    String description= nicePay.Get("description");   
    String amount= nicePay.Get("amount");
    
    string RequestType = "cancel";
    Nicepay Nicepay = new Nicepay();
    
    Nicepay.iMid = NicepayConfig.NICEPAY_IMID;
    Nicepay.tXid = tXid;
    Nicepay.amt = amt;
    Nicepay.merchantToken = merchantToken(Nicepay, RequestType);
    Nicepay.PayMethod = "02";
    Nicepay.cancelType = "1";
    
    objResult = objNicepayClass.Cancel (Nicepay);
    
    Tresult.InnerText = objResult.resultCd;
    TtXid.InnerText = objResult.tXid;
    TcallbackUrl.InnerText = objResult.callbackUrl;
    Tdescription.InnerText = objResult.description;
    TreferenceNo.InnerText = objResult.referenceNo;
    TpayMethod.InnerText = objResult.payMethod;
    //YYMMDD
    TtransDT.InnerText = objResult.transDt;
    //HH24MISS
    TTranstm.InnerText = objResult.transTm;
    TresultMsg.InnerText = objResult.resultMsg;
    
    <?php
    $nicepay = new NicepayLib();  
    if(!emptyempty($_POST['tXid']) && !emptyempty($_POST['tXid']))  
    {  
      $iMid               = $nicepay->iMid;  
      $tXid               = $_POST['tXid'];  
      $amt                = $_POST['amt'];  
    
      $nicepay->set('tXid', $tXid);  
      $nicepay->set('payMethod', '02');  
      $nicepay->set('amt', $amt);  
      $nicepay->set('iMid',$iMid);  
      $nicepay->set('cancelType', 1);  
    
      $merchantToken = $nicepay->merchantTokenC();  
      $nicepay->set('merchantToken', $merchantToken);  
    
      // <REQUEST to NICEPAY>  
      $response = $nicepay->cancel($tXid, $amt);  
    
      // <RESPONSE from NICEPAY>  
      echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';  
      echo "<pre>";  
      var_dump($response);  
      echo "</pre>";
    }
    ?>
    
    import json  
    
    from library import NICEPay  
    
    #Set MID & Merchant Key  
    NICEPay.iMid = "IONPAYTEST" #Set Merchant ID  
    NICEPay.merchantKey = "33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A==" #Set Merchant Key  
    
    #Set Mandatory Value  
    NICEPay.payMethod = "02"  
    NICEPay.amt = "1000"  
    NICEPay.tXid = "IONPAYTEST02201703301501243952"  
    NICEPay.cancelType = "1"  
    NICEPay.merchantToken = NICEPay.getMerchantTokenCancel()  
    
    #Set Optional Value  
    NICEPay.cancelMsg = "Cancel Message"  
    NICEPay.fee = "0"  
    NICEPay.vat = "0"  
    NICEPay.notaxAmt = "0"  
    NICEPay.reqServerIP = "127.0.0.01"  
    NICEPay.cancelUserId = "Admin"  
    NICEPay.userIP = "127.0.0.1"  
    NICEPay.cancelUserInfo = "Customer cancel transaction"  
    NICEPay.cancelRetryCnt = "5"  
    NICEPay.worker = "Worker"  
    
    #Cancel Request  
    resultCancel = NICEPay.cancel()  
    
    #Cancel Response  
    result = json.loads(resultCancel)  
    
    #Cancel Response String Format  
    print("resultCd : " + result['resultCd'])  
    print("resultMsg : " + result['resultMsg'])  
    print("tXid : " + result['tXid'])  
    print("referenceNo : " + result['referenceNo'])  
    print("transDt : " + result['transDt'])  
    print("transTm : " + result['transTm'])
    print("description : " + result['description'])
    print("amount : " + result['amount'])
    

    Contoh response JSON structured (when success) :

    {
        "tXid": "IONPAYTEST02201603091207051498",
        "referenceNo": "OrdNo20160525000-52104",
        "resultCd": "0000",
        "resultMsg": "SUCCESS",
        "transDt": "20160303",
        "transTm": "135959",
        "description": "Payment of OrdNo20160525000-52104",
        "amount": "1000",
        "canceltXid": "IONPAYTEST02201603091207051499"
    }
    

    API ini untuk permintaan membatalkan transaksi.
    Jenis transaksi yang bisa diminta:

    Code Deskripsi
    01 Credit Card
    02 Virtual Account
    03 CVS (Convenience Store)
       
    API url /nicepay/api/onePassAllCancel.do
    Metode POST
    Deskripsi untuk permintaan membatalkan transaksi Credit Card, Virtual Account, dan CVS
    Merchant Token SHA256 (Merchant ID + NICEPay Transaction ID + Amount + Merchant Key)

    Request POST Parameter

    Parameter Mandatory Tipe Ukuran Deskripsi
    iMid Y AN 10 Merchant ID
    merchantToken Y AN 255 generate SHA256 (Merchant ID + NICEPay Transaction ID + Amount + Merchant Key)
    tXid Y AN 30 Transaction ID
    payMethod Y AN 2 Payment method. Refer Code at Here
    cancelType Y N 2 Cancelation type
    amt Y N 12 Cancelation amount
    cancelMsg N AN 255 Cancelation message
    preauthToken N AN 100 Preauth Token
    fee N AN 12 service fee
    vat N N 12 Vat number
    notaxAmt N N 12 Number Tax Amount
    cancelServerIp N AN 15 Server IP address
    cancelUserId N AN 30 User ID
    cancelUserIp N AN 15 User IP address
    cancelUserInfo N AN 100 User Information for cancel reason
    cancelRetryCnt N N 2 Retry count for cancel
    worker N N 10 Worker

    Response Json Object

    Parameter Tipe Ukuran Deskripsi
    tXid AN 30 Transaction ID
    referenceNo ANS 30 Merchant order No
    resultCd N 4 Result code
    resultMsg AN 255 Result message
    transDt N 40 Transaction date
    transTm N 12 Transaction time
    description AN 255 Description
    amount N 8 Amount
    canceltXid AN 6 Cancel transaction ID

    Nicepay Code

    Field Type

    Value Code Meaning
    A Alphabet
    AN Alphabet Numeric
    N Numeric
    ANS Alphabet Numeric Symbol
    AOO Array of Object

    Installment Type

    Value Code Meaning
    1 Customer charge
    2 Merchant charge

    Payment Method

    Value Code Meaning
    01 Credit Card
    02 Virtual Account
    03 CVS (Convenience Store)
    04 ClickPay
    05 E-Wallet

    Payment Status Code

    Value Code Meaning
    Credit Card  
    0 Success
    1 Failed
    2 Void/Refund
    9 Initialization / Reversal
    Virtual Account  
    0 Paid
    3 Unpaid
    4 Expired
    CVS  
    0 Paid
    3 Unpaid
    4 Expired
    5 Ready to Paid (for Alfamart)

    Notification Status Code

    Value Code Meaning
    0 Deposit
    1 Reversal

    Notification Match Amount Indicator

    Value Code Meaning
    1 Match
    2 Over
    3 Under

    Cancel Type

    Value Code Meaning
    1 Full Cancellation
    2 Partial Cancellation

    Bank Code

    Value Code Meaning
    BMRI Bank Mandiri
    IBBK Bank International Indonesia Maybank
    BBBA Bank Permata
    CENA Bank Central Asia
    BNIN Bank Negara Indonesia 46
    HNBN Bank KEB Hana Indonesia
    BRIN Bank Rakyat Indonesia
    BNIA Bank PT. BANK CIMB NIAGA, TBK.
    BDIN Bank PT. BANK DANAMON INDONESIA, TBK
    OTHR etc, unknown

    Mitra Code

    Value Code Meaning
    ALMA CVS Alfamart
    INDO CVS Indomaret
    MDRC ClickPay Mandiri
    BCAC ClickPay BCA
    CIMC ClickPay CIMB
    MDRE E-Wallet Mandiri
    BCAE E-Wallet BCA(Sakuku)

    Error Code

    Value Description
      Common
    0000 Success
    1001 Connection error
    1002 Socket error
    1003 Server error
    1004 Timeout error
    9501 Invalid transaction number.
    9502 Transaction not allowed.
    9503 It has been stopped or terminated in its stores.
    9504 No offus information.
    9505 No bank information.
    9506 No Merchant Paymethod information.
    9507 Http timeout exception.
      Order
    8001 Order registration error.
    8002 Order inquiry error.
    8003 Order registration data error.
    8004 The tXid error during the order inquiry.
    8005 OrderAuthType API Response data null.
    9001 Failed to register your order. Please check your HTTP Message.
    9002 Server is busy. Please kindly try again in few minutes.
    9003 Invalid Order.
    9004 Error on inquiry of order confirmation.
    9005 Failed to check status. Please contact NICEPay for further information.
    9006 Transaction number generated error.
    9007 Undefined: Amount. Please check your request parameter and make sure [amt] is defined.
    9008 Invalid Request Amount. Amount should only number and do not includes decimal.
    9009 Reference Number already exist. Please generate unique [referenceNo].
    9010 Invalid Merchant Token. Contact NICEPay for further information.
    9011 Invalid MID, Merchant is not registered. Contact NICEPay for further information.
    9012 This Payment method is currently not activated. Contact Nicepay for further information.
    9013 Undefined: Currency Code. Please check your request parameter and make sure [currencyCode] is defined.
    9014 Undefined: Reference No. Please check your request parameter and make sure [referenceNo] is defined.
    9015 Undefined: Goods Name. Please check your request parameter and make sure [goodsNm] is defined.
    9016 Undefined: Buyer Name. Please check your request parameter and make sure [billingNm] is defined.
    9017 Undefined: Buyer Phone Number. Please check your request parameter and make sure [billingPhone] is defined.
    9018 Undefined: Buyer Email Address. Please check your request parameter and make sure [billingEmail] is defined.
    9019 Undefined: Callback URL. Please check your request parameter and make sure [callbackUrl] is defined.
    9020 Undefined: Debit Process URL. Please check your request parameter and make sure [dbProcessUrl] is defined.
    9021 Failed in inquiring the criterion information (BO_MER_MGNT ORD_NO_DUP_CHK_FLG).
    9022 Invalid Card Data. Please check [cartData] parameter, and make sure you send valid JSON format.
    9023 Invalid Cart Data. Amount is different with Cart Data total amount. Please make sure [amt] = sum of [amt] in [cartData]
    9024 Undefined: Customer IP Address. Please check your request parameter and make sure [userIP] is defined.
    9025 Undefined: Buyer City. Please check your request parameter and make sure [billingCity] is defined.
    9026 Undefined: Buyer State. Please check your request parameter and make sure [billingState] is defined.
    9027 Undefined: Buyer Postal Code. Please check your request parameter and make sure [billingPostCd] is defined.
    9028 Undefined: Buyer Country. Please check your request parameter and make sure [billingCountry] is defined.
    9029 Installment is not available for defined month
    9030 Transaction Fail. Please check information.
    9031 Date/Time check.
      Card
    8021 Card authorization error.
    8022 The tXid error during the card authorization.
    8023 The tXid error during the card net cancel.
    8024 The MID error during the card net cancel.
    8026 Failed card VISA 3D.
    8027 Invalid Parameter (PAN or expiry or country_code)
    8028 Invalid Parameter (callbackUrl)
    8029 Invalid Parameter (onePassToken)
    8030 Not Support Keyin Payment.
    9101 Server is busy. Please kindly try again in few minutes.
    9102 Server is busy. Please kindly try again in few minutes.
    9103 Error in inquiring card ledger.
    9104 Server is busy. Please kindly try again in few minutes.
    9105 Server is busy. Please kindly try again in few minutes.
    9106 Transaction failed.
    9107 Server is busy. Please kindly try again in few minutes.
    9108 This Payment method is currently not activated. Contact Nicepay for further information.
    9109 Reference Number Maximum Length Exceed. [referenceNo] should have maximum 40 characters length.
    9110 Transaction failed. Please check card information and try again.
    9111 Transaction failed. Please check card information and try again.
    9112 Transaction failed. Please check card information and try again.
    9113 Transaction failed. Please check card information and try again.
    9114 MERCHANT_CARDINFO query error.
    9115 Invalid Amount: too low. Please increase amount.
    9116 Transaction already exist. Please make new transaction.
    9117 3D Secure Failed. Please kindly check your card data and try again.
    9118 Invalid Installment Type.
    9119 Transaction failed: Invalid Terminal ID or Merchant ID
    9120 Transaction failed: Invalid Terminal ID or Merchant ID
    9121 This Payment method is currently not activated. Contact Nicepay for further information.
    9122 Transaction failed. Please check settlement interval.
    9123 Transaction failed. Transaction limit reached.
    9124 Invalid Amount: too low. Please increase amount.
    9125 Transaction failed. Please check card information and try again.
    9126 Transaction already approved.
    9127 Transaction already exist. Please make new transaction.
    9128 Transaction failed. Please check card information and try again.
    9129 Transaction failed: Expired transaction. Please make new transaction.
    9130 Forbidden. You do not have permission to access this resource.
    9131 Invalid Token. Please check [onePassToken] parameter
    9132 Transaction failed. Please check Risk Management.
    9133 Email not sent.
    9134 Card Recurring Token Failed.
    9135 Card Recurring Auto Void Failed.
    9136 Card Recurring Token Unregistraion Failed.
    9137 Card MIGS Transaction Number not found. (queryDR, vpc_DRExists : N)
    9138 Card MIGS SecureHash not match.
    9139 Card MIGS Amount not match.
    9140 Recurring Payment Parameter CVV code is mandatary.
    9141 Recurring Payment AuthType is '1' or '2'.
    9142 Cards issued overseas can not be paymented.
    9143 Card PreAuth Token Failed.
    9144 Card PreAuth Token Unregistraion Failed.
    9145 capture amount must be less than pre-authorised amount.
    9146 Failed to card token inquiry
    9147 Invalid parameters.
    9148 Recurring Token is only available for 3DS.
    9149 Recurring Payment Use Check : Fail.
    9150 Recurring Payment CVV Check : Fail.
    9151 cardBin Information exist in blackList.
    9152 FDS Check : high risk score.
    9153 FDS Check : binCountry is not local card.
    9154 card daily transaction limit count over.
    9155 card daily transaction limit amount over.
    9156 FDS Check : server communication error.
    9157 There is no valid authentication data. Please make new transaction.
    9158 Card Holder Name is Mandatory.
    9159 Transaction failed. please contact merchant.
    9160 Invalid expired date format YYMM
    9161 Token not found
    9162 FDS Check : binCountry is not permit to payment.
    00 Successful approval/completion or that V.I.P. PIN verification is valid
    01 Refer to card issuer
    02 Refer to card issuer, special condition
    03 Invalid merchant or service provider
    04 Pickup card
    05 Do not honor
    06 General Error
    07 Pickup card, special condition (other than lost/stolen card)
    08 Honor with identification
    09 Request in progress
    10 Partial Approval
    11 V.I.P. approval
    12 Invalid transaction
    13 Invalid amount (currency conversion field overflow) or amount exceeds maximum for card program
    14 Invalid account number (no such number)
    15 No such issuer
    16 Insufficient funds
    17 Customer cancellation
    19 Re-enter transaction
    20 Invalid response
    21 No action taken (unable to back out prior transaction)
    22 Suspected Malfunction
    25 Unable to locate record in file, or account number is missing from the inquiry
    28 File is temporarily unavailable
    30 Format Error
    41 Pickup card (lost card)
    43 Pickup card (stolen card)
    51 Insufficient funds
    52 No checking account
    53 No savings account
    54 Expired card
    55 Incorrect PIN
    57 Transaction not permitted to cardholder
    58 Transaction not allowed at terminal
    59 Suspected fraud
    61 Activity amount limit exceeded
    62 Restricted card (for example, in Country Exclusion table)
    63 Security violation
    65 Activity count limit exceeded
    68 Response received too late
    75 Allowable number of PIN - entry tries exceeded
    76 Unable to locate previous message (no match on Retrieval Reference number)
    77 Previous message located for a repeat or reversal, but repeat or reversal data are inconsistent with original message
    78 ’Blocked, first used’ - The transaction is from a new cardholder, and the card has not been properly unblocked.
    80 Visa transactions: credit issuer unavailable. Private label and check acceptance: Invalid date
    81 PIN cryptographic error found (error found by VIC security module during PIN decryption)
    82 Negative CAM, dCVV, iCVV, or CVV results
    83 Unable to verify PIN
    85 No reason to decline a request for account number verification, address verification, CVV2 verification, or a credit voucher or merchandise return
    91 Issuer unavailable or switch inoperative (STIP not applicable or available for this transaction)
    92 Destination cannot be found for routing
    93 Transaction cannot be completed, violation of law
    94 Duplicate Transmission
    95 Reconcile error
    96 System malfunction, System malfunction or certain field error conditions
    B1 Surcharge amount not permitted on Visa cards (U.S. acquirers only)
    N0 Force STIP
    N3 Cash service not available
    N4 Cashback request exceeds issuer limit
    N7 Decline for CVV2 failure
    P2 Invalid biller information
    P5 PIN Change/Unblock request declined
    P6 Unsafe PIN
    Q1 Card Authentication failed
    R0 Stop Payment Order
    R1 Revocation of Authorization Order
    R3 Revocation of All Authorizations Order
    XA Forward to issuer
    XD Forward to issuer
    Z3 Unable to go online
    C101 Error setting mandatory fields, TRANSACTION_TYPE is empty!
    C102 Invalid value for TRANSACTION_TYPE! Acceptable Value : QUERY=1, SALES=2, AUTHORIZED=3, CAPTURE=4
    C103 This transaction is not authorized, cannot proceed to be captured.
    C104 Error setting mandatory fields, MERCHANT_ACC_NO is empty!
    C105 Invalid MERCHANT_ACC_NO! Unable to find merchant with provided MERCHANT_ACC_NO.
    C106 The status of this MERCHANT_ACC_NO is suspended! All transactions are not allowed temporary. Please check with administrator for the status.
    C107 The status of this MERCHANT_ACC_NO is still pending and not yet activated. Please check with administrator for the status.
    C108 The status of this MERCHANT_ACC_NO is invalid! Please check the merchant setting.
    C109 The setting of this MERCHANT_ACC_NO does not allow the requested transaction type. Please check the merchant setting.
    C110 The setting of this MERCHANT_ACC_NO do not allow transaction request from this IP address. Please checks the merchant allow IP setting.
    C111 Error setting mandatory fields, AMOUNT is empty!
    C112 Invalid value for AMOUNT
    C113 Error setting mandatory fields, CARD_NO is empty!
    C114 Error setting mandatory fields, CARD_EXP_MM is empty!
    C115 Error setting mandatory fields, CARD_EXP_YY is empty!
    C116 Error setting mandatory fields, CARD_CVC is empty!
    C117 Invalid value for CARD_NO. CARD_NO must be numeric and with valid length!
    C118 Invalid value for CARD_EXP_MM. CARD_EXP_MM must be numeric and with valid length!
    C119 Invalid value for CARD_EXP_YY. CARD_EXP_YY must be numeric and with valid length!
    C120 Invalid value for CARD_CVC. CARD_CVC must be numeric and with valid length!
    C121 Invalid payment method. Please call bank to check Merchant Settings.
    C122 Amount has been over transaction limit for today. Please call bank to check Merchant Settings.
    C123 Transaction not permitted through this merchant type. Please call bank to check Merchant Settings.
    C124 Undefined Error. Error Code:1024
    C301 Error setting mandatory fields, TRANSACTION_ID is empty! TRANSACTION_ID is required for CAPTURE transaction type
    C302 Error setting mandatory fields, RETURN_URL is empty!
    C303 Error setting mandatory fields, RESPONSE_TYPE is empty!
    C304 Error setting mandatory fields, TXN_URL is Null for RESPONSE_TYPE using HTTP!
    C305 Invalid value for RESPONSE_TYPE for non-3D transaction! Acceptable Value : HTTP, XML, PLAIN
    C306 Error setting mandatory fields, TXN_SIGNATURE is empty!
    C307 Invalid value for TXN_SIGNATURE! Computed signature does not match one included in the request.
    C308 Invalid format for TXN_SIGNATURE! TXN_SIGNATURE must be length of 32, and in hexadecimal format.
    C309 Unable to find the transaction record!
    C310 MERCHANT_ACC_NO not matched with previous submitted transaction request! To capture/query previous transaction, please ensure the MERCHANT_ACC_NO is the same MERCHANT_ACC_NO submitted during previous transaction.
    C311 AMOUNT not matched with previous submitted transaction request! To capture/query previous transaction, please ensure the AMOUNT is the same AMOUNT submitted during previous transaction.
    C312 CUSTOMER_ID not matched with previous submitted transaction request! To capture/query previous transaction, if this field is being used, please ensure the CUSTOMER_ID is the same CUSTOMER_ID submitted during previous transaction.
    C313 MERCHANT_TRANID not matched with previous submitted transaction request! To capture/query previous transaction, please ensure the MERCHANT_TRANID is the same MERCHANT_TRANID submitted during previous transaction.
    C314 Insecure mode for RETURN_URL. Please specify an URL which uses HTTPS protocol!
    C315 Insecure mode for TXN_URL. Please specify an URL which uses HTTPS protocol!
    C401 Error setting mandatory fields, CARD_HOLDER_NAME is empty!
    C402 Error setting mandatory fields, MERCHANT_TRANID is empty!
    C403 Duplicate MERCHANT_TRANID detected! Please ensure the MERCHANT_TRANID is always unique.
    C404 Error setting mandatory fields, TXN_DESC is empty!
    C405 Error setting mandatory fields for 3D transaction, MPI_CODE is empty!
    C406 Error setting mandatory fields for 3D transaction, MPI_CAVV is empty!
    C407 Error setting mandatory fields for 3D transaction, MPI_CAVV_ALG is empty!
    C408 Error setting mandatory fields for 3D transaction, MPI_ECI is empty!
    C409 Error setting mandatory fields for 3D transaction, MPI_MSG is empty!
    C501 Error setting mandatory fields for fraud risk detection, FR_HIGHRISK_EMAIL is empty!
    C502 Error setting mandatory fields for fraud risk detection, FR_HIGHRISK_COUNTRY is empty!
    C503 Error setting mandatory fields for fraud risk detection, FR_BILLING_ADDRESS is empty!
    C504 Error setting mandatory fields for fraud risk detection, FR_SHIPPING_ADDRESS is empty!
    C505 Error setting mandatory fields for fraud risk detection, FR_SHIPPING_COST is empty!
    C506 Error setting mandatory fields for fraud risk detection, CUSTOMER_IP is empty!
    C507 Error setting mandatory fields for fraud risk detection, FR_PURCHASE_HOUR is empty!
    C508 Transaction was blocked due to fraud level exceeded threshold limit.
    C509 Transaction was blocked due to blacklisted card detected.
    C601 Unable to get connection to MPI Server!
    C602 Time out occurred during communication with MPI Server!
    C603 Unable to update MPI Ref. No in system. Please try again.
    C604 There was an error occurred during 3D authentication with MPI. Please check logs for details.
    C605 Invalid message or response received from MPI. Please try again.
    C606 MPI Settings are not configured correctly. Please check MPI_HOST and MPI_PORT in system configuration.
    C607 Error occurred when trying to display ACS Form in web browser for 3D authentication. Please try again.
    C608 Problem occurred on MPI side, cannot proceed to display ACS Form. Please check MPI message or try again.
    C609 Unable to locate back transaction to update system after 3-D authentication process. Please try again.
    C610 Empty response received from MPI, please try again.
    C611 MPI Code received is not allowed to proceed to process the transaction.
    C612 Transaction was aborted because 3-D authentication process is not completed.
    C613 Attempted duplicate submission of 3-D authentication result. Please try with new transaction.
    C614 MALL NAME is required for 3-D transaction. Please call bank to check Merchant Settings.
    C615 MALL URL is required for 3-D transaction. Please call bank to check Merchant Settings.
    C616 Invalid value for RESPONSE_TYPE for 3D transaction! Acceptable Value : HTTP only
    C801 This MERCHANT_ACC_NO is not authorized to proceed with this transaction via website! Please check the merchant setting.
    C802 This MERCHANT_ACC_NO is not authorized to proceed with this transaction via batch upload! Please check the merchant setting.
    C803 Exception while query Payment Server!
    C804 Exception while checking for fraud risk!
    C999 Internal Exception. Please call bank to report.
    C988 Server Time Out Exception.
    C977 Bank Connection Error!
    C966 Reply from bank is empty/incorrect!
    C967 Bank rejected transaction!
    C955 Error when trying to insert transaction table. Transaction ID is empty!
    C933 Server interruption occurred during processing. Manual checking required. Please inform Administrator.
    C935 Cancel payment by customer.
    C937 Insufficient point to redeem in cardholder's account. Please enter another card number.
    1 Transaction could not be processed
    2 Transaction Declined - Contact Issuing Bank
    3 Transaction Declined- No reply from Bank
    4 Transaction Declined - Expired Card
    5 Transaction Declined - Insufficient credit
    6 Transaction Declined - Bank system error
    7 Payment Server Processing Error - Typically caused by invalid input data such as an invalid credit card number. Processing errors can also occur. (This is only relevant for Payment Servers that enforce the uniqueness of this field) Processing errors can also occur.
    8 Transaction Declined - Transaction Type Not Supported
    9 Bank Declined Transaction (Do not contact Bank)
    A Transaction Aborted
    B Transaction Blocked - Returned
    C Transaction Cancelled
    D Deferred Transaction
    E Transaction Declined - Refer to card issuer
    F 3D Secure Authentication Failed
    I Card Security Code Failed
    L Shopping Transaction Locked (This indicates that there is another transaction taking place using the same shopping transaction number)
    N Cardholder is not enrolled in 3D Secure (Authentication Only)
    P Transaction is Pending
    R Retry Limits Exceeded, Transaction Not Processed
    T Address Verification Failed
    U Card Security Code Failed
    V Address Verification and Card Security Code Failed
      Virtual Account
    8041 Virtual account registration error.
    8042 The tXid error during the vertual account registration.
    8045 requestVacctCustomerInquiryAPI is null.
    9201 Server is busy. Please kindly try again in few minutes.
    9202 Server is busy. Please kindly try again in few minutes.
    9203 Failed to generate virtual account. Pool is empty or reached maximum.
    9204 Server is busy. Please kindly try again in few minutes.
    9205 Failed to generate virtual account. Invalid Virtual Account.
    9206 Server is busy. Please kindly try again in few minutes.
    9207 Reference Number Maximum Length Exceed. [referenceNo] should have maximum 40 characters length.
    9208 Error in non-usage of criterion information.
    9209 the payment amount is too small.
    9210 Error in expiration date of deposit, expiration time for deposit, and inclusion of letters.
    9211 Expiration date and time for deposit length is not valid.
    9212 Error of check for merchant ID, payment method.
    9213 TB_TRANS_HISTORY registration error.
    9214 Failed in inquiring settlement interval.
    9215 Order number redundancy check (TB_MOID_VERIFY) updates error.
    9216 Virtual account failure ledger (TB_VACCT_FAIL) registration error.
    9217 Order number redundancy check (TB_MOID_VERIFY) delete error.
    9218 Virtual account ledger inquiry failure.
    9219 Server is busy. Please kindly try again in few minutes.
    9220 Server is busy. Please kindly try again in few minutes.
    9221 Error in non-usage of criterion information(VACCT_SET).
    9222 Error in non-usage of criterion information(VACCT_CONT).
    9223 Invalid customer id.
    9224 Error of check for customerId.
    9225 Invalid Merchant Token. Contact NICEPay for further information.
    9226 VacctNo is exceeded limit digit.
    9227 DB insert error.
    9228 Transaction not found.
    9229 Fix account accountType error.
    9230 Not exist customerId.
    9231 Data is null error.
    9232 iMid is exist.
    9233 vacctNo is duplicate.
    9234 customerId already exist.
    9235 Invalid customer name.
    9236 Try check date.
    9237 Invalid BankCd.
      Cancel
    8061 Full canceled error.
    8062 Partial cancled error.
    8063 The MID error during the full cancel.
    8064 The tXID error during the full cancel.
    8065 The MID error during the partial cancel.
    8066 The tXID error during the partial cancel.
    8067 The amount error during the partial cancel.
    8090 Net canceled error.
    9301 Invalid Cancel Type.
    9302 Server is busy. Please kindly try again in few minutes.
    9303 Server is busy. Please kindly try again in few minutes.
    9304 TB_TRANS_HISTORY update error.
    9305 Ledger card registration error.
    9306 Ledger partial cancel registration error.
    9307 Cards query error.
    9308 Database connection error.
    9309 Bank connection error.
    9310 TB_TRANS HISTORY registration error.
    9311 Transaction number generated error.
    9312 No cancellation amount or cancellation amount includes the letter.
    9313 Partial cancellation is only possible mandiri.
    9314 Can not cancel your request transaction number.
    9315 Cancel Ledger duplicate registration error.
    9316 Bank code duplication errors.
    9317 Bank Mandiri is available once a partial canceled.
    9318 Virtual account can not request to cancel.
    9319 The amount you entered is larger than the amount you want to cancel.
    9320 Can not cancel the entire data already partially canceled.
    9321 Please fill in the requested amount greater than zero.
    9322 Merchant infomaition(CARD_BIN) query fail.
    9323 Merchant infomaition(Merchant_INFO) query fail.
    9324 MERCHANT_CARDINFO query error.
    9325 B_MID,B_TID query error.
    9326 It can not be canceled after purchase.
    9327 It can not be partial cancelation before purchase.
    9328 The information can not be canceled (Void Risk Check).
    9329 The information can not be partial cancelation (Void Risk Check).
    9330 Virtual account deposit has been completed can not be canceled.
    9331 The merchant can not be canceled.
    9332 The merchant can not be partial cancellation.
    9333 The merchant can not be cancellation. (Debt cancellation prevent restrictions)
    9334 Cancellation period exceeds(limit 90 days).
      One Pass
    8200 One Pass inquiry error.
    8201 OnePass Token Duplicate.
    8202 OnePass Invalid Amount.
      CVS
    9501 Server is busy. Please kindly try again in few minutes.
    9502 Server is busy. Please kindly try again in few minutes.
    9503 Failed to generate CVS Number. Pool is empty or reached maximum.
    9504 Server is busy. Please kindly try again in few minutes.
    9505 Failed to generate virtual account. Invalid CVS.
    9506 Server is busy. Please kindly try again in few minutes.
    9507 Reference Number Maximum Length Exceed. [referenceNo] should have maximum 40 characters length.
    9508 Error in non-usage of criterion information.
    9509 the payment amount is too small.
    9510 Error in expiration date of deposit, expiration time for deposit, and inclusion of letters.
    9511 Expiration date and time for deposit length is not valid.
    9512 Error of check for merchant ID, payment method.
    9513 TB_TRANS_HISTORY registration error.
    9514 Failed in inquiring settlement interval.
    9515 Order number redundancy check (TB_MOID_VERIFY) updates error.
    9516 CVS NUmber failure ledger (TB_CVS_FAIL) registration error.
    9517 Order number redundancy check (TB_MOID_VERIFY) delete error.
    9518 CVS ledger inquiry failure.
    9519 Server is busy. Please kindly try again in few minutes.
    9520 Server is busy. Please kindly try again in few minutes.
    9521 Error in non-usage of criterion information(CVS_SET).
    9522 Error in non-usage of criterion information(MITRA_CONT).
    9523 Invalid customer id.
    9524 Error of check for customerId.
    9525 Invalid Merchant Token. Contact NICEPay for further information.
    9526 CVS Number is exceeded limit digit.
    9527 DB insert error.
    9528 Transaction not found.
    9529 Fix account accountType error.
    9530 Not exist customerId.
    9531 Data is null error.
    9532 iMid is exist.
    9533 CVS Number is duplicate.
    9534 customerId already exist.
    9535 Invalid customer name.
    9536 Try check date.
      EWALLET
    9750 E-Wallet Generate ID Fail.
    9751 Invalid Parameter.
    9752 E-Wallet Payment Fail.
      CLICKPAY
    9801 Internal system error
    9802 Invalid parameter
    9803 User registration error
    9804 Invalid Token
    9805 Invalid Card Number
    9806 Transaction Payment Fail
    9807 Transaction Reversal Fail
    9808 TXID is duplicate
    9809 Failed in inquiring settlement interval
    9810 Other error

    CIMB Error Code

    Value Description
    0 APPROVED OR COMPLETED
    1001 Error setting mandatory fields, TRANSACTION_TYPE is empty!
    1002 Invalid value for TRANSACTION_TYPE! Acceptable Value : QUERY=1, SALES=2, AUTHORIZED=3, CAPTURE=4
    1003 This transaction is not authorized, cannot proceed to be captured.
    1004 Error setting mandatory fields, MERCHANT_ACC_NO is empty!
    1005 Invalid MERCHANT_ACC_NO! Unable to find merchant with provided MERCHANT_ACC_NO.
    1006 The status of this MERCHANT_ACC_NO is suspended! All transactions are not allowed temporary. Please check with administrator for the status.
    1007 The status of this MERCHANT_ACC_NO is still pending and not yet activated. Please check with administrator for the status.
    1008 The status of this MERCHANT_ACC_NO is invalid! Please check the merchant setting.
    1009 The setting of this MERCHANT_ACC_NO does not allow the requested transaction type. Please check the merchant setting.
    1010 The setting of this MERCHANT_ACC_NO do not allow transaction request from this IP address. Please checks the merchant allow IP setting.
    1011 Error setting mandatory fields, AMOUNT is empty!
    1012 Invalid value for AMOUNT
    1013 Error setting mandatory fields, CARD_NO is empty!
    1014 Error setting mandatory fields, CARD_EXP_MM is empty!
    1015 Error setting mandatory fields, CARD_EXP_YY is empty!
    1016 Error setting mandatory fields, CARD_CVC is empty!
    1017 Invalid value for CARD_NO. CARD_NO must be numeric and with valid length!
    1018 Invalid value for CARD_EXP_MM. CARD_EXP_MM must be numeric and with valid length!
    1019 Invalid value for CARD_EXP_YY. CARD_EXP_YY must be numeric and with valid length!
    1020 Invalid value for CARD_CVC. CARD_CVC must be numeric and with valid length!
    1021 Invalid payment method. Please call bank to check Merchant Settings.
    1022 Amount has been over transaction limit for today. Please call bank to check Merchant Settings.
    1023 Transaction not permitted through this merchant type. Please call bank to check Merchant Settings.
    1024 Undefined Error. Error Code:1024
    3001 Error setting mandatory fields, TRANSACTION_ID is empty! TRANSACTION_ID is required for CAPTURE transaction type
    3002 Error setting mandatory fields, RETURN_URL is empty!
    3003 Error setting mandatory fields, RESPONSE_TYPE is empty!
    3004 Error setting mandatory fields, TXN_URL is Null for RESPONSE_TYPE using HTTP!
    3005 Invalid value for RESPONSE_TYPE for non-3D transaction! Acceptable Value : HTTP, XML, PLAIN
    3006 Error setting mandatory fields, TXN_SIGNATURE is empty!
    3007 Invalid value for TXN_SIGNATURE! Computed signature does not match one included in the request.
    3008 Invalid format for TXN_SIGNATURE! TXN_SIGNATURE must be length of 32, and in hexadecimal format.
    3009 Unable to find the transaction record!
    3010 MERCHANT_ACC_NO not matched with previous submitted transaction request! To capture/query previous transaction, please ensure the MERCHANT_ACC_NO is the same MERCHANT_ACC_NO submitted during previous transaction.
    3011 AMOUNT not matched with previous submitted transaction request! To capture/query previous transaction, please ensure the AMOUNT is the same AMOUNT submitted during previous transaction.
    3012 CUSTOMER_ID not matched with previous submitted transaction request! To capture/query previous transaction, if this field is being used, please ensure the CUSTOMER_ID is the same CUSTOMER_ID submitted during previous transaction.
    3013 MERCHANT_TRANID not matched with previous submitted transaction request! To capture/query previous transaction, please ensure the MERCHANT_TRANID is the same MERCHANT_TRANID submitted during previous transaction.
    3014 Insecure mode for RETURN_URL. Please specify an URL which uses HTTPS protocol!
    3015 Insecure mode for TXN_URL. Please specify an URL which uses HTTPS protocol!
    4001 Error setting mandatory fields, CARD_HOLDER_NAME is empty!
    4002 Error setting mandatory fields, MERCHANT_TRANID is empty!
    4003 Duplicate MERCHANT_TRANID detected! Please ensure the MERCHANT_TRANID is always unique.
    4004 Error setting mandatory fields, TXN_DESC is empty!
    4005 Error setting mandatory fields for 3D transaction, MPI_CODE is empty!
    4006 Error setting mandatory fields for 3D transaction, MPI_CAVV is empty!
    4007 Error setting mandatory fields for 3D transaction, MPI_CAVV_ALG is empty!
    4008 Error setting mandatory fields for 3D transaction, MPI_ECI is empty!
    4009 Error setting mandatory fields for 3D transaction, MPI_MSG is empty!
    5001 Error setting mandatory fields for fraud risk detection, FR_HIGHRISK_EMAIL is empty!
    5002 Error setting mandatory fields for fraud risk detection, FR_HIGHRISK_COUNTRY is empty!
    5003 Error setting mandatory fields for fraud risk detection, FR_BILLING_ADDRESS is empty!
    5004 Error setting mandatory fields for fraud risk detection, FR_SHIPPING_ADDRESS is empty!
    5005 Error setting mandatory fields for fraud risk detection, FR_SHIPPING_COST is empty!
    5006 Error setting mandatory fields for fraud risk detection, CUSTOMER_IP is empty!
    5007 Error setting mandatory fields for fraud risk detection, FR_PURCHASE_HOUR is empty!
    5008 Transaction was blocked due to fraud level exceeded threshold limit.
    5009 Transaction was blocked due to blacklisted card detected.
    6001 Unable to get connection to MPI Server!
    6002 Time out occurred during communication with MPI Server!
    6003 Unable to update MPI Ref. No in system. Please try again.
    6004 There was an error occurred during 3D authentication with MPI. Please check logs for details.
    6005 Invalid message or response received from MPI. Please try again.
    6006 MPI Settings are not configured correctly. Please check MPI_HOST and MPI_PORT in system configuration.
    6007 Error occurred when trying to display ACS Form in web browser for 3D authentication. Please try again.
    6008 Problem occurred on MPI side, cannot proceed to display ACS Form. Please check MPI message or try again.
    6009 Unable to locate back transaction to update system after 3-D authentication process. Please try again.
    6010 Empty response received from MPI, please try again.
    6011 MPI Code received is not allowed to proceed to process the transaction.
    6012 Transaction was aborted because 3-D authentication process is not completed.
    6013 Attempted duplicate submission of 3-D authentication result. Please try with new transaction.
    6014 MALL NAME is required for 3-D transaction. Please call bank to check Merchant Settings.
    6015 MALL URL is required for 3-D transaction. Please call bank to check Merchant Settings.
    6016 Invalid value for RESPONSE_TYPE for 3D transaction! Acceptable Value : HTTP only
    8001 This MERCHANT_ACC_NO is not authorized to proceed with this transaction via website! Please check the merchant setting.
    8002 This MERCHANT_ACC_NO is not authorized to proceed with this transaction via batch upload! Please check the merchant setting.
    8003 Exception while query Payment Server!
    8004 Exception while checking for fraud risk!
    9999 Internal Exception. Please call bank to report.
    9988 Server Time Out Exception.
    9977 Bank Connection Error!
    9966 Reply from bank is empty/incorrect!
    9967 Bank rejected transaction!
    9955 Error when trying to insert transaction table. Transaction ID is empty!
    9933 Server interruption occurred during processing. Manual checking required. Please inform Administrator.
    9935 Cancel payment by customer.
    9937 Insufficient point to redeem in cardholder's account. Please enter another card number.

    Inquiry

    Have any inquiry ?
    Feel free contact us : it@nicepay.co.id.

    F.A.Q

    No Topik
    1. Apakah yang dimaksud dengan callback URL?
    Jawab Callback URL merupakan suatu URL yang memproses dan melakukan validasi terhadap hasil data transaksi yang di dapat.
    2. Apakah yang dimaksud dengan dbprocess URL?
    Jawab DbProcess URL merupakan suatu URL yang disediakan untuk menerima dan memproses notifikasi pembayaran.
    3. Apakah merchant dapat melakukan cek status pembayaran?
    Jawab Ya, NICEPAY menyediakan fitur untuk melakukan pengecekan status yang sudah tersedia di librari-librari yang telah disediakan.
    4. Apakah merchant bisa menggunakan Mid & Merchant Key testing di Live Environment?
    Jawab Ya, untuk Mid & Merchant Key testing bisa digunakan di Live Environtment.
    5. Jika ada pembayaran customer yang ditolak, apa yang perlu merchant lakukan?
    Jawab Merchant bisa melakukan pengecekan terlebih dahulu, apakah nomor virtual account, batas waktu pembayaran, dan nominal tagihan sesuai dengan invoice? Jika sudah benar semua namun tetap gagal, maka coba dahulu menggunakan fasilitas lain. sebagai contoh, pembayaran menggunakan ATM gagal, maka coba pembayaran menggunakan E-Banking. Jika pembayaran masih tetap mengalami masalah, silahkan hubungi Customer Service kami.
    6. Bagaimana jika customer sudah berhasil melakukan pembayaran, namun tidak mendapatkan email konfirmasi bayaran?
    Jawab Dalam kondisi normal, customer akan mendapatkan email konfirmasi dalam waktu maksimal 5 menit setelah pembayaran. Jika tetap tidak mendapatkan email konfirmasi, silahkan mengirimkan email kepada customer service kami disertai bukti pembayaran.

    Test Postman

    Enterprise Proffesional

    Changelog

    API Changelog Info

    1.18.9

    18 April 2018

    1. Update Error Code

    1.18.5

    1 February 2018

    1. Add parameter cardHolderNm on Payment API

    1.17.2

    29 Mar 2017

    1. Add ClickPay Payment

    1.17.1

    24 Mar 2017

    1. Add card installment API
    2. Add notification parameter