Tariff switch
General Overview​
These features allow users to view available tariffs for a supply point and switch to a selected one.
Currently, this is specific to the British market (Kraken GB) API.
Market specifics​
GB 🇬🇧​
This is a two-page journey:
- Products Page – where the customer can view a high-level overview of offered tariffs.
- Review Page – which displays a detailed breakdown of the selected tariff, including T&Cs and a CTA to perform the tariff switch.
The Products Page uses the supply point information to generate a quote. It does this via two sequential API operations:
-
availableProductsForMeterPointquery:
Fetches all available products for a given account and its supply points. Foundation excludes restricted products by default.The query uses the account number, date, and MPAN/MPRN values.
-
quoteAccountOnProductsmutation:
Uses the products returned by the query to create a quote for the account. Foundation requires the quote date and the relevant electricity or gas meter-point details.
Users can click on different available tariffs to view a more detailed breakdown in the QuoteBreakdown component:
<QuoteBreakdown />
The Review Page shows a detailed view of the selected tariff and allows the actual switch:
-
quoteRequest:
Fetches quote details using thequoteCodefield (from the previous page). -
switchMeterPointProducts:
Executes the switch using theMeterPointSwitchContext, which includesquotedProductIdandmpxn.
This pages uses the following components:
-
<TariffInformation />:
Displays an accordion with key-value pairs of tariff details. -
<TermsAndConditions />:
Displays a scrollable card with formatted terms and conditions.