Re: Facing issue in foreign exchange rates API

blaster777
Occasional Visitor

Got Error while fetching offers data through offers API

Hii, I tried to fetch offers details using offers API and got this response

 

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Error</title>
<meta name="description" content="Visa Corporate; site main page and menu">
<meta name="keywords"
content="visa, visa corporate, visa regions, visa asia pacific, visa canada, visa central europe, visa eastern europe, visa middle east, visa africa, cemea, visa european union, visa latin america, visa caribbean, visa united states, visa credit cards, credit, Visa">
<link rel="stylesheet" href="https://www.visa.com/common/error/visa.css" type="text/css">
<style type="text/css">
/* defaults */
body {
margin: 0;
font-size: 80%;
}

body,
form,
input {
font-family: Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
}

img {
border: 0;
}

/* links */
a {
color: #003399;
text-decoration: underline;
}

a:hover {
color: #FFA611;
text-decoration: underline;
}

/* layout */
#logo {
position: absolute;
top: 20px;
left: 16px;
}

#content {
position: absolute;
top: 146px;
left: 96px;
color: #000000;
width: 623px;
}

/* layout - footer */
#footer {
position: absolute;
top: 384px;
left: 2px;
width: 500px;
height: 76px;
margin: 45px 0 0 13px;
float: left;
font-size: 0.85em;
color: #003399;
overflow: hidden;
}

#copyright {
color: #999999;
margin-top: 5px;
}

#footer a {
text-decoration: none;
}

#footer a:hover {
text-decoration: underline;
}
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<div id="logo">
<img src="https://www.visa.com/images/homepage/visa_logo.png" alt="Credit Card Companies - Visa Credit Card - Global Visa Sites" width="104" height="35"> </div>


<div id="content">
<img src="https://www.visa.com/images/homepage/error_header.gif" alt="Page Not Found" width="167" height="29">
<br>
<br>
<strong>Our apologies..</strong>
<br><br>
The page you've requested cannot be found. Please check that you have entered in the correct address (URL), or perhaps the page no longer exists, had its name changed, or is temporarily unavailable.
<br><br>
</div>


<br><br><br>
<script language="JavaScript">
// Prevent other sites from including this site within a frame
if (top != self) { top.location = location }
</script>


<div id="footer"> <a href="https://usa.visa.com/legal/privacy-policy.html" title="Privacy Policy">Privacy
Policy</a> &nbsp;|&nbsp; <a href="https://usa.visa.com/legal.html" title="Terms of Use">Terms of
Use</a> <br>
<div id="copyright">&#169; Copyright 1996-<script language="JavaScript" type="text/javascript">
<!--
document.write(new Date().getFullYear()); //
-->
</script>, Visa. All Rights Reserved </div>
</div>

</body>

</html>
 
What could be the possible reasons for this response
6 REPLIES 6
API_Products
Visa Developer Support Specialist

Re: Got Error while fetching offers data through offers API

Hi @blaster777,

 

Please provide the following information for further assistance with the error.

 

  1. Endpoint  
  2. Request Header 
  3. Request Body 
  4. Response Header (include the x-correlation-id) 
  5. Response Body 

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header.

 




Thanks,

Diana



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

API_Products
Visa Developer Support Specialist

Re: Got Error while fetching offers data through offers API

Hi @blaster777,

 

Please let me know if you still need help with the error. If so, please provide the information that I requested of you below. If the error is fixed, please let me know so I can take you off my contact list. 




Thanks,

Diana



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

blaster777
Occasional Visitor

Re: Got Error while fetching offers data through offers API

Hii DianaTran-Yee

 

I'm Sorry for not replying to your last comment. Actually the error was resolved yesterday. You can close this issue now.

 

Thanking you

Aayush Bansal

 

 

blaster777
Occasional Visitor

Facing issue in foreign exchange rates API

Hii

I'm facing one more issue. My company has the production access. I was facing issue in the offers API, but that issue is resolved now. Now I'm facing issue in foreign exchange rates API. 

 

I was using the x-pay-token method for generating the response.

 

PROD API: https://api.visa.com/forexrates/v2/foreignexchangerates

 

var timestamp = Math.floor(Date.now() / 1000);
var resourcePath = "";
var queryParams = "apikey=XXXXXXXXXXXXXXXXX";
var sharedSecret = "XXXXXXXXXXXXXXXXXXXX";
var postBody = "";
var preHashString = timestamp + resourcePath + queryParams + postBody;
var crypto = require('crypto');
var hashString = crypto.createHmac('SHA256', sharedSecret).update(preHashString).digest('hex');
var xPayToken = 'xv2:' + timestamp + ':' + hashString;
console.log(xPayToken);

 

This was the code for generating the x-pay-token.

I want to ask that, what values should I fill in the variables resourcePath and postBody.

 

Here is the request body :-

{
  • "initiatingPartyId": 1002,
  • "rateProductCode": "BANK",
  • "destinationCurrencyCode": "USD",
  • "sourceCurrencyCode": "EUR",
  • "quoteIdRequired": true
}
 
This request body must be filled in the variable postbody, but I'm unable to fill it.
Please let me know how to fill this value in the variable postbody.
Please reply to my query as soon as possible.
 
Thanking you,
Aayush Bansal
 
API_Products
Visa Developer Support Specialist

Re: Facing issue in foreign exchange rates API

Hi @blaster777,

 

Please send this problem to developer@visa.com and include the region you are from. A representative from Production Support will reach out to you for further assistance.  




Thanks,

Diana



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

JewelPark
Regular Visitor

Re: Got Error while fetching offers data through offers API

The possible reasons for the response could be incorrect API endpoint, authentication issues, or server error.