Why do I receive the error 422 : Unable to Decrypt Data using the Card Component or Drop-In?

When our system is not able to decrypt the encrypted data you are sending in your payment request, you will receive the error 422 : Unable to Decrypt Data. 

When you receive that error, you should:

  1. Make sure that your credentials for front-end authentication (origin key or client key) and for back-end authentication (API credentials) are generated on the same webservice user.
  2. Check whether these keys are generated in the same environment (test/live) as the endpoints you are using. Do not use keys generated on the test environment in requests to our live environment.
  3. Pass the encrypted values exactly how you collected them from the front-end. Make sure that you are not accidentally truncating or changing the values.
  4. Check whether your payments request is structured in the correct way. You can use our API explorer for reference.

For further information about encryption/decryption, you can look at How does the card data encryption/decryption work for the Card Component or Drop-in integration? 

Was this article helpful?
1 out of 2 found this helpful