End-to-End API Example

Overview

In order to better understand how the Checkbook API works, and the various types of API requests you can make to the server, this page outlines a specific payment workflow from the user perspective using a tool such as Postman.

Note: This is by no maeans a complete example; however, this example should provide you with enough basic information so you can understand the Checkbook APIs simplicity and ease of use.

Send a payment using the Checkbook API

One of the most common use cases for customers who want to use the Checkbook API is to send a payment to a recipient. Although some users may prefer to use the dashboard UI to send a payment, many others may prefer to use the API to send payments, as this will enable you to create batch scripts and automate the check sending process without significant user interaction.

To send a payment using the Checkbook API, you will need to perform the following tasks:

  • Add a bank account
  • Send a payment using the Checkbook API

Add a bank account

Before you can send a payment to a recipient using the Checkbook API, you must first create an account with Checkbook and add your bank account details so Checkbook can facilitate the payment bwteen you and your recipient. To add a bank account:

  1. Verify you have access to the Checkbook API. If you are unsure whether you can make API calls, contact Checkbook support, or your account representative.

  2. Once you have verified you can make API calls to the server, using your preferred API tool (e.g. Postman), use the following URL syntax to create your request (note that this is a POST API request).

https://api.checkbook.io/v3/account/bank

In this request, note the following:

  • https://api.checkbook.io is the base URL for your API request
  • v3 is the API version
  • account is the service you are calling
  • bank is the resource you are calling
  1. In the body of your POST request, enter the following information:
  • account number is your bank account number
  • name (optional) is a short description of the account
  • routing number is the ABA routing number for your bank
  • type of account is the type of account you are using (checking, savings, business)

Sample Request

     --url https://api.checkbook.io/v3/account/bank \
     --header 'Authorization: 161496fa27ba66d8xy0619ac6f421bd9:b659b37771f1035c76c0b804c9082f47' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "type": "BUSINESS",
  "account": "464009751",
  "routing": "809733117"
}
'

Where:

  • type is the type of account
  • account is the account number
  • routing is the bank routing number
  1. Execute the request by sending the request to the Checkbook server.

Sample Response

{
"account": "0117",
"billing": false,
"date": "2023-12-18 20:04:07",
"default": false,
"id": "e012334fe21f430c9941fc9ab747a36c",
"name": null,
"routing": "322271724",
"status": "DEPOSIT_ONLY",
"type": "BUSINESS"
}

Where:

  • account is the Checkbook account ID
  • billing is the billing account
  • date is the date that the account was created
  • default is the default account
  • id is the unique identifier
  • name is the name of the bank account
  • routing is the bank routing number
  • status is the type of allowable transactions
  • type is the type of account

Send a payment

Now that you have added a bank account that Checkbook can use to facilitate a payment, you can use the Checkbook API to send a payment to a recipient. Because there are several different types of payments you can send with Checkbook, you need to determine how you would like to disburse the payment to recipient. In this example, you will send a payment to a recipient via a physical check.

To send a physical check to a recipient, perform the steps listed below.

  1. Use the following URL syntax to create your request (note that this is a POST API request).

https://api.checkbook.io/v3/check/physical

Where:

  • https://api.checkbook.io is the base URL for your API request
  • v3 is the API version
  • check is the resource you are calling
  • physical is the service you are calling
  1. In the body of your POST request, enter the following required information:
  • amount is the amount of the payment
  • name is the nama of the recipient
  • recipient details is an object that contains detailed information about your recipient, including:
    • city is the city where the recipient resides
    • address is the physical address where the check should be sent
    • state is the state where the recipient resides
    • zip is the 5-digit ZIP code for the city where the recipient resides
  1. Execute the request by sending the request to the Checkbook server.

Sample Request

     --url https://sandbox.checkbook.io/v3/check/physical \
     --header 'Authorization: 62bfe4e5551d487aa5fe6x448865a508:VBKyl17KbXDsaFiYUBmIzeiaIWwJl0' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "recipient": {
    "city": "St. Louis",
    "line_1": "155 Main Street",
    "state": "MO",
    "zip": "63101"
  },
  "amount": 225,
  "name": "ABC Construction"
}

Sample Response

  "amount": 225,
  "date": "2023-12-20 07:16:55",
  "description": null,
  "id": "47813bed6240491abb30d8d22a094500",
  "image_uri": "https://checkbook-checks-sandbox.s3.amazonaws.com/b1a7d6cb-b6f8-40c9-adbc-2989ce0b8837.png",
  "name": "ABC Construction",
  "number": 5003,
  "recipient": {
    "city": "St. Louis",
    "country": "US",
    "line_1": "155 Main Street",
    "line_2": "",
    "state": "MO",
    "zip": "63101"
  },
  "remittance_advice": [],
  "status": "IN_PROCESS"
}