I followed the Two-Way SSL solution to test helloworld API on POSTMAN, and it worked fine.
I then added a new request in the same collection in postman to test https://sandbox.api.visa.com/vsps/search (ref Visa Stop Payment Service API Reference), but now I got this error - {"responseStatus":{"status":400,"code":"9125","severity":"ERROR","message":"Expected input credential was not present","info":""}}
I checked the request and response in Postman console, I can see Client Certificates are used, and this request header exists - Authorization: Basic VTVFRUVEM0k1SDJPUlFBVklSS1UyMWRBSnJrc29iT0xrSnVXakFRQWZhMXV6bENfZzoyWW8xTEJ4MU02MFo4MjNUd1c=
I didn't set the request header - clientId, because I don't know the clientId, and I think clientId is not require in sandbox.
Please help me to fix this issue.
I've tested the foreign exchange API - https://sandbox.api.visa.com/forexrates/v2/foreignexchangerates, and I got the 200 response. Therefore, I feel the problem is with the VSPS endpoint server - https://sandbox.api.visa.com/vsps/search
Hey @yudong_cai,
The error message "Expected input credential was not present" with status code 400 and code 9125 indicates that the required credentials were not provided in the request. Here are some steps to troubleshoot and resolve this issue:
1. Verify Two-Way SSL Configuration:
Ensure that your two-way SSL certificates are correctly configured in Postman. Since you mentioned that the HelloWorld API works fine with the same configuration, the issue might be specific to the VSPS endpoint.
2. Check API Documentation:
Review the Visa Stop Payment Service (VSPS) API documentation on the Visa Developer portal to confirm that you are providing all required headers and credentials.
3. Request Headers:
Ensure that the Authorization header is correctly set. The header should be in the format:
```
Authorization: Basic <Base64_encoded_credentials>
```
4. Include Client ID:
Although you mentioned that you believe the clientId is not required in the sandbox, it is still worth including it in your request headers to see if it resolves the issue. You can find your clientId in the Visa Developer portal under your project settings.
5. Sample Request Header:
Make sure your request headers include at least the following:
```
Content-Type: application/json
Authorization: Basic <Base64_encoded_credentials>
clientId: <your_client_id>
```
6. Validate Endpoint URL:
Ensure that the endpoint URL is correct. The endpoint URL you provided is:
```
https://sandbox.api.visa.com/vsps/search
```