Get Payment Data API


Get Payment Data API

Screen Shot 2020-11-27 at 11.51.28 PM.png

Is it just me or is the get payment data API down? I can't get it to work! I tried testing it out in a browser (separately from my application, in this link: and got the response pictured above.


When I try to run my own application using the code below I get a 401 Apikey not present 9206 error.

const apiKey='....';
const sharedSecret='...'; //encryption shared secret
const encryptionAPIKey='....;
var queryParams = 'apiKey='+apiKey;
var fullUnhashedString=queryParams+'&encryptionKey='+encryptionAPIKey;
var timestamp = Math.floor(;
var resourcePath="payment/data/"+req.body.callid;
var preHashString = timestamp + resourcePath + fullUnhashedString+postBody;
console.log("prehash string is: ");
var hashString = crypto.createHmac('sha256', sharedSecret).update(preHashString).digest('hex');

var xPayToken = 'xv2:'+timestamp + ':' + hashString;
let callId=req.body.callid;
var options = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-pay-token': xPayToken
json: true


options.agent = new https.Agent(options);

request.get(options, (err, res, body) => {
if (err) {
return console.log(err);
console.log(`Status: ${res.statusCode}`);
res.send('Hello World');
please help! Thanks!
Visa Dev Moderator

Re: Get Payment Data API

Hey @julialiebs,


We're happy to help answer your Visa Checkout query. To integrate the Visa Checkout API into your project, you'll need to work with a partner. Here's a list of Partners to integrate Visa Checkout with: 

Please let us know if you have other questions and someone will be happy to help. 


Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.