Getting Started
Hands On API
15 min
enjoy our nicepay product and service with a single integrated api that is secure also easy to integrate into your business start the rapid integration process only in 15 minutes! precondition mid/imid (merchant id) api key (merchant key) nicepay sdk optional please check this authentication page first to get the precondition requirements payment flow payment flow step description of credit card redirect with 3ds the customer performs checkout the customer sends checkout data to merchant the merchant requests checkout using registration api to nicepay nicepay registers checkout data nicepay redirects payment to the nicepay page to merchant the merchant sends nicepay payment page to customer the customer chooses a payment method the customer inputs card data the customer sends card data information to nicepay nicepay processes fds calculation nicepay requests 3ds to bank bank performs 3ds validation bank sends response url 3ds to nicepay nicepay receives verification response nicepay redirects customer to acs authentication page bank creates otp response bank sends otp to customer the customer receives otp the customer inputs otp the customer sends otp to bank bank performs otp verification bank sends 3ds result to nicepay nicepay receives checking results nicepay requests payment to bank bank proceeds with the payment process bank sends payment notification to nicepay nicepay redirects callbackurl to merchant the merchant displays callbackurl result to customer nicepay sends payment notifications to merchant the merchant receives the notification the merchant performs request inquiry to nicepay nicepay receives the request nicepay automatically sends an inquiry response to merchant the merchant receives the last status the merchant sends the transaction result page to customer payment integration on this process, you will use our checkout product all nicepay checkout api transactions will redirect to nicepay secure payment page as the payment process follow these five easy steps to perform payment integration with nicepay perform call transaction registration api redirect to nicepay secure payment page process payment on nicepay secure payment page nicepay will redirect end user to merchant callbackurl merchant perform call status inquiry api transaction registration api end point https //dev nicepay co id/nicepay/redirect/v2/registration https //dev nicepay co id/nicepay/redirect/v2/registration request method post post header content type application/json description perform transction registration merchant token sha256(timestamp+imid+referenceno+amt+merchantkey) request { "timestamp" "20221012080918", "imid" "ionpaytest", "paymethod" "00", "currency" "idr", "amt" "10000", "referenceno" "order20221012080918", "callbackurl" "https //dev nicepay co id/ionpay client/paymentresult jsp", "goodsnm" "test transaction nicepay", "billingnm" "john doe", "billingphone" "081288998899", "billingemail" "john doe\@example com", "billingaddr" "jln raya kasablanka kav 88", "billingcity" "south jakarta", "billingstate" "dki jakarta", "billingpostcd" "12800", "billingcountry" "indonesia", "deliverynm" "delivery\@example com", "deliveryphone" "081288998899", "deliveryaddr" "jln raya kasablanka kav 88", "deliverycity" "south jakarta", "deliverystate" "dki jakarta", "deliverypostcd" "12800", "deliverycountry" "indonesia", "dbprocessurl" "https //merchant com/api/dbprocessurl/notif", "merchanttoken" "d8d0968892c568bc6ff5adc17cd755f85334a0b58fce85392682993a9ba653ed", "userip" "127 0 0 1", "cartdata" "{\\"count\\" 3,\\"item\\" \[{\\"goods id\\" 30,\\"goods name\\" \\"beanie\\",\\"goods type\\" \\"accessories\\",\\"goods amt\\" 1000,\\"goods sellers id\\" \\"nicepay namamerchant\\",\\"goods sellers name\\" \\"nicepayshop\\",\\"goods quantity\\" 1,\\"goods url\\" \\"http //www nicestore com/product/beanie/\\"},{\\"goods id\\" 31,\\"goods name\\" \\"belt\\",\\"goods type\\" \\"accessories\\",\\"goods amt\\" 5000,\\"goods sellers id\\" \\"nicepay namamerchant\\",\\"goods sellers name\\" \\"nicepayshop\\",\\"goods quantity\\" 1,\\"goods url\\" \\"http //www nicestore store/product/belt/\\"},{\\"img url\\" \\"http //www jamgora com/media/avatar/noimage png\\",\\"goods name\\" \\"shipping fee\\",\\"goods id\\" \\"shipping for ref no 278\\",\\"goods detail\\" \\"flat rate\\",\\"goods type\\" \\"shipping with flat rate\\",\\"goods amt\\" \\"4000\\",\\"goods sellers id\\" \\"nicepay namamerchant\\",\\"goods sellers name\\" \\"nicepayshop\\",\\"goods quantity\\" \\"1\\",\\"goods url\\" \\"https //wwww nicestore store\\"}]}", "sellers" "\[{\\"sellersid\\" \\"nicepay namamerchant\\",\\"sellersnm\\" \\"nicepayshop\\",\\"sellersurl\\" \\"http //nicestore store/product/beanie/\\",\\"sellersemail\\" \\"nicepay\@nicepay co id\\",\\"sellersaddress\\" {\\"sellernm\\" \\"nicepayshop\\",\\"sellerlastnm\\" \\"nicepayshop\\",\\"selleraddr\\" \\"jln kasablanka kav 88\\",\\"sellercity\\" \\"jakarta\\",\\"sellerpostcd\\" \\"14350\\",\\"sellerphone\\" \\"082111111111\\",\\"sellercountry\\" \\"id\\"}}]", "instmnttype" "2", "instmntmon" "1", "recurropt" "0", "bankcd" "", "mitracd" "", "merfixacctid" "", "vacctvaliddt" "", "vacctvalidtm" "" } response { "resultcd" "0000", "resultmsg" "success", "txid" "ionpaytest00202212191025073439", "referenceno" "order20221012080918", "paymethod" "00", "amt" "10000", "transdt" "20221219", "transtm" "102508", "description" null, "currency" "idr", "goodsnm" "test transaction nicepay", "billingnm" "john doe", "payvaliddt" null, "payvalidtm" null, "paymenturl" "https //dev nicepay co id/nicepay/redirect/v2/payment" } access further api specification on registration api checkout transaction payment api end point https //dev nicepay co id/nicepay/redirect/v2/payment https //dev nicepay co id/nicepay/redirect/v2/payment request method get get header content type application/form urlencoded description perform transction registration merchant token sha256(timestamp+imid+referenceno+amt+merchantkey) after receive response, you can redirect customer to nicepay payment page that url is a combination of paymenturl + txid as response parameter that will has a result like this example https //dev nicepay co id/nicepay/redirect/v2/payment?txid=ionpaytest00202212191025073439 example at the above is transaction payment using credit card payment method find the complete api specification on credit card api checkout callback handling after user choose credit card as the payment method, user will redirect to merchant page by callbackurl with post method and sending parameter when callback to your callbackurl have been received, we strongly recommend merchant to verify status by using status inquiry api credit card callback handling is very helpful to minimize fraud actions we strongly recommend merchants to verify the callback parameter callbackurl "callbackurl" "https //www merchant com/callbackurl/" callback parameter { "resultcd" "0000", "resultmsg" "success", "txid" "ionpaytest01202212141112221428", "referenceno" "", "paymethod" "01", "amt" "10000", "transdt" "20221212", "transtm" "121212", "description" "testing credit card transaction", "authno" "080623", "issubankcd" "othr" "acqubankcd" "bmri", "cardno" "453211 1111", "goodsnm" "test transaction nicepay" "billingnm" "john doe", "currency" "idr", "timestamp" "20221212121212", "merchanttoken" "2035d2295d9578fffb40137186f0203474142ae3e57992d4847826c5fcaffce6", "cardexpyymm" "2712", "instmntmon" "1", "instmnttype" "1", "cctranstype" "1" } congratulations! you have successfully perform an integration trial! explore further through the link below see also find out explanation about payment method and custom product on payment page find further explanation related product available on nicepay at the checkout page visit the payout page to learn the detail of api used visit the messaging page to learn about nicepay’s messaging service