Error in ProvisioningToken Request

Uvaraj_M
Regular Visitor

Error in ProvisioningToken Request

{"errorResponse":{"status":401,"message":"Token Validation Failed","reason":"inputValidationError","details":[{"location":"x-pay-token"}]}}

1 REPLY 1
Sanobar
Frequent Helper

Re: Error in ProvisioningToken Request

Hi

The error you are getting will be shown when the x-pay-token sent  in the header is invalid.

 

Few things to note while generating token:

  1. Please follow getting started documentation to generate a valid token.
  2. APIkey in the url query param should be same as the one used to generate xpayToken
  3. “resourcePath” sent in the xpaytoken has to be as per the documentation (eg: for keys à payments/flex/v1/keys).
  4. Payload sent in the request payload should exactly match along with spaces to the “requestBody” value used in xpaytoken.

 

Note:

For Flex Keys resource we have to send xpaytoken

https://sandbox.api.visa.com/cybersource/payments/flex/v1/keys?apikey={apikey}

 

for flex Tokens there will be no xpaytoken

https://sandbox.api.visa.com/cybersource/payments/flex/v1/tokens

 

Try this out and keep me updated!

 

Thanks

Sanobar