NICEPAY API
...
API QRIS SNAP
Check Status Transaction - API QRIS SNAP
11 min
about check status transaction api qris snap this api with snap standards uses to check the payment transaction status on the qris payment method check status transaction api qris snap please request the access token firsthand before executing the check status transaction api through the docid 92feymrqs iebhxrfgxuq section 180,556,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 header parameter for check status transaction api qris snap 174,91,107,222 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 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 request body parameter for check status transaction api qris snap 186,107,0,118,181,155 true unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type response parameter for check status transaction api qris snap 191,112,0,127,207,159 true unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left 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 unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type sample parameter for check status transaction api qris snap request parameter curl curl x post \\ 'https //dev nicepay co id/nicepay/api/v1 0/qr/qr mpm query' \\ h 'content type application/json' \\ h 'authorization bearer eyj0exaioijkv1qilcjhbgcioijiuzi1nij9 eyjzdwiioijutkldrvfsmdgxiiwiaxnzijoitkldrvbbwsisim5hbwuioijosunfuefziiwizxhwijoimjaync0wnc0xofqwntowmzo1nloifq== in mypmwhwgxrywntbz7rdgg6 uqjzslfux9ayn37ek=' \\ h 'x timestamp 2024 04 18t09 00 40+07 00' \\ h 'x signature xvvjtqccts7cfxp4fe8aqtqitg0ostthfxe4rftireuu9cnvthkh7elbtidmueha2y0plync7+goqsqwyf1wha==' \\ h 'x partner id tniceqr081' \\ h 'x external id 11044820240418' \\ h 'channel id tniceqr08101' \\ d '{"originalreferenceno" "tniceqr08108202404181012168473","originalpartnerreferenceno" "ordno2022120215134035","merchantid" "tniceqr081","externalstoreid" "nicepaystoreid1","servicecode" "47","additionalinfo" {}}' node js // this configuration should be initialized with your actual credentials const config = { isproduction false, privatekey "your private key", // replace with your actual private key clientsecret "your client secret", // replace with your actual client secret clientid "tniceqr081", iscloudserver false, }; const accesstoken = "eyj0exaioijkv1qilcjhbgcioijiuzi1nij9 eyjzdwiioijutkldrvfsmdgxiiwiaxnzijoitkldrvbbwsisim5hbwuioijosunfuefziiwizxhwijoimjaync0wnc0xofqwntowmzo1nloifq== in mypmwhwgxrywntbz7rdgg6 uqjzslfux9ayn37ek="; let paramquery = { body { originalreferenceno "tniceqr08108202404181012168473", originalpartnerreferenceno "ordno2022120215134035", merchantid "tniceqr081", externalstoreid "nicepaystoreid1", servicecode "47", additionalinfo {} }, headers { x external id "11044820240418", channel id "tniceqr08101", }, }; let snap = new snap(config); let endpoint = `/api/v1 0/qr/qr mpm query`; let response = snap requestsnaptransaction(paramquery, endpoint, accesstoken, "post"); nicepay config = nicepay builder() isproduction(false) iscloudserver(false) clientsecret(client secret) partnerid("tniceqr081") externalid("11044820240418") timestamp("2024 04 18t09 00 40+07 00") privatekey(private key) build(); string accesstoken = "eyj0exaioijkv1qilcjhbgcioijiuzi1nij9 eyjzdwiioijutkldrvfsmdgxiiwiaxnzijoitkldrvbbwsisim5hbwuioijosunfuefziiwizxhwijoimjaync0wnc0xofqwntowmzo1nloifq== in mypmwhwgxrywntbz7rdgg6 uqjzslfux9ayn37ek="; inquirystatus requestdata = inquirystatus builder() merchantid("tniceqr081") originalpartnerreferenceno("ordno2022120215134035") originalreferenceno("tniceqr08108202404181012168473") externalstoreid("nicepaystoreid1") servicecode("47") build(); nicepayresponse result = snapinquirystatusservice callserviceqrischeckstatus(requestdata, accesstoken, config);bodycreatetoken = ( builderaccesstoken buildaccesstoken() setgranttype("client credentials") setadditionalinfo("") build() ) additionalinfo = { } bodyqrisinquiry = ( builderqris buildqrisinquiry() setmerchantid("tniceqr081") setexternalstoreid("nicepaystoreid1") setoriginalreferenceno("tniceqr08108202404181012168473") setoriginalpartnerreferenceno("ordno2022120215134035") setservicecode("47") setadditionalinfo(additionalinfo) build() ) environment = (builderenvironment buildenvironment() iscloud(false) isproduction(false) build()) \# the service call to execute the transaction result = snapservice servicetransaction(bodycreatetoken jsonaccesstoken(), bodyqrisinquiry jsonqrisinquiry(), constantsendpoints inquiryqris(), environment) c# string clientid = "tniceqr081"; string privatekey = "your private key"; // replace with your actual private key string clientsecret = "your client secret"; // replace with your actual client secret string channelid = "tniceqr08101"; bool isproduction = false;// set true for production bool iscloudserver = false; // values from the curl command string timestamp = "2024 04 18t09 00 40+07 00"; string externalid = "11044820240418"; string accesstoken = "eyj0exaioijkv1qilcjhbgcioijiuzi1nij9 eyjzdwiioijutkldrvfsmdgxiiwiaxnzijoitkldrvbbwsisim5hbwuioijosunfuefziiwizxhwijoimjaync0wnc0xofqwntowmzo1nloifq== in mypmwhwgxrywntbz7rdgg6 uqjzslfux9ayn37ek="; apiendpoints apiendpoints = new apiendpoints(); apiservice qrisservice = new apiservice(apiendpoints, clientsecret, clientid, channelid, isproduction, iscloudserver); snapqrisservices snapqrisservices = new snapqrisservices(clientid); var inquirybody = new { originalreferenceno = "tniceqr08108202404181012168473", originalpartnerreferenceno = "ordno2022120215134035", merchantid = "tniceqr081", externalstoreid = "nicepaystoreid1", servicecode = "47", additionalinfo = new {} }; string requestbodyjson = newtonsoft json jsonconvert serializeobject(inquirybody); string endpoint = apiendpoints statusqris; string inquiryresponse = await qrisservice sendpostrequest(endpoint, accesstoken, timestamp, requestbodyjson, externalid); console writeline("inquiry qris response " + inquiryresponse); laravel protected $useprod = false; protected $usecloud = false; protected $inquiry qris endpoint = "/api/v1 0/qr/qr mpm query"; // credential protected $client id = "tniceqr081"; protected $key = " private key merchant"; protected $client secret = " client secret merchant"; protected $access token = "eyj0exaioijkv1qilcjhbgcioijiuzi1nij9 eyjzdwiioijutkldrvfsmdgxiiwiaxnzijoitkldrvbbwsisim5hbwuioijosunfuefziiwizxhwijoimjaync0wnc0xofqwntowmzo1nloifq== in mypmwhwgxrywntbz7rdgg6 uqjzslfux9ayn37ek="; // authorization bearer protected $store id = "nicepaystoreid1"; $url = httputil getnicepaydomain($this >useprod, $this >usecloud) $this >inquiry qris endpoint; $helper = new helpers(); $http method = "post"; $x time stamp = '2024 04 18t09 00 40+07 00'; $date = carbon parse($x time stamp); $time stamp = $date >format("ymdhis"); $partner id = $this >client id; $client secret = $this >client secret; $access token = $this >access token; $store id = $this >store id; $external id = "11044820240418"; $original reference no = "tniceqr08108202404181012168473"; $reference no = "ordno2022120215134035"; $additionalinfo = (object)\[]; $body = \[ "originalreferenceno" => $original reference no, "originalpartnerreferenceno" => $reference no, "merchantid" => $partner id, "externalstoreid" => $store id, "servicecode" => "47", "additionalinfo" => $additionalinfo ]; $string to sign = $helper >generatestringtosign( $http method, $this >inquiry qris endpoint, $access token, $body, $x time stamp ); $signature = $helper >hmacsha512encoded( $string to sign, $client secret, openssl algo sha512 ); $channel id = "tniceqr08101"; $header = $helper >generateheader( $access token, $x time stamp, $signature, $partner id, $external id, $channel id ); $response = httputil postjsonrequestwithheader($url, $body, $header); php native $partnerid = "tniceqr081"; $externalid = "11044820240418"; $timestamp = '2024 04 18t09 00 40+07 00'; $originalreferenceno = "tniceqr08108202404181012168473"; $originalpartnerreferenceno = "ordno2022120215134035"; $externalstoreid = "nicepaystoreid1"; $servicecode = "47"; $accesstoken = "eyj0exaioijkv1qilcjhbgcioijiuzi1nij9 eyjzdwiioijutkldrvfsmdgxiiwiaxnzijoitkldrvbbwsisim5hbwuioijosunfuefziiwizxhwijoimjaync0wnc0xofqwntowmzo1nloifq== in mypmwhwgxrywntbz7rdgg6 uqjzslfux9ayn37ek="; // step 1 configure the sdk $config = nicepay builder() >setisproduction(false) >setprivatekey("merchant private key") >setclientsecret("merchant client secret") >setpartnerid($partnerid) >setexternalid($externalid) >settimestamp($timestamp) >build(); // step 2 define the request body $requestbody = inquirystatus builder() >setoriginalreferenceno($originalreferenceno) >setoriginalpartnerreferenceno($originalpartnerreferenceno) >setmerchantid($partnerid) >setexternalstoreid($externalstoreid) >setservicecode($servicecode) >setadditionalinfo((object)\[]) >build(); // step 3 execute the request try { $qrisservice = new snapqrisservice($config); $response = $qrisservice >inquirystatus($requestbody, $accesstoken); } catch (\exception $e) { // handle exceptions }val config nicepay = nicepay builder() isproduction(false) clientsecret(client secret) partnerid("tniceqr081") externalid("11044820240418") timestamp("2024 04 18t09 00 40+07 00") privatekey(private key) build() val accesstoken = "eyj0exaioijkv1qilcjhbgcioijiuzi1nij9 eyjzdwiioijutkldrvfsmdgxiiwiaxnzijoitkldrvbbwsisim5hbwuioijosunfuefziiwizxhwijoimjaync0wnc0xofqwntowmzo1nloifq== in mypmwhwgxrywntbz7rdgg6 uqjzslfux9ayn37ek=" val checkstatusrequest snapcheckstatus = snapcheckstatus builder() merchantid("tniceqr081") originalpartnerreferenceno("ordno2022120215134035") originalreferenceno("tniceqr08108202404181012168473") servicecode("47") externalstoreid("nicepaystoreid1") build() val response nicepayresponse? = snapqrisservice checkstatus(checkstatusrequest, accesstoken, config) codeigniter $partnerid = "tniceqr081"; $externalid = "11044820240418"; $timestamp = '2024 04 18t09 00 40+07 00'; $originalreferenceno = "tniceqr08108202404181012168473"; $originalpartnerreferenceno = "ordno2022120215134035"; $externalstoreid = "nicepaystoreid1"; $servicecode = "47"; $accesstoken = "eyj0exaioijkv1qilcjhbgcioijiuzi1nij9 eyjzdwiioijutkldrvfsmdgxiiwiaxnzijoitkldrvbbwsisim5hbwuioijosunfuefziiwizxhwijoimjaync0wnc0xofqwntowmzo1nloifq== in mypmwhwgxrywntbz7rdgg6 uqjzslfux9ayn37ek="; // hardcoded bearer token // step 1 configure the config $config = nicepay builder() >setiscloudserver(iscloudserver false) >setprivatekey("merchant private key") >setclientsecret("merchant client secret") >setpartnerid($partnerid) >setexternalid($externalid) >settimestamp($timestamp) >build(); // step 2 define the inquiry request body $requestbody = inquirystatusqris builder() >setoriginalreferenceno($originalreferenceno) >setoriginalpartnerreferenceno($originalpartnerreferenceno) >setmerchantid($partnerid) >setexternalstoreid($externalstoreid) >setservicecode($servicecode) >setadditionalinfo(\[]) >build(); // step 3 execute the request $snapqrisservice = new snapqrisservice(); // call the inquirystatusqris function $response = $snapqrisservice >inquirystatusqris($requestbody, $accesstoken, $config); response parameter sample response { "responsecode" "2005100", "responsemessage" "successful", "originalreferenceno" "tniceqr08108202404181012168473", "originalpartnerreferenceno" "ordno2022120215134035", "servicecode" "47", "latesttransactionstatus" "00", "paidtime" "2024 04 18t10 14 07+07 00", "amount" { "value" "100 00", "currency" "idr" }, "additionalinfo" { "goodsnm" "test snap transaction nicepay", "billingnm" "john doe", "merchantid" "tniceqr081", "paymenttrxsn" "101378968850945616", "canceltrxsn" "", "userid" "101378968850945616", "externalstoreid" "nicepaystoreid1", "requesttime" "2024 04 18t10 12 16+07 00" } }