Account Provisioning (In a multi-account setup)
This flow is applicable if you are using the "One SharedSavings account per Savings Dream" account setup, or have Performance Dreams enabled. This means that there might be more than one account per End User to support their Dreams, which requires one additional API call in the account provisioning flow to connect the right Dream with the right account. See Account Setups for more information and options.
sequenceDiagram
participant bfe as Bank App
participant sdk as Impact Finance SDK + Web App Frontend
participant des as DES Backend
participant bbe as Bank Backend
bfe ->> sdk: SDK.launch
note over sdk,des: User enters Impact Finance UX<br/>and can explore freely<br/>until an account is needed.
sdk ->>+ des: Create Dream
des -->>- sdk: Dream Created
note over sdk,des: Hand over to Bank App to<br/>provision an account for this Dream
sdk ->>+ bfe: callback: Account Provisioning Requested (Dream meta data)
note over bfe: Take over screen and take <br /> user through account provisioning
bfe -->>+ bbe: Initiate (async) account provisioning
bfe -->> sdk: return from callback (complete future)
deactivate bfe
note over sdk,des: Continue using Dream,<br/>launch savehacks etc.
note over bbe: Account Provisioning Complete
bbe ->>+ des: POST /accounts
note over des,bbe: Tell DES the account is ready<br/>{type: SharedSavings | Performance}
des -->>- bbe: 201: Created
bbe ->>+ des: PATCH /dreams
note over des,bbe: Connect Dream with account<br/>{accountId: <accountId>}
des -->>- bbe: 200: OK
deactivate bbe
note over bbe: Start acting on transactions