What does it mean?

Regular Visitor

What does it mean?



I'm sending a authorization request to cybersource with visacheckout data source.


Response Body : {
  "responseStatus": {
    "code": "9159",
    "severity": "ERROR",
    "info": "",
    "status": 401,
    "message": "Token validation failed"

Visa Developer Support Specialist

Re: What does it mean?

Hi Inovar,


The 401 Token Validation Failed error you're getting will be seen when the x-pay-token sent in the header is invalid.


A couple of things I'd like you to note while generating the token:

1. To start, please follow the getting started documentation to generate a valid token. https://developer.visa.com/vdpguide#get-started-overview

2. APIkey in the url query param should be the same as the one used to generate xpayToken

3. “resourcePath” sent in the xpaytoken has to be as per the documentation (eg: v2/payments?apikey={apikey}).

4. Payload sent in the request payload should exactly match along with spaces to the “requestBody” value used in xpaytoken.

Can you please provide the request payload of this API call? It's possible that you're missing a field or have an inaccurate format. I'd like to see screenshot attachments of the error provided, if possible.

Also, could you check to see if you're passing a correct value for URI. For example, make sure it’s defined correctly in the beginning of your code, and use the same value for the URI in the middle of your code. In general, for cases like this (i.e. “helloworld works, but the API XX doesn’t”) I'd like to ask of you, if you could, to please extend your SOAPUI project, and make sure that you can call a particular API from SOAPUI project first.


If the error persists, 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





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

Regular Visitor

Re: What does it mean?

This request only works when I wrote "visaCheckoutID" in data field object from processingInformation, instead of "visaCheckoutId" as it's on Visa Docs API.