Skip to main content

TransferConsents on single account

Transfer consents allow the user to sign the savehack launch before activation.
It also connects to the account provisioning flow where the account operations are expected to be handled in the same experience initiated by the onTransferConsentRequested event. You will not get the accountProvisioningRequested event if transfer consents are used.

When an account is already provisioned

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: User enters Impact Finance UX<br/>and can explore freely<br/>until launching a savehack sdk ->>+ des: Create Dream des -->>- sdk: Dream Created sdk ->>+ des: Launch Savehack des -->>- sdk: Savehack Launched as Draft note over sdk,des: A consent <br />is needed for a succesful launch <br /> for the user. sdk ->>+ bfe: callback: onTransferConsentRequested(temporaryConsentId) note over bfe: Bank controls the experience and<br /> guides the user <br />consenting <br />to the savehack launch through the bank UI. bfe ->>+ bbe: Get transfer consent information activate bbe bbe ->>+ des: GET /transfer-consent/:temporaryConsentId deactivate bbe activate des des -->> bbe: 200: OK deactivate des note over bbe: The temporaryConsentId is valid for 1 GET and has an expiry time. <br />This data should be fetched quickly to avoid expiry. bbe ->> bfe: Display information and collect consent activate bfe bfe ->> bbe: Inform DES Backend about the consent. activate bbe bbe ->>+ des: PATCH /transfer-consent/:id deactivate bbe des -->>- bbe: 200 OK bfe ->> sdk: return from callback: onTransferConsentSucceded deactivate bfe note over sdk,des: Undraft/Start savehack launch<br />and prepare transactions note over sdk,des: Celebration: <br /> Dream with active savehack launches <br/> and pending balances!


When account provisioning is needed

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: User enters Impact Finance UX<br/>and can explore freely<br/>until launching a savehack sdk ->>+ des: Create Dream des -->>- sdk: Dream Created sdk ->>+ des: Launch Savehack des -->>- sdk: Savehack Launched as Draft note over sdk,des: A consent and a provisioned account <br />is needed for a succesful launch <br /> for the user. sdk ->>+ bfe: callback: onTransferConsentRequested(temporaryConsentId) note over bfe: Bank controls the experience and<br /> guides the user through <br />setting up an account if not previously done and consenting <br />to the savehack launch through the bank UI. bfe ->>+ bbe: Get transfer consent information activate bbe bbe ->>+ des: GET /transfer-consent/:temporaryConsentId deactivate bbe activate des des -->> bbe: 200: OK deactivate des note over bbe: The temporaryConsentId is valid for 1 GET and has an expiry time. <br />This data should be fetched before account operations to avoid expiry. bfe ->>+ bbe: Initiate (async) account provisioning deactivate bfe note over bbe: Account Provisioning Complete bbe ->>+ des: POST /accounts deactivate bbe note over des: Automatically link all existing<br/>Dreams to the new account<br/>Note that the consent will fail unless an account has been provisioned! des -->>- bbe: 201: Created bbe ->> bfe: Display information and collect consent activate bfe bfe ->> bbe: Inform DES Backend about the consent. activate bbe bbe ->>+ des: PATCH /transfer-consent/:id deactivate bbe des -->>- bbe: 200 OK bfe ->> sdk: return from callback: onTransferConsentSucceded deactivate bfe note over sdk,des: Undraft/Start savehack launch<br />and prepare transactions note over sdk,des: Celebration: <br /> Dream with active savehack launches <br/> and pending balances!