{"responseStatus":{"code":"9501","severity":"ERROR","message":"Invalid input found, please correc

Rajkumar0210
New Contributor

{"responseStatus":{"code":"9501","severity":"ERROR","message":"Invalid input found, please correc

We are trying to execute "https://sandbox.api.visa.com//vsps/search" But results in below error. Please address whats the issue.

 

X-CORRELATION-ID: 1726058831_193_494714857_-576878785r_VDP_WS

 

Decrypted Response:

 

{
"errorResponse": {
"status": 400,
"message": "Bad Request : Message Validation Failed",
"details": [{
"message": " should be valid"
}]
}
}

 

API Response:

 

{"responseStatus":{"code":"9501","severity":"ERROR","message":"Invalid input found, please correct the input data","info":"","status":"400"}}

 

Data which am passing is below

{
"includeInactive": false,
"pan": "4072208010000000"
}

 

after Encryption:

eyJjdHkiOiJhcHBsaWNhdGlvbi9qc29uIiwiZW5jIjoiQTEyOEdDTSIsImlhdCI6MTcyNjAzODEzMTA2OCwiYWxnIjoiUlNBLU9BRVAtMjU2In0.f39Kqt0fWTdObw57A4kJZAwCp94F4EOJwjEQwfOD7FnwoGmNXVcQPKUpqoPYOtFzP_1H41hwu6SI7kIlx_Iw-xhzCMAe-IG57o7zBWtemwQ5Jklrjx1IpA_NXgt1LcNJXcngjBL5Go0ISxhXKxUKm1EIYvSROxmr3LRvlFZKIC8bZ4T9ype5Y6qnIZIdOunve6w2XtZh-_GXel1CJFHtLGZfQCYfWPPEmyYaPGL4bV-1LWlgyniSkSLM6RC3QGQPEjRbjcdUCDT8S1_8-oj38CTI_jescHA59G8GpCCwpdB0SwvzrR95B8JdMMed7ER1sI5E36mVxtZy1Qh9sF-ysQ.4DgGxT-MHv9URpf0.PCS9vtzBiIR0z-aPN8Pi4jHqXrVwajTOMAu0GOcPQJluvLoBY0ld3VgMDMTpGnSM0Ng933d3DT40AagBBCQKgtiuvxYa_zSkWyME6z93BEnrlhBa3Rj96lzPZQPG2GakP_aWqUkAw9j5pjN-_2IHAaBM92QeZq89alD9NxNHa6kYS_zBCGE2u2KNhIYG1D7_2LnphWqTD657BkRpqcLKn7Nili2o0DTOroWguW-IoWnRq8B2fEnJoz2GeHRuI7odorioHsJw8NvU2S3dfBcZs6O_UpNnAxgdRFrCADO9vsTF67ibTsvsh4R7-YhQHvCZhRTA1gQ.zB1hHE2zzsDceDpdecUVQA

2 REPLIES 2
SyedSa
Community Moderator

Re: {"responseStatus":{"code":"9501","severity":"ERROR&&

Hi @Rajkumar0210, An agent will get back to you as soon as possible. Until then, if any community member has information that may be helpful, please reply to this thread.

API_Products
Visa Developer Support Specialist

Re: {"responseStatus":{"code":"9501","severity":"ERROR&

Hey @Rajkumar0210,

 

The error message indicates that there is an issue with the input data you are sending in your request. Specifically, it mentions "Message Validation Failed" and "should be valid," which suggests that some part of the input data is not meeting the expected validation criteria.

 

Here's a checklist to help troubleshoot and fix the issue:

1. Check API Documentation: Ensure that the fields and their values in your request match the expected format as per the Visa API documentation.

2. Validate PAN: Ensure that the `pan` (Primary Account Number) is correct and valid. It should follow the Luhn algorithm and be a valid card number.

3. Field Names and Types: Ensure that the field names and data types you are sending match what the API expects.

4. Encryption: Make sure that the data is being properly encrypted and formatted according to the API requirements.

 

Here's a refined version of your JSON data:

```json
{
"includeInactive": false,
"pan": "4072208010000000"
}
```

If the error persists, it may help to further refine your encryption process. Here is a simplified example of how to structure your request in Python (replace placeholders with your actual values):

```python

 

# START 
import requests
import json

url = "https://sandbox.api.visa.com//vsps/search"
headers = {
"Content-Type": "application/json",
"Authorization": "Basic <your_encoded_credentials>",
"X-CORRELATION-ID": "1726058831_193_494714857_-576878785r_VDP_WS"
}

data = {
"includeInactive": False,
"pan": "4072208010000000"
}

response = requests.post(url, headers=headers, data=json.dumps(data))

print(response.status_code)
print(response.json())
# END 
```

 

Ensure that:
- Your API credentials are correctly encoded in the `Authorization` header.
- The `X-CORRELATION-ID` is unique for each request.
- You are using the correct encryption method as required by the Visa API.

If you have specific encryption requirements, follow the Visa API documentation closely and ensure your encryption library and methods are compliant. If the problem persists, consider reaching out to Visa's developer support for more detailed guidance.




Thanks,

Diana H.



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