NICEPAY API
...
API Virtual Account SNAP
Check Status Transaction - API Virtual Account SNAP
10 min
about check status transaction api virtual account snap this api with the snap standards uses by the merchant to request status inquiry checking to nicepay check status transaction api please request the access token firsthand before doing the authentication through the docid 92feymrqs iebhxrfgxuq section 180,555,117 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type request check status header parameter 144,77,85,105,253 true unhandled content type center unhandled content type center unhandled content type center unhandled content type unhandled content type unhandled content type unhandled content type center unhandled content type center unhandled content type center unhandled content type unhandled content type unhandled content type unhandled content type center unhandled content type center unhandled content type center unhandled content type unhandled content type unhandled content type unhandled content type center unhandled content type center unhandled content type center unhandled content type unhandled content type unhandled content type unhandled content type center unhandled content type center unhandled content type center unhandled content type unhandled content type unhandled content type unhandled content type center unhandled content type center unhandled content type center unhandled content type unhandled content type unhandled content type unhandled content type center unhandled content type center unhandled content type center unhandled content type unhandled content type unhandled content type unhandled content type center unhandled content type center unhandled content type center unhandled content type unhandled content type unhandled content type request check status body parameter for partnerserviceid and virtualaccountno parameters can send with an empty value 169,76,88,110,144 true unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type response check status parameter true 222,0,73,0,192 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type sample parameter for check status transaction api virtual account snap request parameter curl curl location 'https //dev nicepay co id/nicepay/api/v1 0/transfer va/status' \\ \ header 'content type application/json' \\ \ header 'authorization bearer eyj0exaioijkv1qilcjhbgcioijiuzi1nij9 eyjzdwiioijjt05qqvlurvnuiiwiaxnzijoitkldrvbbwsisim5hbwuioijcukloiiwizxhwijoimjaync0wmi0xmvqwodowotoznvoifq== aiyblx36dywffvw7dcoenxkoe2eawiyq84ztpuif3k8=' \\ \ header 'x timestamp 2024 12 31t10 11 40+07 00' \\ \ header 'x signature ufbw7r8rhw79ioiv/hlv607m60qzaybv8uzmbsryb6/thlo/fhqvp4xryeluehoss9o+qs6vwtkb/ygtucc+tq==' \\ \ header 'x partner id normaltest' \\ \ header 'x external id txid202402111402271707638094' \\ \ header 'channel id normaltest' \\ \ data '{ "partnerserviceid" "99123040", "customerno" "00007307", "virtualaccountno" "9912304000007307", "inquiryrequestid" "txid202402111402271707638094", "additionalinfo" { "totalamount" { "value" "10000 00", "currency" "idr" }, "trxid" "2024123000000000000001", "txidva" "normaltest02202401181001033629" } }' node js let config = { isproduction false, privatekey cons privatekey, clientsecret cons clientsecret, clientid cons clientid, iscloudserver false, }; let paramcheckstatus = { body { partnerserviceid "99123040", customerno "00007307", virtualaccountno "9912304000007307", inquiryrequestid "txid202402111402271707638094", additionalinfo { totalamount { value "10000 00", currency "idr", }, trxid "2024123000000000000001", txidva "normaltest02202401181001033629", }, }, headers { x external id "txid202402111402271707638094", channel id cons clientid, }, }; let snap = new snap(config); let endpoint = `/api/v1 0/transfer va/status`; let response = snap requestsnaptransaction(paramcheckstatus, endpoint, accesstoken, "post"); config = nicepay builder() isproduction(false) iscloudserver(false) clientsecret(client secret) partnerid(partner id) externalid("txid202402111402271707638094") timestamp("2024 12 31t10 11 40+07 00") privatekey(private key cloud) build(); var accesstoken = "eyj0exaioijkv1qilcjhbgcioijiuzi1nij9 eyjzdwiioijjt05qqvlurvnuiiwiaxnzijoitkldrvbbwsisim5hbwuioijcukloiiwizxhwijoimjaync0wmi0xmvqwodowotoznvoifq== aiyblx36dywffvw7dcoenxkoe2eawiyq84ztpuif3k8="; inquirystatus requestdata = inquirystatus builder() partnerserviceid("99123040") customerno("00007307") virtualaccountno("9912304000007307") inquiryrequestid("txid202402111402271707638094") totalamount("10000 00", "idr") trxid("2024123000000000000001") txidva("normaltest02202401181001033629") build(); nicepayresponse result = snapinquirystatusservice callservicevacheckstatus(requestdata, accesstoken, config); bodycreatetoken = ( builderaccesstoken buildaccesstoken() setgranttype("client credentials") setadditionalinfo("") build() ) totalamount = { "value" "10000 00", "currency" "idr" } additionalinfo = { "txidva" "normaltest02202401181001033629", "totalamount" totalamount, "trxid" "2024123000000000000001", } bodyinquiryva = ( buildervirtualaccount buildinquiryva() setpartnerserviceid("99123040") setcustomerno("00007307") setvirtualaccountno("9912304000007307") setinquiryrequestid("txid202402111402271707638094") setadditionalinfo(additionalinfo) build() ) environment = (builderenvironment buildenvironment() iscloud(false) isproduction(false) build()) result = snapservice servicetransaction( bodycreatetoken jsonaccesstoken(), bodyinquiryva jsonvainquiry(), constantsendpoints inquiryva(), environment ) c# string clientid = "normaltest"; string privatekey = " private key"; // replace with actual private key string timestamp = "2024 12 31t10 11 40+07 00"; string clientsecret = " client secret"; // replace with actual client secret string channelid = "normaltest"; bool isproduction = false; bool iscloudserver = true; string signature = signaturegeneratorutils generatesignature(privatekey, clientid, timestamp); var tokenrequester = new accesstokenrequester(); string accesstokenresponse = await tokenrequester getaccesstokenasync(clientid, signature, timestamp, isproduction, iscloudserver); dynamic accesstokenobject = jobject parse(accesstokenresponse); string accesstoken = accesstokenobject accesstoken; apiendpoints apiendpoints = new apiendpoints(); apiservice vaservice = new apiservice(apiendpoints, clientsecret, clientid, channelid, isproduction, iscloudserver); snapvaservices requestbodygenerator = new snapvaservices(clientid); // values from your provided data string va no = "9912304000007307"; string trxid = "2024123000000000000001"; string amount = "10000 00"; string txidva = "normaltest02202401181001033629"; string inquiryrequestbody = requestbodygenerator generateinquiryrequest( customerno "00007307", virtualaccountno va no, inquiryrequestid "txid202402111402271707638094", value amount, currency "idr", trxid trxid, txidva txidva ); string externalid = "txid202402111402271707638094"; string inquiryresponse = await vaservice sendpostrequest(apiendpoints inquiryva, accesstoken, timestamp, inquiryrequestbody, externalid); laravel protected $useprod = false; protected $usecloud = false; protected $inquiry va endpoint = "/api/v1 0/transfer va/status"; // credential protected $client id = "client key merchant"; protected $key = " private key merchant"; protected $client secret = " client secret merchant"; protected $access token = " access token merchant"; $url = httputil getnicepaydomain($this >useprod, $this >usecloud) "/nicepay" $this >inquiry va endpoint; $helper = new helpers(); $http method = "post"; // use the timestamp from previous data $x time stamp = "2024 12 31t10 11 40+07 00"; $time stamp = "20241231101140"; $partner id = $this >client id; $client secret = $this >client secret; $access token = $helper >generateaccesstoken($this >client id, $this >key); $external id = "txid202402111402271707638094"; $totalamount = \[ "value" => "10000 00", "currency" => "idr" ]; $additionalinfo = \[ "totalamount" => $totalamount, "trxid" => "2024123000000000000001", "txidva" => "normaltest02202401181001033629" ]; $body = \[ "partnerserviceid" => "99123040", "customerno" => "00007307", "virtualaccountno" => "9912304000007307", "virtualaccountname" => "test va status", "inquiryrequestid" => "txid202402111402271707638094", "trxid" => "2024123000000000000001", "totalamount" => $totalamount, "additionalinfo" => $additionalinfo ]; $string to sign = $helper >generatestringtosign( $http method, $this >inquiry va endpoint, $access token, $body, $x time stamp ); $signature = $helper >hmacsha512encoded( $string to sign, $client secret, openssl algo sha512 ); $header = $helper >generateheader( $access token, $x time stamp, $signature, $partner id, $external id, $partner id "01" ); try { $response = httputil postjsonrequestwithheader($url, $body, $header); } catch (\exception $e) { echo "error " $e >getmessage(); } php native $config = nicepay builder() >setisproduction(false) >setprivatekey($this >oldkeyformat) >setclientsecret($this >clientsecret) >setpartnerid($this >imidtest) >setexternalid("txid202402111402271707638094") >settimestamp("2024 12 31t10 11 40+07 00") >build(); $parameter = inquirystatus builder() >setpartnerserviceid("99123040") >setcustomerno("00007307") >setvirtualaccountno("9912304000007307") >setinquiryrequestid("txid202402111402271707638094") >settrxid("2024123000000000000001") >settxidva("normaltest02202401181001033629") >settotalamount("10000 00", "idr") >build(); $accesstoken = self getaccesstoken($config); $snapvaservice = new snapvaservice($config); try { $response = $snapvaservice >inquirystatus($parameter, $accesstoken); } catch (\exception $e) { echo "error " $e >getmessage(); } val config nicepay = nicepay builder() isproduction(false) clientsecret(testingconstants normaltest client secret) partnerid(i mid normaltest) externalid("txid202402111402271707638094") timestamp("2024 12 31t10 11 40+07 00") privatekey(testingconstants private key) build() val accesstoken = "eyj0exaioijkv1qilcjhbgcioijiuzi1nij9 eyjzdwiioijjt05qqvlurvnuiiwiaxnzijoitkldrvbbwsisim5hbwuioijcukloiiwizxhwijoimjaync0wmi0xmvqwodowotoznvoifq== aiyblx36dywffvw7dcoenxkoe2eawiyq84ztpuif3k8=" val reqinquiryva snapcheckstatus = snapcheckstatus builder() partnerserviceid("99123040") customerno("00007307") virtualaccountno("9912304000007307") inquiryrequestid("txid202402111402271707638094") totalamount("10000 00", "idr") trxid("2024123000000000000001") txidva("normaltest02202401181001033629") build() val snapvirtualaccountservice snapvirtualaccountservice = snapvirtualaccountserviceimpl() val response nicepayresponse? = snapvirtualaccountservice checkstatus(reqinquiryva, accesstoken, config) codeigniter $this >clientsecret = $testconst imid test client secret; $this >oldkeyformat = $testconst imid test private key; $this >imidtest = $testconst imid test; $this >merchantkey = $testconst imid common merchant key; $this >v2config = nicepay builder() >setisproduction(false) >build(); $config = nicepay builder() >setiscloudserver(true) >setprivatekey($this >oldkeyformat) >setclientsecret($this >clientsecret) >setpartnerid($this >imidtest) >setexternalid("txid202402111402271707638094") >settimestamp("2024 12 31t10 11 40+07 00") >build(); $inquirystatusbuilder = inquirystatus builder(); $parameter = $inquirystatusbuilder >setpartnerserviceid("99123040") >setcustomerno("00007307") >setvirtualaccountno("9912304000007307") >setinquiryrequestid("txid202402111402271707638094") >settrxid("2024123000000000000001") >settxidva("normaltest02202401181001033629") >settotalamount("10000 00", "idr") >build(); $accesstoken = self getaccesstoken($config); $snapvaservice = new snapvaservice(); try { $response = $snapvaservice >inquirystatus($parameter, $accesstoken, $config); } catch (\exception $e) { echo "error " $e >getmessage(); } response parameter sample response { "responsecode" "2002600", "responsemessage" "successful", "virtualaccountdata" { "partnerserviceid" "86230927", "customerno" "87654321", "virtualaccountno" "8623092787654321", "inquiryrequestid" "11032020240313", "totalamount" { "value" "10000 00", "currency" "idr" } }, "additionalinfo" { "virtualaccountname" "john test", "trxid" "2020102900000000000001", "transactionstatusdesc" "success", "latesttransactionstatus" "00", "bankcd" "cena", "txidva" "openfix0010220221107161035699", "goodsnm" "test", "vacctvaliddt" "20221110", "vacctvalidtm" "161037", "hashedsourceaccountno" "abcdefghijklmnopqrstuvwxyz123456", "sourcebankcode" "008" } }