Mode:
balance_transferWhat this mode does
Use this mode after your team has approved a loan, such as a debt consolidation or balance transfer loan, and knows the approved amount. You pass the approved loan terms when you create the token, and Opal guides the user through the following steps:1
Identity verification
Opal verifies the user’s identity. This step is skipped automatically if the Entity is already verified.
2
Account selection
Opal shows the user’s liability accounts with their current balances. Only accounts that can receive a payment today, or that can become payable once the user provides the account number, are selectable.
3
Account verification
For each selected account that cannot receive payments yet, the user enters the account number. Accounts that are already payable skip this step. Accounts that still cannot receive payments after verification are removed from the allocation step.
4
Amount allocation
Opal prefills an amount for each account, starting with the highest balances, and shows how much of the loan remains to allocate. The user can edit or remove any amount, then confirms.
5
Release
Confirming does not move money. The session waits in
pending_release until your backend calls Release Payments. Method then creates one payment per allocated account.Before you start
- Enable the mode. Balance Transfer must be enabled for your team. Until it is, token creation with
mode: "balance_transfer"fails withINVALID_MODE. Contact your CSM to enable access to this mode. - Choose a source account. Payments are funded from a source account that your team can send payments from. Pass it when you release payments, or ask your CSM to configure a default source account for your team.
- Confirm the payment description. Released payments use a description configured for your team. Contact your CSM to set or change it.
Parameters
All monetary values are in cents.Allocation rules
Method validates every amount the user enters. Each allocation must be:- At least
minimum_payment. - No more than the smallest of
maximum_payment, the account’s current balance, and the portion ofloan_amountnot yet allocated to other accounts.
- At least one account has an allocation.
- The total allocated does not exceed
loan_amount. - If
residual_amount_maxis set, the unallocated amount (loan_amountminus the total allocated) does not exceedresidual_amount_max. - Every allocated account can still receive a payment.
Choose
residual_amount_max based on how you plan to disburse leftover funds. Use 0 if the full loan must go to the user’s liability accounts. Omit it if you disburse any remainder to the borrower another way, such as a deposit to their bank account.Create a token
You can create a balance transfer token using one of the supported patterns:- Existing entity: provide
entity_id+mode+balance_transfer - Create new entity: provide
entity+mode+balance_transfer - Resume session: provide
session_idonly (omitmodeandbalance_transfer)
Existing Entity
Create New Entity
Response
session_id. You need it to check the session status and release payments.
Launch Opal
- React (Web)
- React Native
Events
In addition to the default session events and the identity, connect, and account verification events, this mode emits the following events. Match them onevent.type.
opal.session.exited.
For the full list of events, see Opal Events.
Check the session status
Retrieve the session with your secret API key to read the confirmed allocations and payout status.bt object on the session tracks the balance transfer:
See Retrieve Session for the full response.
Release payments
When your team is ready to fund the transfer, for example after the loan proceeds are available in your source account, release the payments.- Validation happens first. Method re-checks the allocations, the source account, and every destination account before any money moves. If a check fails, the request returns an error, the session stays in
pending_release, and you can retry after resolving the issue. - Releasing is idempotent. Calling release again on a
releasedsession returns the session unchanged and creates no new payments. - Each payment is independent. If Method cannot create the payment for one account, that account’s entry in
payment_idsisnulland the other payments still go out. A released session cannot be released again, so handle anynullentry separately, for example by creating a payment with the Payments API or by contacting your CSM.
payment.create and payment.update webhooks.
See Release Payments for the full request and response.
Resuming a session
If the user exits before confirming, create a new token with thesession_id to resume. Opal keeps the user’s progress through identity verification, account selection, and account verification. Amounts are saved only when the user confirms, so Opal prefills them again when the user returns to the allocation step.
Errors
Errors use theINVALID_REQUEST type with one of the following sub types.
An invalid source account returns the same errors as Create a Payment.