Setting up your integration
Generating an API Client (Basic)
The simplest way to generate an API client is to use Swagger's online editor which can be found at editor.swagger.io.
- Download the Jetpay openapi.json file from extapi.jetpay.baselinepayments.com/openapi.json,
- Open the swagger editor,
- and import the JSON file by clicking on File > Import File.

This will result in the spec being loaded and the creation of a YAML document that shows the API as well as a visual representation of the docs on the right.

From here, click on Generate Client in the top menu and select the type of client you would like to generate from the list.
We're going to select javascript for this example.

This generates a javascript client, including documentation and source code.

Usage of the API through this client can be done according to the included docs.
Assuming that the folder where the client is located is 'jetpay' it could be imported and used as follows:
import {Jetpay} from 'jetpay';
let apiInstance = new Jetpay.TransactionsApi();
let body = new Jetpay.DebitTransactionCreateOperation(...);
apiInstance.createDebitDebitPut(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
The Next Step
See the sections in Using the API for examples of how to use the API.