How tariffs make up the energy price
Depending on their location, customers may have contracts with multiple energy providers simultaneously.- For example, they may buy electricity from “Provider A” while selling surplus generation to “Provider B”.
- They may also have a separate agreement with a grid operator for energy delivery.
- Additionally, customers may lease a PV system and pay per kWh of solar energy generated.
Tariff categories, contexts, and energy flow directions
- Flatpeak distinguishes between two energy tariff types:
| Tariff Type | Description |
|---|---|
COMMODITY | The price of electricity itself. Think of it as “the price of electrons.” |
NON_COMMODITY | Grid operator charges for delivering electricity. Think of it as “the price of delivering and governing electrons.” |
- Flatpeak links and stores tariffs in the following three contexts:
| Tariff Context | Description |
|---|---|
IMPORT | Price of electricity sent from the energy grid into the property |
EXPORT | Price of electricity sent from the property to the energy grid |
LOCAL | Price of electricity generated locally (i.e. with a PV system) |
- Finally, tariffs can be applied to two directions of energy flow:
| Energy Flow Direction | Description |
|---|---|
INBOUND | Electricity transmitted to property or device |
OUTBOUND | Electricity transmitted from property or device |
Implementation
Before customer runs Connect for the first time
Set default options
Show a default set of options covering possible tariff type and direction combinations.Typical configurations by use case:
| EV charger or HVAC | COMMODITY+IMPORT |
| Energy storage system | COMMODITY+IMPORT, COMMODITY+EXPORT |
| Solar (PV) system | COMMODITY+IMPORT, COMMODITY+EXPORT, COMMODITY+LOCAL |
Once the customer connects a
COMMODITY+IMPORT tariff, Flatpeak may also provide the option to connect a NON_COMMODITY+IMPORT tariff (explained later in this guide).Launch Connect
To launch Connect for a specific combination of tariff type and direction, specify it when calling the create-connect-token endpoint.
- Preview
- Code

After at least one tariff is connected
Show tariff connections
To allow customers to view, update, or disconnect their tariff, your app must first display their current tariff connections. To do this, call the retrieve-location-status endpoint.Use the response to populate the configuration of your Tariff Connection Page in your app:
- Preview
- Code

Edit tariff
When a customer wants to edit their tariff connection, call the create-connect-token endpoint, specifying the Flatpeak Location ID, tariff type, and direction. Then call the start-a-connect-session endpoint.
- If the tariff is already connected, Connect will return the Tariff Summary page.
- If it is not connected, Connect will run the normal flow, prompting the customer to select their provider and complete the setup.
Request example
Delete tariff
To disconnect a tariff for a specific type and direction, call the create-connect-token endpoint, specifying the Location ID, tariff type, and direction, and set
actions.disconnect_tariff = true.This will automatically remove the tariff connection — no Connect session is required.Add grid fees
Once a customer connects their 
COMMODITY+IMPORT tariff, Flatpeak automatically determines whether grid fees are included in their import contract. If they are not, Flatpeak checks the customer’s address against its grid fees database.If a grid fee should be added, the response from the retrieve-location-status endpoint will include a non_commodity_import section.When this occurs, present the customer with an option to connect Grid Fees:- Preview
- Code

Summary
Depending on your use case, you may choose to implement one or more of the following options:COMMODITY+IMPORT | Most common case: price of electricity supplied from the grid into the property. |
COMMODITY+EXPORT | When energy can be sent from the property back to the grid. |
LOCAL+IMPORT | When you need to set a tariff that applies to local energy generation, e.g. PV. |
NON_COMMODITY+IMPORT | When grid fees are billed separately. (Coming in Q1 2026). |

