We recommend reviewing the WebView integraiton guide before starting this guide. It provides helpful context on how the Connect flow works and what to expect during integration.
1
Start the Connect Session
- Present a “Connect My Tariff” button (or similar UI control).
- Call the create-connect-token endpoint to generate a temporary
connect_token
. - Use the token to launch the session via the session_restore endpoint.
2
Implement Connect pages
After calling session_restore, Connect replies with a JSON-based sequence of Page Objects, beginning with Postal Address. Each object represents a step in the flow and has its own reference page.Your app must:
- Render the UI as required by the current Page Object,
- Capture user input,
- Send it back to the Connect API,
- Receive the next Page Object in sequence.
3
Handle Completion
Once the flow completes:
- You receive a session_complete page.
- The customer is redirected to the
callback_uri
set in create-connect-token step. Use this to notify your backend. - Call the exchange-connect-token endpoint to exchange the
connect_token
for a permanentlocation_id
, and store it with the customer’s address record in your backend.
4
Subscribe to Lifecycle Webhooks
Flatpeak keeps tariff data up to date post-connection. If customer action is needed (e.g. expired password), Flatpeak will generate an events and send it to you via webhook. Subscribe to them to inform users and guide them to re-connect when necessary.
5
Allow Configuration Changes
To let your customers review or update their tariffs post-connection, refer to the Tariff Settings Page guide to provide UI controls for customers to view, reconnect, or adjust their tariff flows—including commodity, export, or grid-fee options.
Next steps
After connecting the tariff, you can access:- Energy scheduling endpoints,
- Energy cost reporting endpoints.
Summary workflow
Step | Action |
---|---|
1 | UI triggers Connect flow using create-connect-token and session_restore |
2 | App loops through Page Objects: render, collect input, send response |
3 | On session_complete , exchange token for location_id |
4 | Subscribe to lifecycle webhooks (tariff.expiring , tariff.expired , tariff.fetch.failed ) |
5 | Offer tariff settings UI for reconnecting or adjusting flows |
6 | Use scheduling, cost reporting, or raw rate endpoints as needed |