- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to integrate the Visa in-app provisioning API into a project. In Postman I am able to successfully generate an x-pay token, however, my request fails every time with error status 401 code 9159 (Token Validation Failed).
Under the X Pay Token documentation there is a table with resource paths for different APIs. This table doesn't reference the in-app provisioning API so I don't know if that may be part of the issue. Any guidance on where I am going wrong would be appreciated.
Thanks.
Please see the following screenshots for my pre-request script: I have the x pay token set as a collection variable and it updates when the pre-request script runs.
Solved! Go to Solution
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: X Pay Token Validation Failed
Hey @ascroob,
I'm happy to help. Please provide the following information for further assistance:
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.
Here's the link to Visa Developer error codes and how to resolve them - https://developer.visa.com/pages/visa-developer-error-codes
If you don't find an error code listed here, refer to the API-specific error codes in its respective documentation pages.
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: X Pay Token Validation Failed
Hi @DianaVisaPM,
1. Endpoint: https://sandbox.api.visa.com/universal/core/customers?apikey={apiKey}
2. Request Header:
3. Request Body
Pre-request script:
4. Response Header (include the x-correlation-id)
5. Response Body
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @ascroob,
Please re-examine the creation of their x-pay token. The error indicates that there is a hash mismatch. Sometimes, this is because the resource path is determined incorrectly. The error indicates it is failing right at the x-pay-token calculation. They're not matching. Please test again and share your results with us.