"Personal Account Number cannot be decrypted" error

Solved! Go to solution
Regular Visitor

"Personal Account Number cannot be decrypted" error

Hi all,

I've got an error when calling Matched Eligible Installment Plans API


POST https://sandbox.api.visa.com/installments/v2/plans/match?apiKey=API_KEY
Content-Type: application/json
x-pay-token: xv2:1690949911:da8d3ef8de0a1df1175db21c8733b7fc439e3c7548d4ba61c05d1672873fb7c4
x-correlation-id: S5JAIEFUNBXH_SC

  "encAccountNumber": "eyJhbGciOiJBMjU2R0NNS1ciLCJpdiI6ImlIYXZpVF80YWUxRnVfNnAiLCJ0YWciOiJFcFFqZ2tNMHJodDBkT3p1LVRZSDdRIiwiZW5jIjoiQTI1NkdDTSIsImtpZCI6IkdVOTJSN0NCT1lWT01RQjdMN0ExMjFUa0NpN3E4aUEybThOVTBBNjBTVVhhbks1S0kifQ.f_qtPqBg5Juc7ZL2IjP40KKsh5rEbEJYCp4Y7CWNDqs.luzvvllDpOPn7cQj.FEImkKwqCznDeWevJ1m7JA.0aRmcTlE6U2e-ViWcpor7A",
  "transactionAmount": 50000,
  "transactionCurrency": "AUD"


Got the error:


  "errorResponse": {
    "status": 400,
    "reason": "invalidRequest",
    "message": "Request validation failed.",
    "details": [
        "location": "encAccountNumber",
        "message": "Personal Account Number cannot be decrypted."


I'm using 4111222233334444 as a test card number (PAN). 

The helloworld endpoint works fine

Can someone please help me? 

Thanks in advance

Community Moderator

Re: "Personal Account Number cannot be decrypted" error

Hi, @alex_at_payfurlThank you for reaching out! An agent is looking into this and will get back to you soon. If any community members know of a solution, please feel free to reply here. 

Regular Visitor

Re: "Personal Account Number cannot be decrypted" error

Thank you, Jenn, for your response. I believe I have found the solution to the issue, and I'd like to share it here for anyone who might be looking for it. There were two main issues I encountered:

  1. Visa provides two different pairs of keys: one for X-Pay Token and another for Encryption. I had to use the second one to resolve the problem.

  2. To test the implementation, it is necessary to provide a testing PAN (Primary Account Number) issued by Visa. I assume that the test PAN needs to be installed into your dashboard or something like that.

I hope this information proves helpful for future seekers facing a similar problem.

Visa Developer Support Specialist

Re: "Personal Account Number cannot be decrypted" error

Hi @alex_at_payfurl,


Thanks for sharing your solution with us. We really appreciate this 😀 



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