Once a customer connects their tariff, you can use Connect to display their tariff on demand within your app. This article also explains how to enable the customer to update or remove the tariff connection.

1

Create Connect token

Set location_id to customer’s location when creating the connect-token:

curl --request POST \
--url https://api.flatpeak.com/connect/tariff/token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"location_id": "loc_641b90b758fb8e6293716e40",
"callback_uri": "<your webhooks receiver endpoint>",
"connect_web_uri": "<URL where Connect web is running>"
}'
2

Display tariff status summary

Start connect session using the token you just created. Connect will return a relevant page, depending on the status if the tariff connection. This may be:

Your customer can navigate through these pages and select from a list of available actions presented on each page.