Building tariff settings page in your app
In this tutorial, you will learn how to build a page in your app to enable your customers to quickly add, check status and manage tariff connections.
Depending on the structure of their energy market and their choices, customers may be on multiple tariffs simultaneously. For instance, they might buy electricity from Company A while paying Company B for transmitting that electricity to their home.
Tariff direction and type
To enable any business case, FlatPeak supports four combinations of tariff type and energy transfer direction:
COMMODITY
type represents contract to purchase “electrons”. NON_COMMODITY
type represents the contract to pay for the transfer of those electrons from the power station to the customer’s home.Type/Direction | Description |
---|---|
COMMODITY +IMPORT | The price of the actual imported electricity. It’s essential to always allow your customers to add their commodity import tariff, as this is the most fundamental fee across all markets and regions. |
NON_COMMODITY +IMPORT | The cost of transporting electricity, known as network or grid fees, may be charged separately in many markets. FlatPeak recommends allowing customers to add this tariff, as it affects their total energy cost. |
COMMODITY +EXPORT | The price of exported electricity. If your solution includes energy storage or generation, you should offer this option. FlatPeak separates import and export tariffs, as customers may use different providers. |
NON_COMMODITY +EXPORT | The price of transporting electricity from the customer to the grid. FlatPeak disabled this feature as there are no known cases of export transmission fees. |
Setting tariff direction and type in Connect
When you create a connect token, you provide tariff direction and tariff type you want this Connect session to work with:
Default tariff settings page
You will need to choose what combination(s) or tariff types and directions you want to enable your customers to add. Your desision can be based on type of your service and/or device(s) you have and where your customers are located.
The simplest option is to let your customers set only the COMMODITY
+IMPORT
combination. You can also let your customers set other combinations. See examples in the tabs below:
On click, start the Connect flow for COMMODITY
+IMPORT
flow.
Custom tariff settings page
Once the customer has completed a Connect flow, you will have a FlatPeak location_id
stored in your systems. When you need to render the tariff settings page in your app, request the location object from the FlatPeak API. The response will include the tariff_status object, which enables you to build an informative page in your app.
Statuses explained:
Status | Description |
---|---|
NOT_CONNECTED | Tariff is not connected/added. |
CONNECTED | Tariff is connected/added and its status is healthy. |
ERROR | There is an issue with the tariff that requires an intervention. For example, if FlatPeak cannot fetch tariff from your customer’s account with their provider or if it has expired. |
NOT_SUPPORTED | Tariff type/direction pair is unsupported and can not be connected. For example, when non_commodity rates do not apply to a location (i.e., supply address), |
Using these statuses, we recommend that you build the following display options:
Was this page helpful?