Re: "status":401,"code":"9124"

Solved! Go to solution
Nkanyezi
Regular Visitor

"status":401,"code":"9124"

Hi, can you assist me with the following error:

 

b'{"responseStatus":{"status":401,"code":"9124","severity":"ERROR","message":"Incorrect credentials supplied","info":""}}'

 

I created the header as follows:

encoded_id = base64.b64encode(user_id)
headers = {'Content-Type': 'application/json', 'Authorization': encoded_id:passoword}
r = requests.post(url, verify = ca_pem, cert = (client_cert, private_key), headers = headers, auth = (user_id, password), data = body)

 

 

8 REPLIES 8
API_Products
Visa Developer Support Specialist

Re: "status":401,"code":"9124"

Hey @Nkanyezi,

 

I'd like to help you out with the issue your experiencing. Please provide the following information, so I can help troubleshoot the issue:

1. End Point
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header.

 




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.

Nkanyezi
Regular Visitor

Re: "status":401,"code":"9124"

Hi, thanks for the response 

url = https://sandbox.api.visa.com/visadirect/fundstransfer/v1/pullfundstransactions
req header = header = {'Accept': 'application/json', 'Authorization':'{}'.format({encoded_id:password})}
req body = I used the one on the API (Visa Direct) reference page
res header = {'Server': 'nginx', 'Content-Type': 'application/json;charset=UTF-8', 'Content-Length': '130', 'X-SERVED-BY': 'l55c012', 'X-CORRELATION-ID': '1568751893_390_940924619_l55c012_VDP_WS', 'X-APP-STATUS': '400', 'X-Frame-Options': 'SAMEORIGIN', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=2592000;includeSubdomains', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '-1', 'X-Cnection': 'close', 'Date': 'Tue, 17 Sep 2019 20:24:53 GMT', 'Connection': 'close'}
res body = b'{"responseStatus":{"status":400,"code":"9125","severity":"ERROR","message":"Expected input credential was not present","info":""}}'


 

SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: "status":401,"code":"9124"

Hi @Nkanyezi,

The error "Expected input credential was not present" usually occurs when the credentials used are invalid. Can you please confirm if you are using valid credentials?

 

Visa Direct uses Two Way SSL for authentication. Please test the connectivity and credentials by following the Two-Way SSL (Mutual Authentication) guide: https://developer.visa.com/vdpguide#twoway_ssl_mutual_authentication    

 

If you continue to get this error, please provide us screenshots of your SoapUI or VDC Playground setup so we can further investigate the issue.

 

Please also refer to this community forum post link for additional troubleshooting steps that we have provided: https://community.developer.visa.com/t5/General/Always-getting-quot-Expected-input-credential-was-no...

 

 


Best,
Stacey

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

Re: "status":401,"code":"9124"

Hey @Nkanyezi,

 

Instead of using Soap UI, you can also start testing with the VDP Playground application, which is downloadable from your VDP project under the "Assets" section. 

20190917 Assets VDP Playground.png 

The VDP Playground is an application that makes testing VDP APIs easy and quick and it creates the JKS file for you quickly.

 

I got a successful response using the VDP Playground for Visa Direct PullFundsTransactions POST and you can see it in my screenshot to you below. 

20190918 VD pullfundstransactions 200 OK.png

 

Please note, to create the JKS file just browse for your public key (cert.pem) and private key and click on the JKS button. After you click on the JKS button a message will appear saying that your JKS file is created. Also, make sure to enter your credentials, host, port and EndPoint. You will also need to enable the Proxy.

 

Endpoint: https://sandbox.api.visa.com/visadirect/fundstransfer/v1/pullfundstransactions

 

Here is my Successful Request:

 

{
"surcharge": "11.99",
"amount": "124.02",
"localTransactionDateTime": "2019-09-18T23:33:23",
"cpsAuthorizationCharacteristicsIndicator": "Y",
"colombiaNationalServiceData": {
"addValueTaxReturn": "10.00",
"taxAmountConsumption": "10.00",
"nationalNetReimbursementFeeBaseAmount": "20.00",
"addValueTaxAmount": "10.00",
"nationalNetMiscAmount": "10.00",
"countryCodeNationalService": "170",
"nationalChargebackReason": "11",
"emvTransactionIndicator": "1",
"nationalNetMiscAmountType": "A",
"nationalReimbursementFee": "20.00",
"costTransactionIndicator": "0"
},
"riskAssessmentData": {
"traExemptionIndicator": true,
"trustedMerchantExemptionIndicator": true,
"scpExemptionIndicator": true,
"delegatedAuthenticationIndicator": true,
"lowValueExemptionIndicator": true
},
"cardAcceptor": {
"address": {
"country": "USA",
"zipCode": "94404",
"county": "081",
"state": "CA"
},
"idCode": "ABCD1234ABCD123",
"name": "Visa Inc. USA-Foster City",
"terminalId": "ABCD1234"
},
"acquirerCountryCode": "840",
"acquiringBin": "408999",
"retrievalReferenceNumber": "330000550000",
"senderCurrencyCode": "USD",
"addressVerificationData": {
"street": "XYZ St",
"postalCode": "12345"
},
"cavv": "0700100038238906000013405823891061668252",
"systemsTraceAuditNumber": "451001",
"businessApplicationId": "AA",
"senderPrimaryAccountNumber": "4895142232120006",
"settlementServiceIndicator": "9",
"visaMerchantIdentifier": "73625198",
"foreignExchangeFeeTransaction": "11.99",
"senderCardExpiryDate": "2015-10",
"nationalReimbursementFee": "11.22"
}

 

 

Here's my Successful Response:

 

{
"transmissionDateTime": "2019-09-18T23:36:45.000Z",
"approvalCode": "98765X",
"cavvResultCode": "8",
"cpsAuthorizationCharacteristicsIndicator": "3333",
"transactionIdentifier": 150342876880710,
"actionCode": "00",
"responseCode": "5"
}

 

 

Here's my Successful Response Header:

 

Status Code: 200 OK
Server : nginx
Content-Type : application/json;charset=UTF-8
Content-Length : 223
X-SERVED-BY : l73c013
X-CORRELATION-ID : 1568849805_524_523656319_l73c013_VDP_WS
X-APP-STATUS : 200
X-APP-STATUS : 200
X-Backside-Transport : OK OK,OK OK
X-Global-Transaction-ID : 373570761
Content-Language : en-US
X-Frame-Options : SAMEORIGIN
X-XSS-Protection : 1; mode=block
X-Content-Type-Options : nosniff
Strict-Transport-Security : max-age=2592000;includeSubdomains
Cache-Control : no-cache, no-store, must-revalidate
Pragma : no-cache
Expires : -1
Date : Wed, 18 Sep 2019 23:36:45 GMT
Connection : keep-alive

 

Please let us know if you're still experiencing a problem because I just tested it out right now and see that it works!

 




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.

API_Products
Visa Developer Support Specialist

Re: "status":401,"code":"9124"

Hey @Nkanyezi,

 

Just use your own credentials and certificates from your VDP project app for it to work. I've attached the VDP Playground JSON file too. Please view the attachment.

 

20190916 Downloaded Cert Private Key.png

 

20190916 Credentials Download Certs.png

 

Please note, that when you create a test App in our sandbox you will receive test data in your App. The test data for your Visa Developer application is available in the Dashboard under test data in the left navigation, this will ensure that you are using valid data that has been provisioned for specific scenarios. You will basically have a table per API that is split into the Request and Response sections and the values on the Request section are meant to be populated in the payload with the intention of obtaining results specified in the Response section.
 
Sandbox data is limited to what is provided in the Test Data tables and is not integrated to the Visa Network and you cannot test real data in sandbox.

20190905 Test Data.png

 

 




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.

Nona
Regular Visitor

Re: "status":401,"code":"9124"

I also encountered with same problem. As I search for the problem there are many suggestions but not worked any of it. 

API_Products
Visa Developer Support Specialist

Re: "status":401,"code":"9124"

Hey @Nona,

 

To further investigate, please provide the following information:

1. End Point
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header.

 




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.

SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: "status":401,"code":"9124"

Hi @Nkanyezi,

I'd like to let you know about VDC Playground. Visa Developer Center Playground (VDC Playground) is a tool designed exclusively for testing and troubleshooting Visa APIs that are exposed through the Visa Developer Platform (VDP). It comes integrated with all required authentication methods to connect and get going with VDP APIs.

Please feel free to use this tool and use the "Export" feature to capture additional information to share with us for further troubleshooting.

To access and download this tool, log in to Visa Developer > Project dashboard > Asset Management.

Please access the User Guide below for details:
https://developer.visa.com/pages/visa-developer-center-playground

 


Best,
Stacey

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