Add the Event Listener to your Integration
To add the Event Listener to your GEFT widget integration, place the following script on the same page as your GEFT widget:html
React Native WebView
When the GEFT widget is loaded as the top-level page of a React Native WebView, addwebview=true to the URL:
window.ReactNativeWebView.postMessage instead of window.postMessage, so handle them in the WebView’s onMessage handler rather than a message listener. Each event arrives as a JSON string. The events and their order are unchanged from the web.
window.ReactNativeWebView is injected into the main frame only, so the widget must be the WebView’s top-level page and not nested in an iframe.Reviewing your Event Listener data
You’ll receive the following types of event data from the GEFT widget:- A JavaScript event, which indicates a user event during the payment flow
- Widget state changes, which indicate progress through the guarantee process
Getting started & Consent
Institution Selection
Credential
Aggregation Errors
These problems reach you in two different shapes. Two are step events - the payment flow reporting the customer’s progress through their sign-in attempts:RETRY_COUNT (which attempt they’re on, sent earlier during sign-in) and MAXIMUM_RETRY_REACHED (they’ve used them all up). Both arrive on the event’s step field. Everything else here is a flinksCode, a standardized reason code, shared across Flinks, for why the bank turned the sign-in away, delivered on the flinksCode field instead. In short: read step for the two progress signals, and flinksCode for every other problem in this list.
MFA
Account Selector
Deposit
Next Best Offer (NBO)
Guarantee & Review
Errors
Event Examples
Flow Events
APP_INITIATEDGuarantee Events
GUARANTEE_OFFEREDTerminal Events
SUCCESS (Terminating)Implementation Examples
Basic Event Handling
Error Handling and Timeouts
Event Flow Examples
Successful Payment Flow
APP_INITIATED- Payment flow initiatedINSTITUTION_SELECTED- User selects their bankSUBMIT_CREDENTIAL- User enters bank credentialsSUBMIT_MFA- User completes multi-factor authentication (if required)ACCOUNT_SELECTED- User selects the account for paymentCOMPONENT_DEPOSIT_CONTINUE- User confirms payment amountGUARANTEE_OFFERED- Flinks approves the guaranteeCOMPONENT_PAD_DOWNLOADED- User signs PAD agreementSUCCESS- Payment completed successfully
Guarantee Declined Flow
APP_INITIATED- Payment flow initiatedINSTITUTION_SELECTED- User selects their bankSUBMIT_CREDENTIAL- User enters bank credentialsACCOUNT_SELECTED- User selects accountCOMPONENT_DEPOSIT_CONTINUE- User confirms amountPAYMENT_FAILED- Flinks cannot guarantee the paymentCOMPONENT_OTHER_FUNDING_OPTIONS_SELECTED- User chooses alternative methods
Testing Event Handling
During development, test event handling with all scenarios in the sandbox environment. Use the test cases provided in the Sandbox Guide to verify proper event handling for both successful and failed flows. Test the following scenarios:- Happy path: Complete successful payment flow
- Guarantee failure: Handle declined guarantees gracefully
- User abandonment: Handle when users close the widget
- Network issues: Handle timeouts and connectivity problems
- PAD decline: Handle when users don’t accept the agreement
Related Documentation
- GEFT Widget: Widget configuration and setup
- Setup Guide: Complete implementation walkthrough
- Sandbox Guide: Testing procedures and test data