API: https://sandbox.api.visa.com/vbs/dapi/v1/transaction_enhanced

JorgeTigre
New Contributor

API: https://sandbox.api.visa.com/vbs/dapi/v1/transaction_enhanced

Estimados, muy buen día:

 

Quería consultarles, sin tienen código PHP completo, de ejemplo, para poder utilizar la API con el URL https://sandbox.api.visa.com/vbs/dapi/v1/transaction_enhanced

 

Porque me da el siguiente error:
[HTTP Status: 400] [{"responseStatus":{"status":400,"code":"9125","severity":"ERROR","message":"Expected input credential was not present","info":""}}] Error connecting to the API (https://sandbox.api.visa.com/vbs/dapi/v1/transaction_enhanced)

estuve intentando varias alternativas, y no logro hacerlo funcionar.

Muchas gracias por su ayuda.

 

Saludos cordiales

1 REPLY 1
DianaVisaPM
Visa Developer Support Specialist

Re: API: https://sandbox.api.visa.com/vbs/dapi/v1/transaction_enhanced

Hey @JorgeTigre,

 

I understand that you are encountering issues with the `https://sandbox.api.visa.com/vbs/dapi/v1/transactionEnhanced` endpoint in the Visa API.

 

Here are some steps to help you troubleshoot and resolve the issue:

1. Verify API Endpoint:
Ensure that you are using the correct endpoint URL: `https://sandbox.api.visa.com/vbs/dapi/v1/transactionEnhanced`. Double-check the URL for any typos or errors.

2. Check Request Headers:
Ensure that all required headers are included in your request. The typical headers for Visa API requests include:
```plaintext
Content-Type: application/json
Accept: application/json
Authorization: Basic <base64-encoded-credentials>
x-client-transaction-id: <unique-transaction-id>
```

3. Authentication:
Ensure that your `Authorization` header is correctly formed. It should contain the base64-encoded credentials in the format `Basic base64(userId:password)`. Ensure that the `userId` and `password` are correct and match those in your Visa Developer project.

4. Payload Structure:
Verify that the JSON payload being sent in the request body adheres to the structure expected by the API. Refer to the [Visa Direct API documentation](https://developer.visa.com/capabilities/visa_direct/reference) for the correct payload structure and required fields.

5. Mutual SSL Authentication:
Ensure that mutual SSL authentication is properly configured. The Visa API requires a client certificate for secure communication. Ensure that the client certificate and key are correctly configured and not expired.

6.  API Key:
Ensure that the `apiKey` parameter in the query string or header matches the API key provided in your Visa Developer project.

7. Review Error Response:
Examine the detailed error response returned by the API. The response may contain specific error codes or messages that can provide more insight into the issue.

8. Consult Documentation:
Refer to the Visa Developer documentation for any additional requirements or constraints. Reviewing sample requests and responses can help identify discrepancies.

 

Here is an example of what your request might look like:

```plaintext
POST https://sandbox.api.visa.com/vbs/dapi/v1/transactionEnhanced
Headers:
Content-Type: application/json
Accept: application/json
Authorization: Basic <base64-encoded-credentials>
x-client-transaction-id: <unique-transaction-id>

Body:
{
"primaryAccountNumber": "4111111111111111",
"queryStartDate": "2023-01-01",
"queryEndDate": "2023-01-31",
...
}
```




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.