Visa Developer Community

Regular Visitor

Error 404 - Visa Card Eligibility iFrame API

Hi,

 

I have include all the info as attached in image. I also have created jks file. But when I click Run, I keep on getting Error 404 Bad Request. Please help.

 

VDP.png

8 REPLIES 8
Visa Dev Moderator

Re: Error 404 - Visa Card Eligibility iFrame API

Hello Athirah,

 

I'd like to help you resolve the issue you're experiencing but to further investigate, can you please provide the following information:

1. End Point
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.

 

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

Thanks,
Diana

Regular Visitor

Re: Error 404 - Visa Card Eligibility iFrame API

Hi Diana,

Please find details as below:

 

1. https://sandbox.api.visa.com/visacardeligibilityservices/v1/registeriframe/token

 

2. Accept: application/jsonAuthorization: {base64 encoded userid:password}

 

3. {
"vendorUniqueId": "VAL_TENZ_GPID",
"requestTimeStamp": "10/01/2019 11:05:20 AM",
"correlationId": "dfsdfasdsdf",
"extendedData": ""
}

 

4. Status Code: 400 Bad Request
Server : nginx
Content-Type : application/json;charset=utf-8
Content-Length : 152
X-SERVED-BY : l73c012
X-CORRELATION-ID : 1569987289_717_2074489633_l73c012_VDP_WS
X-Backside-Transport : FAIL FAIL,FAIL FAIL
Cache-Control : no-cache, no-store ,no-cache, no-store, must-revalidate
Pragma : no-cache
Expires : -1
X-OPNET-Transaction-Trace : a2_36c29487-c575-4b45-9ab2-3d13ffcdb3c2-9468-166
X-AspNet-Version : 4.0.30319
X-Powered-By : ASP.NET
X-Content-Type-Options : nosniff
X-Frame-Options : SAMEORIGIN
X-XSS-Protection : 1; mode=block
Content-Security-Policy : default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';
X-Global-Transaction-ID : 960013815
X-APP-STATUS : 400
Strict-Transport-Security : max-age=2592000;includeSubdomains
X-Cnection : close
Date : Wed, 02 Oct 2019 03:34:49 GMT
Connection : close

 

5. {
"statusDescription": "Vendor RequestTimeStamp format error",
"responseTimeStamp": "10/2/2019 3:34:49 AM",
"correlationId": "dfsdfasdsdf",
"statusCode": "103"
}

 

I am currently using VDP and automatic proxy.

Visa Dev Moderator

Re: Error 404 - Visa Card Eligibility iFrame API

Hey @Athirah,

 

I did some sandbox testing just now and I found that you can resolve the issue if you put the timestamp in your request to match the Date in the error you receive in the response header. For example, notice that my Request has "requestTimeStamp": "10/03/2019 23:54:20 PM", and my Response Header has Date : Thu, 03 Oct 2019 23:54:33 GMT. So what I actually did was that after I received the 400 Bad Request error I took a look at the date and time of the Response Header and I entered it into my Request and then I got a successful 200 OK. This seems to be a workaround that works to get a successful response.

 

I've provided the successful Request, Response, Response Header and a VDP Playground screenshot for you to take a look at.

 

Please let me know your test results.

 

20190920 RegisteriFrame same timestamp 200 OK.png

 

Request:

 

{
"permanentAccountNumber": "4000000000000011",
"vendorUniqueId": "VAL_TENZ_GPID",
"requestTimeStamp": "10/03/2019 23:54:20 PM",
"correlationId": "dfsdfasdsdf",
"extendedData": ""
}

 


Response:

 

{
"statusDescription": "Vendor is not configured for this transaction. Please verify",
"responseTimeStamp": "10/3/2019 11:54:33 PM",
"correlationId": "dfsdfasdsdf",
"statusCode": "029"
}

 


Response Header:

Status Code: 200 OK
Server : nginx
Content-Type : application/json;charset=utf-8
Content-Length : 177
X-SERVED-BY : l55c016
X-CORRELATION-ID : 1570146873_261_1850355178_l55c016_VDP_WS
X-Backside-Transport : OK OK,OK OK
Cache-Control : no-cache, no-store ,no-cache, no-store, must-revalidate
Pragma : no-cache
Expires : -1
X-OPNET-Transaction-Trace : a2_903d468e-714a-4a4d-ac4e-a71c061bf68f-11548-40
X-AspNet-Version : 4.0.30319
X-Powered-By : ASP.NET
X-Content-Type-Options : nosniff
X-Frame-Options : SAMEORIGIN
X-XSS-Protection : 1; mode=block
Content-Security-Policy : default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';
X-Global-Transaction-ID : 4218975327
X-APP-STATUS : 200
Strict-Transport-Security : max-age=2592000;includeSubdomains
Date : Thu, 03 Oct 2019 23:54:33 GMT
Connection : keep-alive

 

 

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

Thanks,
Diana

Regular Visitor

Re: Error 404 - Visa Card Eligibility iFrame API

Hi Diana,

I try changing my timestamp value but still cannot get status 200 ok. Below are my screenshots and my request values.

 

iframe_api.png

 

Request

