Account Linkage allows you to associate (or link) any pair of accounts so that automatic movements are triggered when a credit is posted.Understanding primary and secondary accounts#
A primary account is any account, Cobre Balance, or counterparty where the funds will automatically be redirected to. This account will receive automatic funds from a secondary account. You will need to declare it when creating a Cobre BalanceA primary account can have multiple secondary accounts
A secondary account is the Cobre Balance that is configured to automatically move funds to a primary accountA secondary account can only be associated with one primary account
Valid combinations#
The following combinations are allowed when linking an account| Secondary account | Secondary allowed type | Secondary allowed provider | Primary account | Primary allowed type | Primary allowed provider | MM Flow | MM type generated |
|---|
| account_id | cobre_balance | pr_col_cobre | counterparty_id or account_id | checking (cc), saving (ch), electronic deposit (dp), or Cobre Balance | Any | PUSH | ACH, fast_pay or Bre-B |
Cobre Balance counterparties are not allowed as primary accounts
Money Movement Flow for Linkage Accounts#
After linking a primary account to a secondary account, the following funds flow will occur:1.
Transaction Reception: A transaction is received on the secondary account, which will be reflected as a credit transaction.
2.
Money Movement Processing: The secondary account will initiate a Money Movement to the primary account. This money movement will include the transaction_id of the initial credit transaction. If succesful, the following transactions will be posted:2.1. A transaction debit will be posted in the secondary account.
2.2. A transaction credit will be posted in the primary account.
Keep in mind: If the automatic money movement to the primary account fails, the funds will remain in the secondary account and must be managed manually by the client
Allowed Actions on Account Linkage#
🔗 Configure linked accounts
✍️ Assign or change primary accounts
⛓️💥 Unlink primary account
Description: When creating a Cobre Balance account and a primary account is set in the matadata section, the link with the primary account is automatically generated.
What to expect after the action: Funds received in the Cobre Balance account will be redirected to the primary account associated during the Cobre Balance creation.
How to Get Started#
To create linked accounts, you must associate a primary account to a secondary account. This can be done by declaring it within the metadata upon account creationBefore using this API#
1
Select a primary account with a valid provider
This is the Cobre Balance or Counterparty that will automatically receive the funds credited to the Cobre Balance linking it.
2
Configure, change, or unlink a primary account for the first time
Create a new Cobre Balance whose primary account is the Cobre Balance or Counterparty designated for such purpose.
3
Subscribe to transaction notifications
Subscribe to the required events to receive notifications about transaction credits or money movement status, such as accounts.balance.credit or money_movements.status.completed
What to expect after using this API#
1
Transaction Reception
When transaction is received on the secondary account (e.g., PSE payment in Colombia or a SPEI transfer in Mexico), it will be reflected as a credit transaction (i.e., col_credit in Colombia, spei_credit in Mexico)
2
Money Movement Processing
After the transaction reception, the secondary account will initiate a
Money Movement to the primary account. This money movement will include the
transaction_id of the initial credit transaction (i.e., external_id = transaction_id).
2.1 Debit Transaction Posting
A debit transaction will be posted in the secondary account once the money movement is processed. (i.e., col_cb_debit in Colombia Cobre Balances, spei_debit in Mexico Cobre Balances)
2.2 Credit Transaction Posting
A credit transaction will be posted in the primary account reflecting the transfer of funds. (i.e., col_cb_credit in Colombia Cobre Balances, spei_credit in Mexico Cobre Balances)
Keep in mind that if the action to be performed is unlink, steps 2, 2.1, and 2.2 will not longer be executed, and the funds will remain in the secondary account.