Visa Europe Payment Stop System - Expected input credential was not present

Solved! Go to solution
Matt
Regular Visitor

Visa Europe Payment Stop System - Expected input credential was not present

Hello,
I am trying to run REST https://sandbox.api.visa.com/vepss-api/v1/stop_instruction/create from Visa Europe Payment Stop System API and getting error response: {"responseStatus":{"status":400,"code":"9125","severity":"ERROR","message":"Expected input credential was not present","info":""}}.
Furthermore, REST https://sandbox.api.visa.com/vdp/helloworld is working for me and i am getting successfull response.
So it seems Mutual SSL and Basic Auth is configured properly.
I see MLE Verification is mandatory in Visa Europe Payment Stop System API calls, so i added it too in my Java code like in sample code on https://developer.visa.com/pages/encryption_guide. ( I used server encryption certificate which I found in Credentials section in Encryption/Decryption topic). I also changed Key-ID to my generated Key-ID.

My request json is taken from sample requests:
{
"PAN": 4333340901000026,
"merchantIdentifiers": {
"cardAcceptorIDs": [
"ABCD100"
],
"merchantNames": [
"Merchant1"
]
},
"stopDuration": 12
}

I also noticed that clientId header is needed, but i don't know which value i should put there, so i tried Key-ID, userId or even random values and still same error.
So any idea how can i fix it guys?

Best regards,

6 REPLIES 6
Matt
Regular Visitor

Re: Visa Europe Payment Stop System - Expected input credential was not present

Also, my response headers are:

{Server=[nginx], Content-Type=[application/json;charset=UTF-8], Content-Length=[130], X-SERVED-BY=[l73c017], X-CORRELATION-ID=[1582196537_022_437464266_l73c017_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=[Thu, 20 Feb 2020 11:02:17 GMT], Connection=[close]}

API_Products
Visa Developer Support Specialist

Re: Visa Europe Payment Stop System - Expected input credential was not present

Hey @Matt and @BitlifeAPP,

 

Are you using VDC Playground for testing? We recommend you to use the VDC Playground tool for your testing. Can you please download this tool from the Assets tab of your project and test from there?

 

20190801 Assets tab.png

 

You can find the guide on Getting Started with VDC Playground from this blog post here - https://developer.visa.com/pages/visa-developer-center-playground
 
I have also attached the VDC Playground tool as an email attachment for your convenience. Please note, that under the Encryption/Decryption section you will want to add a CSR and then generate the CSR (default option). The MLE Public Key is the mleServerPublicKey.pem. Also, copy the Key-ID and enter it into the VDC Playground field that says Key Id. Make sure MLE is enabled (toggled to the right).

 

Furthermore, I just ran a Visa Europe Payment Stop System test on VDC Playground and I was able to get a successful 200 OK result. Please see my request/response payload below.

 

Method: Post

EndPoint: https://sandbox.api.visa.com/vepss-api/v1/stop_instruction/create

 

Request: 

 

{
"stopDuration": 12,
"merchantIdentifiers": {
"merchantNames": ["Merchant1"],
"cardAcceptorIDs": ["ABCD100"]
},
"PAN": 4333340901000026
}

 

 

Response:

 

{"stopInstructions": [
{
"merchantIdentifier": {"merchantName": "Merchant1"},
"stopID": "60000"
},
{
"merchantIdentifier": {"cardAcceptorID": "ABCD100"},
"stopID": "60001"
}
]}

 

 

Response Header:

 

Status Code: 200 OK
Server : nginx
Content-Type : application/json;charset=UTF-8
Content-Length : 943
X-SERVED-BY : l73c015
X-CORRELATION-ID : 1582222092_107_105778888_l73c015_VDP_WS
X-APP-STATUS : 200
X-APP-STATUS : 200
Cache-Control : no-cache, no-store, must-revalidate
Pragma : no-cache
Expires : 0 ,Thu, 01 Jan 1970 00:00:00 GMT ,-1 ,-1
X-Frame-Options : SAMEORIGIN
X-XSS-Protection : 1; mode=block
X-Content-Type-Options : nosniff
Strict-Transport-Security : max-age=2592000;includeSubdomains
encrypted : true
Content-Language : en-US
Date : Thu, 20 Feb 2020 18:08:12 GMT
Connection : keep-alive

 

Stop Instruction Create API 200 OK.png




Thanks,

Diana



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

Matt
Regular Visitor

Re: Visa Europe Payment Stop System - Expected input credential was not present

Just downloaded moment ago VDC Playground, configured everything and it works there.
But in Java code which i wrote using sample from https://developer.visa.com/pages/encryption_guide it's not working.
And yes, as I said, I got public key(mleServerPublicKey.pem) and client private key (mleClientPrivateKey.pem) from Encryption/Decryption section in Credentials section - I clicked add a CSR and then generated the CSR (default option). Also i changed in example Java code KeyId to new generated KeyId from Encryption/Decryption section.


I will sent to you guys my java sample code + jks/cert/key files on e-mail developer@visa.com to let you guys take a look and help resolve the issue.

Best Regards,

API_Products
Visa Developer Support Specialist

Re: Visa Europe Payment Stop System - Expected input credential was not present

Hey @Matt

 

I received your file attachments in our developer@visa.com mailbox and I'm really happy to help. Incident INC9123018 has been created for the engineering team to investigate. We're working on resolving your issue and we'll get back to you soon.

 




Thanks,

Diana



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

Matt
Regular Visitor

Re: Visa Europe Payment Stop System - Expected input credential was not present

Okay guys, I finally figured it out by myself, I didn't add keyId to HTTP headers. After I added it to code, it now works. Problem solved 🙂

Best Regards,

API_Products
Visa Developer Support Specialist

Re: Visa Europe Payment Stop System - Expected input credential was not present

Hey @Matt,

 

Thanks for the update and sharing with us how you have resolved the issue. Feel free to reach out to the Visa Developer Community whenever you have questions or need assistance.

 




Thanks,

Diana



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