View Quickstart
New to Flatpeak? Start with the Quickstart guide before continuing.
- Clone our reference implementation and embed it into your app via WebView.
- Build the necessary pages in your app using preferred framework and the Flatpeak API (recommended).
- WebView integration
- API integration
Use this guide to integrate Flatpeak’s Connect into your app by embedding it via WebView.
You will need to host the web app on your servers for production.For now, you can simply run it on your computer.Ensure this is set correctly for your environment. Adjust for Windows-based shells if needed.A local preview will be available at http://localhost:7070.
You will see an error. This is because you have not provided a Connect token. Ignore the error for now and continue following this guide.
This will keep the interface clean and ensure all elements remain visible.

1
Clone Connect web app
2
Configure environment variables
3
Test run the Connect app

4
Subscribe to Connect session events
Your system needs to be notified when a customer completes the Connect flow so it can start retrieving their electricity prices and using other energy intelligence endpoints.
Subscribe to

connect.session.complete events via a webhook:- Open Flatpeak Dashboard
- Select Webhooks in the main menu
- In Endpoint URL, enter the address where you want to receive webhook events
- Click Events and select
connect.session.complete - Set the selector to Live data or Test data, depending on API key you are using
- Click Create to start sending events to your webhook destination
5
Create a Connect token
Single-use Connect tokens enable secure access to Connect API endpoints while keeping API keys away from the frontend.
- First, authenticate to the API by calling authentication endpoint.
- Next, call the create-connect-token endpoint to create a
connect_token.
6
Launch the Connect app
In your browser, open: 
In production, customers will launch Connect directly from your app. Your backend should create Connect tokens on demand and pass them to the app.
http://localhost:7070?fp_cot=cot_***, replacing cot_*** with the connect_token:
7
Customer will interact with Connect flow
Connect guides customers through a short flow to share their tariff. It automatically chooses the best method based on provider APIs, data-sharing rules, and usage patterns across Flatpeak.

Learn more about Connect flow architecture, markets and provider integrations coverage.
8
Handle session completion
- When the customer successfully completes a session with Connect, you will receive a webhook to the destination you specified earlier:
Example webhook payload
- The
location_idis a permanent identifier for your customer’s address. Store it in your database as a reference to the customer’s address. You will use it to fetch electricity prices and access other energy intelligence endpoints. You can also re-request this ID by calling retrieve-connect-token endpoint.
9
Provide an option for customers to change tariff connection
To enable customers to modify or remove their tariff connection, see the Tariff Settings Page guide. It explains how to build UI controls that let them view, reconnect, disconnect, or adjust their tariff — including connecting an export tariff.
In short, you’ll need to implement passing the
location_id when creating Connect tokens. This will launch Connect in the context of the existing tariff connection for that location.Tip for embedding
When embedding Connect in your app, launch it in a modal or bottom sheet (iOS/Android) to prevent layout issues—especially on devices with notches or cutouts.
Next steps
Your systems can now access:- Energy prices endpoint
- Energy scheduling endpoints
- Energy cost reporting endpoints

