NICEPAY API
API Version 2 (V2)
Authentication
10 min
authentication process authentication is an {{api}} security procedure to recognize {{the}} identity of a foreign request if {{the}} identity is recognized by {{the}} {{system}} , then {{the}} request can access {{the}} {{api}} in this case, {{nicepay}} first requires an {{api}} key identity called merchantkey from your request so you can connect with {{nicepay}} without any obstacles apart from merchantkey , you are also required to send {{the}} mandatory {{parameter}} , namely merchanttoken merchant key {{merchant}} keys are divided into two types, namely sandbox credentials and production credentials sandbox credentials if you want to test our {{api}} first before carrying out {{the}} {{integration}} {{process}} with {{nicepay}} , please use {{the}} following credentials provided below using imid ionpaytest imid is an identity or your id as a {{merchant}} on {{nicepay}} imid that is only devoted to your {{business}} usage will be given after you officially register as our {{merchant}} to perform {{testing}} , please use imid ionpaytest and {{the}} specific {{merchant}} key in sandbox credentials imid (merchant id) (merchant id) ionpaytest (autopaid) merchantkey 33f49gncms1mfylgxisbudzvf2atwcl9k3r++d5hdd3frmuos/xlx8xhxpe+ldyabpgkzyswtlyylots/8ad7a== the credentials above are provided for {{testing}} purposes only and {{the}} {{payment}} {{process}} will be made successful automatically (autopaid) production/live credentials if you are already registered as a {{nicepay}} {{merchant}} and want to perform {{the}} {{integration}} stage with real {{transaction}} s, you can view {{the}} merchantkey that we specifically created with your imid in {{the}} portal merchant back office docid\ s2zo71iysoasepjtevvn7 here are {{the}} steps to get merchantkey access your merchant back office docid\ s2zo71iysoasepjtevvn7 dashboard {{select}} a {{menu}} profile docid 0sj7jmnwelem0erwc5ho9 {{select}} a {{sub menu}} merchant data docid\ nb vvz we7tfpvae q bw {{select}} tab other scroll down to get your merchantkey don't forget to include {{the}} imid {{parameter}} according to {{the}} registered imid for your {{business}} when integrating with us merchant token merchanttoken uses by {{the}} {{merchant}} to proceed {{the}} security authentication {{process}} with {{the}} {{nicepay}} {{system}} this {{parameter}} was created using {{the}} sha 256 hashing method that includes {{parameter}} s imid , merchantkey along with {{the}} other variables needed here are {{the}} details of {{merchant}} token //generate merchanttoken// merchantdata = timestamp + imid + refno + amount + merchantkey; mertok = cryptojs sha256(merchantdata) tostring(cryptojs enc hex); sample merchantdata = 20221202101271 + ionpaytest + ordno 20221202101271 + 100000 + 33f49gncms1mfylgxisbudzvf2atwcl9k3r++d5hdd3frmuos/xlx8xhxpe+ldyabpgkzyswtlyylots/8ad7a== mertok = d7c10cfccd64fdb21836f4330bb23f9ed357bc4b02420399d48b4661b89a55a0 parameter type size description timestamp n 14 transaction timestamp ( yyyymmddhhmmss) imid an 10 {{merchant}} id refno ans 40 {{merchant}} 's reference number amount n 12 amount merchantkey ans 88 {{merchant}} key nicepay api url here's {{the}} {{nicepay}} {{api}} url you can use according to your needs this url must be requested via {{the}} https protocol to connect with us environment protocol base url development https https //dev nicepay co id/ staging https https //staging nicepay co id/ production https https //www nicepay co id/ payment method testing after you got all {{the}} authentication requirements that can interact with our {{api}} , please visit {{the}} {{page}} below to test with our {{service}} s payment method credential credit card credit card integration & testing docid 2focrf187wmmssoaih3mb virtual account va integration & testing docid\ j 3a7xe6q 2tn8a5gcvjv convenience store cvs integration & testing docid\ uwt1vzzlvtcndnwemm0mr direct debit direct debit integration & testing docid 9lg6vxg1smifzr4nqi1 f e wallet e wallet integration & testing docid\ obca35upc pltziltbrpa payloan payloan integration & testing docid\ fjbpvqodhmmuio 0mapii gpn gpn integration & testing docid\ ygbhonzjx g4c v3sc3g1 qris qris integration & testing docid\ oyhpaefp8i5jksh3zmq l payout payout integration & testing docid gewjzqlroidk21h yakj see also {{visit}} {{the}} postman collection docid\ gwko d7n1xnzuouj7xlvd {{page}} to find out how to test {{nicepay}} {{api}} by using postman {{visit}} {{the}} nicepay library docid\ ndxoeregy9jswxl7rgp9c {{page}} to find out {{the}} used sdk on {{nicepay}}