The transaction handling API is used to get information on a specific ongoing or completed transaction. This API is also used to create withdrawals.
!Note. The system is NOT idepotent, hence calling the Brite API will always create a new transaction in the system.
The Brite API has a time-out of 60 seconds, hence anyone that implements the Brite API shall make sure to have a longer time out value, for example 65 seconds.
To add extra security, before re-triggering a transaction make sure to do a search for the merchant reference in the Brite system. If it does not exists it’s safe to create a new one.
Transaction States #
The get transaction state API call is used to get the current state of an ongoing transaction. Once the transaction state reaches settled, merchants can with certainty assume that the funds will be transferred.
API Reference: /api/transaction.state
The following states are possible to receive from the Get transaction state API:
Name | Id | Deposits | Withdrawals |
STATE_CREATED | 0 | The first state of a deposit transaction. Transaction is created after the user has completed the KYC and selected the account to be debited. | The first state a withdrawal gets aftercreate_withdrawal is called. |
STATE_PENDING | 1 | Occurs after merchant approval (ifapproval_required is set) and Brite risk engine (customer age, merchant blocklist, Brite blacklist) has been passed. | Automatically after the transaction has been created or after merchant approval (if approval_required is set) or depending on the withdrawal rules set in Backoffice. |
STATE_ABORTED | 2 | The deposit has been aborted for a known reason, e.g. the customer entered the payment flow but later decided to cancel, or because of a misconfiguration in the customer bank. Please note: The transaction can still be settled at a later stage, so callbacks should still be listened to. | The withdrawal has been aborted for a known reason, e.g. the recipient account is invalid. |
STATE_FAILED | 3 | The deposit failed for an unknown reason (or was manually failed by Brite). Please note: The transaction can still be settled at a later stage, so callbacks should still be listened to. | The withdrawal failed for an unknown reason (or was manually failed by Brite). |
STATE_COMPLETED | 4 | The deposit flow has finished without errors in the customer bank. | The withdrawal flow has finished without errors in Brite’s bank. |
STATE_CREDIT | 5 | Funds have not yet been settled, but the transaction was successful and a credit callback is sent from Brite. When the credit callback is received, the end user should be credited by the merchant. The transaction receives the state credit immediately after the state completed, unless the transaction amount exceeds the exposure limit (set in the Brite Backoffice, see Backoffice Guide) – then the credit callback will be sent just before the state Settled. | The customer should be credited for the transaction. Occurs just before settlement. |
STATE_SETTLED | 6 | Deposit funds have arrived in the Brite bank account. The final state for a deposit. | Withdrawal funds have left the Brite bank account. The final state for a withdrawal. |
STATE_DEBIT | 7 | When a deposit has been stuck in STATE_CREDIT for more than 15 days,the state will change to STATE_DEBIT and a deposit callback will be sent. | Not applicable for Withdrawals. |
Get Transaction Details #
The get transaction by id API call allows merchants to get detailed information on an ongoing or completed transaction. The response will include all relevant information for merchants to handle the transaction.
API Reference: