API Reference

An Organisation represents a business or group, and Pay Runs belong to an Organisation. If you are using the API to make payments for yourself or your business then you may only need to create a single Organisation. If you are providing a service for multiple businesses, or operate in a multi-tenant setup, then you will want to create an Organisation for each one.

Creating an Organisation

In order to create an Organisation you will need to perform a POST - Create Organisation.

You will need to enter both Organisation and User information.

User Information

All Organisations have users, and to process payments we need to know who they are.

We provide a simple list of roles to capture the main responsibilities of the users registered within the organisation.

In rare occasions our compliance department may need to reach out to users using the details provided, but that will be strictly for verification purposes. Crezco will never use the user information provided here for anything other than KYC/KYB.

Example payload

{
     "partnerClientId": "Your-Unique-ID",
     "companiesHouseNumber": "11752182",
     "companyName": "Crezco LIMITED",
     "users": [
          {
               "email": "[email protected]",
               "firstName": "Joe",
               "lastName": "Bloggs",
               "role": "Admin",
               "active": true
          }
     ]
}

Response

You will receive a 201 response with the OrganisationId of the newly created Organisation.

Connecting Bank Accounts

Bank account connection must be performed interactively by a logged in Xero user who has access to the relevant bank accounts.

To start the process you must redirect the user to the connect endpoint with the Organisation's OrganisationId. This will initiate the connection workflow and send the user through their bank's Open Banking accounts workflow. For specific details see GET - Connect.

A returnUrl should always be set and specifies where the user will be sent following account connection and selection.

An example URI with a custom domain would look like: https://payments.example.com/organisations/{organisationId}/connect?redirectUrl=https://www.example.com

Following successful connection an organisation's bank accounts are available via GET - Organisation Bank Accounts.

📘

The bank account connection process may be repeated as many times as necessary - either to connect more bank accounts or to reconnect bank accounts which have become deactivated.

Each connection workflow may result in connecting 0, 1, or multiple bank accounts.