Learn how to integrate our APIs into your application
B54 API
B54 is a platform that gives you access to on-lending capital which gives you the financial bandwidth to grow your business' revenue-backed transactions. Your lending activities are also fully covered by our licenses meaning all of your transactions are regulatory compliant.
Our API gives you access to most of the features you can use on our dashboard and lets you extend them for use in your application. It strives to be RESTful and is organised around the main resources you would be interacting with.
API Access
To gain access to the B54 Production or Sandbox API, create an account on the B54 dashboard or the B54 Sandbox dashboard. Once you’ve completed the signup process and acknowledged our terms, we’ll provide an API key via the Dashboard.
Credit Limit
Every B54 customer profile comes with unlimited units of test capital, and a test card for repayments. This gives you the base to simulate transactions, test our API and build your platform.
Environments
B54 offers two environments for integration:
- Production (Live): real environment, used for providing our services.
- Sandbox (Test): test environment, mirroring the logic and functionality of production. Some minor configuration differences might be present with the production environment for enabling easier testing process.
The base URLs per environment are:
- Production: https://api.b54.co/
- Sandbox: https://sandbox.api.b54.co/
Sample Requests
We provide sample API calls below to each method in JavaScript & Python. All you need to do is insert your specific parameters to test the calls in your development environment.
After setting all configuration variables, you need to make a HTTP request and handle the response like the example below.
axios(config)
.then(response => {
console.log(JSON.stringify(response.data))
})
.catch(error => {
console.log(error)
})
response = requests.request(“METHOD”, url, headers=headers, data=data)
print(response.text)
curl -X METHOD 'https://api.bank54.co/' \
-H "Authorization: Bearer ${TOKEN}"
Postman Collection
Key | Value |
---|---|
api_key | Your API key. You can get your API key from the Settings section on the portal. |
url | This is initially set in the Postman Environment. |
Requests and Response
Both request body data
and response data
are formatted as JSON. Content type for responses will always be application/json. Generally, all responses will be in the following format:
{
"status": [string], // Only success if the details provided could be processed and no error occured while processing
"message": [string], // Explains why status is error... Entirely informational. Please only log this but do not use for your checks
"data": [object] // contains actionable result of processing if present
}
curl -X METHOD https://api.bank54.co/
-H 'Content-Type: application/json'
-d '{
"status": [string], // Only success if the details provided could be processed and no error occured while processing
"message": [string], // Explains why status is error... Entirely informational. Please only log this but do not use for your checks
"data": [object] // contains actionable result of processing if present
}'
We generally recommend that developers use HTTP status codes to determine the result of an API call.
The message
key is a string that will contain a summary of the response and its status. For instance, when trying to retrieve a list of customers, the message
might read “Customers retrieved”. In the event of an error, the message key will contain a description of the error. This is the only key that is universal across requests.
The data
key is where you want to look for the result of your request. It can either be an object or an array depending on the request made. For instance, a request to retrieve a single customer will return a customer object in the data key, while the key would be an array of customers if a list is requested instead.