Skip to main content
When a customer uses Connect, we start with the fastest, most accurate method. If it fails—say they skip login—we instantly fall back to the next best option. No dead ends. No manual steps unless absolutely necessary. Connect prioritises tariff connection methods in this order:
  1. DIRECT – Instant, authenticated connection
  2. LIBRARY – Selection for Flatpeak-maintained library
  3. MARKET – Automatically links market-based tariff by geo-location
  4. MANUAL – Customer input as a last resort
The diagram below shows how sessions flow across these connection types:
  • Simplified flow diagram
  • Detailed flow diagram

Connect flow modules

Flatpeak’s Connect flow is split into two modules:

1. Main module

This handles: This part can be fully customised by either forking our reference implementation or implemented natively in your app by integrating the Connect API.

2. Auth module

The user is redirected to this module when they select a provider that has a direct integration with Flatpeak. Highlighted green in the diagram above provides: This part is not customisable as it is often hosted by the provider (depending on the integration arrangement with Flatpeak). It must be displayed in a WebView.

Provider login page example

Working with URI parameters in Connect token create

When creating a connect token you need to specify connect_web_uri and callback_uri:
  • The connect_web_uri is used mid-session to redirect user from Auth module (WebView) back into the Main module (your app).
  • The callback_uri is used at the very end of the entire flow once the customer completes the tariff summary page and taps “Save”, their browsing session is redirected to callback_uri so you can return it to your app or platform.
Use the following parameter combination when calling create a connect token endpoint:

Option 1. Testing while self-hosting our Web-based reference implementation

{
  "connect_web_uri": "https://connect.yourapp.com",
  "callback_uri": "https://yourapp.com/flatpeak/callback"
}

Option 2. Your native app using Web-based Connect

Still relying on web Connect (e.g. hosted or forked UI), but want the rest of the experience native:
{
  "connect_web_uri": "https://connect.yourapp.com",
  "callback_uri": "yourapp://flatpeak/callback"
}
You’ve implemented Connect UI natively:
{
  "connect_web_uri": "yourapp://tariff/connect",
  "callback_uri": "yourapp://tariff/callback"
}
In this case:
  • DIRECT flow redirects back into the app to connect_web_uri after login.
  • After the customer hits “Save” in your native implementation of tariff summary page, you can optionally use callback_uri for final navigation—or ignore it entirely.
I