400 code 9501 Invalid input found, please correct the input data using Visa sample data

Occasional Visitor

400 code 9501 Invalid input found, please correct the input data using Visa sample data

First attempted to use application generated data, received the 400 code 9501 Invalid input found error, then copied and pasted sample JSON right from the API docs and receive the same error. 
Not sure if this has anything to do with MLE because that is required for this endpoint.

Thank you

3 REPLIES 3
Highlighted
Visa Dev Moderator

Re: 400 code 9501 Invalid input found, please correct the input data using Visa sample data

Hey @erin,

 

I'm happy to help you resolve the issue. Please refer to the Visa Developer Error Codes page for tips on how to resolve the issuer here - https://developer.visa.com/pages/visa-developer-error-codes.

 

Please note, you can use VDP Playground, Postman, or SOAP UI tool to test the APIs. Please see user guides below for respective tools. 

 

VDP Playground – https://community.developer.visa.com/t5/Developer-Tools/How-to-test-and-troubleshoot-APIs-with-the-V... 

 
Postman – https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl#testing_twoway_ssl_connectivity_... 
 
SOAP UI – https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl#testing_twoway_ssl_connectivity_... 

 

To resolve the issue, can you please make sure you are using the right credentials, such as username and password (please refer to below screenshot on Credentials below)?
20190920 Credentials.png 
In addition to that, the issue could also be caused by the Certificates not being sent with the request.

You have two options to generate a Certificate Signing Request (CSR):

  1. Have Visa generate a CSR for you (recommended)
  2. Generate your own CSR

 

Continuing to the Key Store
Once you have a private key and two certificate files in your local directory, you will need to combine them into a key store. You can decide whether to use Java Key Store (JKS) or PKCS (P12) key store, depending on what your development environment requires.

If you continue to get this issue, please provide us the following information and correlation ID and we can further investigate the issue.
1. End Point 
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

Please perform these steps and let me know your findings.



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

Thanks,
Diana

Highlighted
Occasional Visitor

Re: 400 code 9501 Invalid input found, please correct the input data using Visa sample data

Diana,

Thank you for your response. I was able to figure out (I think) what was going wrong. It had to do with they keyid header. The documentation on this is kinda vague.


The endpoint is:  https://sandbox.api.visa.com/visapayouts/v1/payouts


Now the error I am receiving from both the sample data and the data my app generates is the same:

{
   "errors": {
       "details": [],
       "message": "The recipient country and currency route selected is not supported",
       "reason": "invalidBankParameter",
       "status": 400
   }
}


Here is the JSON (p.s. this is all dummy data no security issue)
%{
     "recipientDetail" => %{
       "address" => %{
         "addressLine1" => "Soi farang thua yai",
         "city" => "Bangkok",
         "country" => "TH"
       },
       "bank" => %{
         "accountName" => "SuperFly",
         "accountNumber" => "23456789",
         "accountNumberType" => "DEFAULT",
         "bankName" => "SCB",
         "countryCode" => "THA",
         "currencyCode" => "764",
         "BIC" => "SICOTHBK"
       },
       "companyName" => "SuperFly",
       "payoutMethod" => "B",
       "type" => "C"
     },
     "originatorDetail" => %{
       "bankBIC" => "1234567",
       "bankCountryCode" => "392",
       "bankId" => "470890",
       "bankName" => "Shinsei",
       "merchantCategoryCode" => "6012",
       "address" => %{
         "country" => "JP"
       },
       "originatorId" => "orig123",
       "originatorName" => "OPN Japan",
       "originatorCustomerName" => "Doutor"
     },
     "senderDetail" => %{
       "address" => %{
         "addressLine1" => "1-2-3 Seed ChoMe",
         "city" => "Shibuya",
         "country" => "JP"
       },
       "companyName" => "OPN Service",
       "senderReferenceNumber" => "pvdr_8XGAM4QZSZWI3FOWGTX9A0O13RLKT",
       "sourceOfFunds" => "05",
       "type" => "C"
     },
     "transactionDetail" => %{
       "amount" => "50000",
       "businessApplicationId" => "AA",
       "localTransactionDateTime" => "2020-09-16T11:21:30",
       "purposeOfPayment" => "ISPENS",
       "retrievalReferenceNumber" => "026103164167",
       "systemTraceAuditNumber" => "164167",
       "transactionCurrencyCode" => "392"
     }
   }

The X-CORRELATION-ID  is: 1600401755_538_426416866_l73c012_VDP_WS

Is there an account setting or countries not participating ?

Highlighted
Visa Dev Moderator

Re: 400 code 9501 Invalid input found, please correct the input data using Visa sample data

Hey @erin,

 

Thanks for letting us know that the issue is with the keyid header.  Are you still experiencing the 400 error?

 

If the error persists, please provide the following information and someone will be happy to help investigate the issue until resolution:
1. Endpoint
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body
Using VDP Playground, you can find the x-correlation-id in the Response Header.



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

Thanks,
Diana