NICEPAY API
...
Account Binding - API E-Wallet...
Access Token B2B & B2B2C - Account Binding API E-Wallet (Direct Debit) SNAP
21 min
tentang access token b2b & b2b2c account binding api e wallet (direct debit) snap bagian ini berisi tentang rincian terkait kebutuhan akses token dengan standar digunakan agar dapat melakukan terkait b2b dan b2b2c access token b2b account binding api e wallet (direct debit) snap kunjungi docid\ jsv9p nt63w2a27orcy5u untuk mengetahui alur mendapatkan akses token pada account binding access token b2b digunakan oleh untuk menginisiasi dengan service code 73 api endpoint /nicepay/v1 0/access token/b2b method post description get access token b2b specification request header parameter for access token b2b account binding api e wallet (direct debit) snap 151,93,82,116,211,168 true 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 request body parameter for access token b2b account binding api e wallet (direct debit) snap 151,93,82,116,211,168 true 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 response header parameter for access token b2b account binding api e wallet (direct debit) snap 151,93,82,116,211,168 true 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 response body parameter for access token b2b account binding api e wallet (direct debit) snap 151,93,82,116,211,168 true 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 access token b2b account binding api e wallet (direct debit) snap request parameter curl curl x post \\ 'https //dev nicepay co id/nicepay/v1 0/access token/b2b' \\ h 'content type application/json' \\ h 'x signature afhq5sndwo5pq2vwzk4ztd9cu3ovblg6nezgwlx3gc2mrjordhpezpr3v+rxrpc8ojcycwqy01fsipma8ydqvz1hoth7aekxzhigycrns34ehyeofgd1ymhvfrvxn2fu8had6wtvpny2x2rbus3hwrjsfa5chu8wkvb7zpcuxnc=' \\ h 'x client key ionpaytest' \\ h 'x timestamp 2024 01 31t10 11 40+07 00' \\ d '{"granttype" "client credentials", "additionalinfo" {}}' node js const config = { isproduction false, privatekey cons privatekey, clientsecret cons clientsecret, clientid "ionpaytest", iscloudserver false, externalid "exid202402111402271707638098", timestamp "2024 01 31t10 11 40+07 00", }; const tokenbody = { "granttype " "client credentials", "additionalinfo" {} }; let snap = new snap(config); let response = snap requestsnapaccesstoken(tokenbody);config = nicepay builder() isproduction(false) clientsecret("your client secret") partnerid("ionpaytest") externalid("exid202402111402271707638098") timestamp("2024 01 31t10 11 40+07 00") privatekey("your private key") build(); accesstoken accesstoken = accesstoken builder() granttype("client credentials") additionalinfo(new hashmap<>()) build(); nicepayresponse result = snaptokenservice callgetaccesstoken(accesstoken, config);bodycreatetoken = ( builderaccesstoken buildaccesstoken() setgranttype("client credentials") setadditionalinfo({}) build() ) environment = (builderenvironment buildenvironment() iscloud(false) isproduction(false) build()) result = snapservice serviceoauth(bodycreatetoken jsonaccesstoken(), environment) c# const string client id = "ionpaytest"; const string x timestamp = "2024 01 31t10 11 40+07 00"; const bool is production = false; const bool is cloud server = false; // generate signature using values directly string signature = signaturegeneratorutils generatesignature(config privatekey, client id, x timestamp); // get access token var tokenrequester = new accesstokenrequester(); string accesstokenresponse = await tokenrequester getaccesstokenasync(client id, signature, x timestamp, is production, is cloud server); dynamic accesstokenobject = jobject parse(accesstokenresponse); string accesstoken = accesstokenobject accesstoken; laravel protected $useprod = false; protected $usecloud = false; protected $access token endpoint = "/nicepay/v1 0/access token/b2b"; protected $client id = "ionpaytest"; protected $key = " private key merchant"; $url = httputil getnicepaydomain($this >useprod, $this >usecloud) $this >access token endpoint; $helper = new helpers(); $x time stamp = "2024 01 31t10 11 40+07 00"; $client id = $this >client id; $bd = \[ "granttype" => "client credentials", "additionalinfo" => new \stdclass() ]; $string to sign = $client id "|" $x time stamp; $signature = $helper >generatesignature($string to sign, $this >key, openssl algo sha256); $header = $helper >generateheaderaccesstoken($x time stamp, $client id, $signature); try { $response = http withheaders($header) >post($url, $bd); } catch (exception $e) { // handle exception } php native const string partner id = "ionpaytest"; const string x timestamp = "2024 01 31t10 11 40+07 00"; const string x external id = "exid202402111402271707638098"; $config = nicepay builder() >setisproduction(false) >setprivatekey(" your private key ") >setclientsecret(" your client secret ") >setpartnerid(partner id) >setexternalid(x external id) >settimestamp(x timestamp) >build(); $tokenbody = accesstoken builder() >setgranttype('client credentials') >setadditionalinfo(\[]) >build(); $snap = new snap($config); try { $response = $snap >requestsnapaccesstoken($tokenbody); } catch (\exception $e) { // handle exception }const val partner id = "ionpaytest" const val external id = "exid202402111402271707638098" // used for general context consistency const val timestamp = "2024 01 31t10 11 40+07 00" // step 1 initialize the nicepay configuration var config nicepay = nicepay builder() isproduction(false) clientsecret("your client secret") // placeholder partnerid(partner id) externalid(external id) timestamp(timestamp) privatekey("your private key") // placeholder build() val service snapaccesstokenservice = snapaccesstokenserviceimpl() // step 2 define the access token request body val request = accesstoken builder() granttype("client credentials") additionalinfo(emptymap()) build() // step 3 execute the access token request val response = service getaccesstoken(request, config) codeigniter $config = nicepay builder() >setisproduction(false) >setiscloudserver(true) >setprivatekey($private key) >setclientsecret($client secret) >setpartnerid("ionpaytest") >setexternalid("exid202402111402271707638098") >settimestamp("2024 01 31t10 11 40+07 00") >build(); $data = accesstoken builder() >setgranttype("client credentials") >setadditionalinfo(\[]) >build(); $snap = new snap($config); $response = $snap >requestsnapaccesstoken($data); response parameter sample response { "responsecode" "2007300", "responsemessage" "successful", "accesstoken" "xy8duzzavv9bwdxxrxcb89tsuvk4mf4kx4lgfe4acrvxr7xderhbe1", "tokentype" "bearer", "expiresin" "900" } access token b2b2c account binding api e wallet (direct debit) snap access token b2b2c digunakan oleh untuk menginisiasi menggunakan akun sudah terhubung pada service code 74 api endpoint /nicepay/v1 0/access token/b2bc method post description get access token b2b2c specification request header parameter for access token b2b2c account binding api e wallet (direct debit) snap 151,93,82,116,211,168 true 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 request body parameter for access token b2b2c account binding api e wallet (direct debit) snap 182,93,82,116,211,168 true 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 response header parameter for access token b2b2c account binding api e wallet (direct debit) snap 151,93,82,116,211,168 true 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 response body parameter for access token b2b2c account binding api e wallet (direct debit) snap 151,93,82,116,211,168 true 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 access token b2b2c account binding api e wallet (direct debit) snap request parameter curl curl x post \\ 'https //dev nicepay co id/nicepay/v1 0/access token/b2bc' \\ h 'content type application/json' \\ h 'x signature afhq5sndwo5pq2vwzk4ztd9cu3ovblg6nezgwlx3gc2mrjordhpezpr3v+rxrpc8ojcycwqy01fsipma8ydqvz1hoth7aekxzhigycrns34ehyeofgd1ymhvfrvxn2fu8had6wtvpny2x2rbus3hwrjsfa5chu8wkvb7zpcuxnc=' \\ h 'x client key ionpaytest' \\ h 'x timestamp 2024 01 31t10 11 40+07 00' \\ d '{"granttype" "authorization code","authcode" "3p8uuq0dkdbpagbvbfio1qodnzzajjxxitpl9mfrswas","refreshtoken" "3911773a d3ac 4b4f 8a6c 406c21d6883d","additionalinfo" {"partnerreferenceno" "202208121451526358","mitracd" "astr"}}' response parameter sample response { "granttype" "authorization code", "authcode" "3p8uuq0dkdbpagbvbfio1qodnzzajjxxitpl9mfrswas", "refreshtoken" "3911773a d3ac 4b4f 8a6c 406c21d6883d", "additionalinfo" { "partnerreferenceno" "202208121451526358", "mitracd" "astr" } }