Quick Start
About Xplor Pay JavaScript SDK
Prerequisites
1
2
Obtain JSON Web Token
ClearentSDK.getPaymentToken().then(
(result) => {
console.log("ClearentTokenSuccess");
console.log(result);
},
(error) => {
console.log("ClearentTokenError");
console.log(error);
}
);{
"code":"200",
"status":"success",
"exchange-id":"ID-clearent-mobile-jwt-1-c32bfe39-d454-4e34-8b4f-94d850643e48",
"payload":{
"mobile-jwt":{
"jwt":"eyJhbGciOi23UzIh4iJ9.eyJsYXN0LWZvdXIiOiIxMrkP8iwidHlwZSI6Ik1BTlVBTCIsImV4cCI6MTU0NzY0NjU2MSwidG9rZW4iOiIxMTAwMDAwMDAwMDEzNTkyIn0.eT8c_5yUzxCxL2MEtmbG444eTFRW7OxzRF7x4uRIo-U",
"last-four":"1111"
},
"payloadType":"mobile-jwt"
}
}3
Process payment and create Card Token
{
"type": "sale",
"amount": "15.55",
"service-fee": "0.46",
"software-type": "Sally's Seashell Shore Software",
"software-type-version": "1.0",
"software-version": "1.0",
"create-token": true,
"billing":
{
"zip": "85284"
}
}{
"rel": "token",
"href": "/rest/v2/tokens/1100003582050381111",
"id": "1100003582050381111"
}Last updated
Was this helpful?

