Download the PHP package fire/business-api-sdk without Composer
On this page you can find all versions of the php package fire/business-api-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package business-api-sdk
fire-business-api-php
A PHP library for accessing the Fire Business API
Installation
You can install fire-business-api-php by downloading the latest release or using composer:
composer require fire/business-api-sdk
To run the samples, edit the file sample/config.inc.php.sample
and rename to sample/config.inc.php
.
Documentation
The documentation for the Fire Business API is available at fire.com/docs. Use the API docs in conjunction with these SDK docs.
Prerequisites
- PHP >= 5.3
- The PHP JSON extension
- The PHP MBString extension
- The PHP cURL extension
Getting help
If you need help installing or using the library, please contact Fire Support at [email protected].
If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!
Authentication
If there are issues setting up a session, a will be thrown. Inspect and for more details.
Error Code | Message | Description |
---|---|---|
50404 | Sorry, we are unable to proceed with your request. | Generic message for all other errors. We hide the details of a lot of errors for security purposes. This can make it difficult to find the root cause of a problem |
To use a different endpoint instead of the live API, pass it in the constructor as follows:
Fire Accounts and Payees
See fire.com/docs for details of the objects returned.
Details of Single Account/Payee
See fire.com/docs for details of the objects returned.
Lists of transactions for an account or payee
See fire.com/docs for details of the objects returned.
This returns 10 transactions by default. Use an array to page as follows:
Internal transaction (same currency) between two Fire accounts
The fire.com API allows businesses to make payments between their accounts automatically.
The process is as follows:
- Create a new batch
- Add transfers to the batch
- Submit the batch for processing.
Transfers are performed in batches of up to 100 items. Internal transfers don't require approval.
If there are issues with the transfer, a will be thrown. Inspect and for more details.
Error Code | Message | Description |
---|---|---|
50402 | Insufficient Funds | Not enough money in the account to cover the transfer. |
50416 | The account does not accept that currency | Did you use GBP when you should have used EUR? |
50404 | Sorry, we are unable to proceed with your request. | Generic message for all other errors. We hide the details of a lot of errors for security purposes. This can make it difficult to find the root cause of a problem |
Bank Transfer to a Payee
The fire.com API allows businesses to automate payments to third parties across the UK and Europe.
For security, the API can only set up the payments. The batches of payments must be approved by an authorised user via the firework mobile app.
The process is as follows:
- Create a new batch
- Add payments to the batch
- Submit the batch for approval.
Once the batch is submitted, the authorised users will receive notifications to their firework mobile apps. They can review the contents of the batch and then approve or reject it. If approved, the batch is then processed.
There are two ways to process bank transfers - by Payee ID (Mode 1) or by Payee Account Details (Mode 2).
Mode | Description |
---|---|
Mode 1 | Set the payeeType to PAYEE_ID to use the payee IDs of existing approved payees set up against your account. These batches can be approved in the normal manner. |
Mode 2 | Set the payeeType to ACCOUNT_DETAILS to use the account details of the payee. In the event that these details correspond to an existing approved payee, the batch can be approved as normal. If the account details are new, a batch of New Payees will automatically be created. This batch will need to be approved before the Payment batch can be approved. These payees will then exist as approved payees for future batches. |
If there are issues with the transfer, a will be thrown. Inspect and for more details.
Error Code | Message | Description |
---|---|---|
50402 | Insufficient Funds | Not enough money in the account to cover the transfer. |
50404,50514 | Sorry, we are unable to proceed with your request. | Generic message for all other errors. We hide the details of a lot of errors for security purposes. This can make it difficult to find the root cause of a problem |
Decode a webhook
Send a test webhook
You can send a webhook to your server using the sample script in samples/.
The options are:
All versions of business-api-sdk with dependencies
ext-json Version *
ext-mbstring Version *
ext-curl Version *
robthree/twofactorauth Version >=1.6