Jetpay Developer Guide
Getting Started
Setting Up Your Integration
6 min
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 https //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 docid\ wpk0w4zxqewdtjcj5vhi5 for examples of how to use the api