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:
- 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.
- 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.
- 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.
- 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?