Understanding API Conventions

Understanding API Conventions

 

Client: Client Application

Status: HTTP status code of response

Responses: All possible responses are listed under ‘Responses’ for each method. Only one of them is issued per request server.

Format Type: All responses are in JSON format

Encryption Type: Any API resource that has sensitive data in the request/response will be subjected to Visa Message Level Encryption (MLE) policies. For full details please refer to the MLE guide (https://developer.visa.com/pages/encryption_guide ).

 

References 

Links

Developer Site (Start Guide) 

https://developer.visa.com/pages/working-with-visa-apis/visadeveloper-

quick-start-guide

SSL Verification 

https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl

API Key 

https://developer.visa.com/pages/working-with-visa-apis/x-pay-token

Message Level Encryption 

https://developer.visa.com/pages/encryption_guide

 

Error Responses

 

The error.details field in the error response payload may include additional diagnostic information related to the HTTP response code. This can include details such as failed data validation constraints or the category of the error.

 

HTTP

Response Code

Description

400

invalidRequestAttributes The value provided for one or more request parameters is considered invalid. Examples include missing required field, value exceeding the length specified for this field, field formatting does not match the expected format, etc.

invalidRequest The API server could not understand the request. Some examples are base64 decoding failed, the field is not in a particular format, etc.

error.details[] This is a piece of optional information that may only be available in certain cases. We don’t recommend clients to build any application logic against any values of these attributes under this object. These are only for diagnostic purposes and can change at any time at Visa’s discretion.

401

API authorization error due to any of the following reasons:

+ Basic-Authorization Credentials not present in the request.

+ Basic-Authorization Credentials is not active.

+ Basic-Authorization Credentials not valid.

+ Basic-Authorization Credentials not active.

+ Other Authorization errors

error.details[] This is a piece of optional information that may only be available in certain cases. We don’t recommend clients to build any application logic against any values of these attributes under this object. These are only for diagnostic purposes and can change at any time at Visa Inc.’s Discretion.

 

403

The 403 (Forbidden) HTTP Status code indicates that this credential does not have permission to access the requested resource.

error.details[] This is a piece of optional information that may only be available in certain cases. We don’t recommend clients to build any application logic against any values of these attributes under this object. These are only for diagnostic purposes and can change at any time at Visa Inc.’s Discretion.

 

500

Please contact Visa Support at [email protected] with a complete error message and full HTTP request and response details.

error.details[] This is a piece of optional information that may only be available in certain cases. We don’t recommend clients to build any application logic against any values of these attributes under this object. These are only for diagnostic purposes and can change at any time at Visa Inc.’s Discretion.

 

503

The Visa system is currently unable to handle the request due to a temporary issue or maintenance of the server.

There may be a Retry-After header field to suggest an appropriate amount of time for the client to wait before retrying the request. The value of this field can be either an HTTP-date or several seconds to delay after the response is received.

Retry-After = HTTP-date || delay-seconds

 

Examples:

_Retry-After: Thu, 31 Dec 2020 23:59:59 GMT

_Retry-After: 120

Please contact Visa Support at [email protected] if the issue persists.

error.details[] This is a piece of optional information that may only be available in certain cases. We don’t recommend clients to build any application logic against any values of these attributes under this object. These are only for diagnostic purposes and can change at any time at Visa Inc.’s Discretion.