The Afinis sandbox is an isolated test environment where you can try out the standardized APIs. You can make an API call within this sandbox, or use an API REST tool like Postman (see below). A sample set of data is available for each API to allow you to simulate an API call in a production environment.  Select an API from the API catalog, set the API Key information as previously provided in the Getting Started page, fill in the appropriate test data, and execute the API call. 

Return Codes

The API will always return an HTTP STATUS. The table below summarizes the general response codes that are returned in the APIs.

 Code

 Description

2XX

The API call was successful.

4XX

The API call had an error. The error will be encoded in the body of the response.

5XX

The API call was unsuccessful. You should retry later.

 

Specific Return Codes

  HTTP Code

  Description

400

Bad request

The request could not be understood or required parameters were missing

 

2000

Invalid JSON Structure

 

2001

“Field name” is missing or invalid

 

2002

Invalid date

 

2003

Invalid combination of fields submitted. Check the API specification for eligible combinations

 

2004

“Field name” cannot be more than [max] characters

401

Unauthorized

Authentication failed or user doesn’t have permissions for requested operation

 

1000

API key is missing, invalid or expired

 

1001

API token is invalid, expired, or account associated with key does not have access to that API

403

Forbidden

Access denied, the operation is not allowed  

404

Not Found

Resource was not found.

405

Method Not Allowed

The request method is known by the server but has been disabled and cannot be used.

406

Invalid Accept

Web server doesn't find any content that conforms to the criteria given by the user agent.

415

Content Type

The media format of the requested data is not supported by the server, so the server is rejecting the request.

422

4001

Unprocessable request due to "%%"

500

3001

Internal server error

503

Service Unavailable

Service is temporarily unavailable

 

API Testing

Select the API that you want to test:

Account Validation 

Account Validation Plus Name 

Authorize to Initiate Payment

Bank Contact

Bank Contact v2

Corporate Account Balances

Corporate Transaction Detail

Corporate Transaction History

Pay Me

Payee Profile

Payment Initiation

Real-Time Billing Account Validation

Request Proof of Authorization

Request for WSUD

Transaction Status

Wire Status

 

Postman

 In this section, we take a look at how to make direct HTTP requests by using Postman.   If you are new to Postman, see the Postman documentation and tutorials.

 For a GET request like Bank Contact API insert the Resource URL and set the Consumer Key “?apikey=” with the appropriate credentials, followed by the reason i.e., “&reason=ACH_FRAUD” as shown below:

 For a POST request like Account Validation, information has to be passed in the header and the body of the HTTP request (changing the values as required) as shown below.

 The header includes the Resource URL and Consumer Key with raw json content sent in the request body.

*NOTE: In order to send json in the request body, select the radio button raw and set the text to “JSON(application/json).”