{
"permanentAccountNumber": "4000000000000011",
"vendorUniqueId": "VAL_TENZ_GPID",
"requestTimeStamp": "10/04/2019 06:54:20 PM",
"correlationId": "dfsdfasdsdf",
"extendedData": ""
}

 

Response

{
"statusDescription": "Vendor RequestTimeStamp format error",
"responseTimeStamp": "10/4/2019 1:09:30 AM",
"correlationId": "dfsdfasdsdf",
"statusCode": "103"
}

 

Response Header

Status Code: 400 Bad Request
Server : nginx
Content-Type : application/json;charset=utf-8
Content-Length : 152
X-SERVED-BY : l55c012
X-CORRELATION-ID : 1570151369_922_288253900_l55c012_VDP_WS
X-Backside-Transport : FAIL FAIL,FAIL FAIL
Cache-Control : no-cache, no-store ,no-cache, no-store, must-revalidate
Pragma : no-cache
Expires : -1
X-OPNET-Transaction-Trace : a2_766e56b0-5e5e-44d1-8ff4-4dcc582ad9f4-12804-46
X-AspNet-Version : 4.0.30319
X-Powered-By : ASP.NET
X-Content-Type-Options : nosniff
X-Frame-Options : SAMEORIGIN
X-XSS-Protection : 1; mode=block
Content-Security-Policy : default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';
X-Global-Transaction-ID : 825611143
X-APP-STATUS : 400
Strict-Transport-Security : max-age=2592000;includeSubdomains
X-Cnection : close
Date : Fri, 04 Oct 2019 01:09:30 GMT
Connection : close

 

Thank you.

Highlighted
Visa Dev Moderator
Visa Dev Moderator

Re: Error 404 - Visa Card Eligibility iFrame API

Hi @Athirah,

 

I think the requestTimeStamp you entered in your request is invalid because the response you received shows  error "Vendor RequestTimeStamp format error".  Can you try again and when you receive the response, copy the responseTimeStamp and enter it in your requestTimeStamp? 

 

 

 

 


Best,
Stacey

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

Re: Error 404 - Visa Card Eligibility iFrame API

Hey @Athirah,

 

So I took a look at your Request, Response and Response Header, and although the date is the same there is a difference in time. To make things easier, make the requestTimeStamp match exactly the responseTimeStamp and you will get a successful 200 OK response. You can also use the time in the Response Header's "Date" but you should use the format month/day/year (e.g. 10/04/2019) and then you should use the exact time.

 

But my recommendation is for you to make the requestTimeStamp match exactly the responseTimeStamp, as that is easier for you to copy and paste. Refer to Request payload, Response payload, Response Header and screenshots below.

 

Try this sandbox test again and please share your results with us. I'm happy to help you with any further issues you may have.

 

Successful Request:

 

{
"permanentAccountNumber": "4000000000000011",
"vendorUniqueId": "VAL_TENZ_GPID",
"requestTimeStamp": "10/04/2019 5:49:59 PM",
"correlationId": "dfsdfasdsdf",
"extendedData": ""
}

 

 

Successful Response:

 

{
"statusDescription": "Vendor is not configured for this transaction. Please verify",
"responseTimeStamp": "10/4/2019 5:50:13 PM",
"correlationId": "dfsdfasdsdf",
"statusCode": "029"
}

 

 

Successful Response Header:

 

Status Code: 200 OK
Server : nginx
Content-Type : application/json;charset=utf-8
Content-Length : 176
X-SERVED-BY : l73c014
X-CORRELATION-ID : 1570211413_067_583295606_l73c014_VDP_WS
X-Backside-Transport : OK OK,OK OK
Cache-Control : no-cache, no-store ,no-cache, no-store, must-revalidate
Pragma : no-cache
Expires : -1
X-OPNET-Transaction-Trace : a2_ec79119c-de6b-4834-aadf-d090ccad0141-7964-43
X-AspNet-Version : 4.0.30319
X-Powered-By : ASP.NET
X-Content-Type-Options : nosniff
X-Frame-Options : SAMEORIGIN
X-XSS-Protection : 1; mode=block
Content-Security-Policy : default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';
X-Global-Transaction-ID : 1295318927
X-APP-STATUS : 200
Strict-Transport-Security : max-age=2592000;includeSubdomains
Date : Fri, 04 Oct 2019 17:50:13 GMT
Connection : keep-alive

 

20191004 RegisteriFrame same Response timestamp 200 OK.png

 

20191004 RegisteriFrame same timestamp 200 OK.png

 

 

 

 

 

 

 

 

 

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

Thanks,
Diana

Regular Visitor

Re: Error 404 - Visa Card Eligibility iFrame API

Hi Diana,

Okay I understand now. I try your method by copy the exact time and date from the response header and I was able to get 200 OK.

 

iFrameToken-200OK.png

 

Thank you so much Diana! 😄

Visa Dev Moderator

Re: Error 404 - Visa Card Eligibility iFrame API

Hey @Athirah,

 

Thanks for letting us know that you're now getting a successful response. Feel free to reach out to us in the community forum at any time when you have questions and someone will be happy to help!

 

Have a good day 🙂

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

Thanks,
Diana