Usage and Billing Portal

Portal, Widgets, and APIs

6min
amberflo customer usage and billing portal is a feature where an account can extend amberflo's features to its customers customer usage and billing portal has the following applications customer usage and billing portal apis fully hosted amberflo io customer usage and billing portal web application amberflo embeddable ui components for a react js integration see embeddable ui kit react js docid\ w1gheudt e5c1ebzvan3a for a vanilla javascript integration see ui sdk vanilla javascript integration docid\ ija zqfgfvhil daekg6u workflow authenticate the customer user in your app call customer usage and billing portal session api with the customer id and your api key to generate a customer specific session see portal, widgets, and apis docid\ qzfcpcuiksfyqorb03lq use that session token in any of the customer usage and billing portal apps customer usage and billing portal session the api key is used to authenticate an amberflo account when calling apis with the api key, an account can access all customer's data for the customer usage and billing portal, however, we need customer information to limit the scope of the data to that customer in order for a customer to log in to the customer usage and billing portal, a session token is required this token encapsulates both amberflo's account id and customer id the account's app will authenticate the customer in their app, and then call the session api with the customer id in other words, the session api enables single sign on (sso) between the account's app and amberflo's customer usage and billing portal apps the customer id needs to exist in amberflo io session endpoint https //app amberflo io/session https //app amberflo io/session api reference create a session docid 8wrigrkizlweihh9zldvd curl location request post 'https //app amberflo io/session' \\ \ header 'content type application/json' \\ \ header 'x api key idtoken {{api key}}' \\ \ data raw '{ "customerid" "bca5be25 f145 4448 b85c 1236dce1a2ac", "expirationepochmilliseconds" 1644004025153, "returnurl" "https //starkindustries com/" }' api response { "url" "https //portal amberflo io/session/9cd47871391814249841843c2fd82c6483f2c47bbc7f2c1fba6f975f1f9d7599605c4a580f99?returnurl=https%3a%2f%2fstarkindustries com%2f", "sessiontoken" "9cd47871391814249841843c2fd82c6483f2c47bbc7f2c1fba6f975f1f9d7599605c4a580f99" } the response returns the sessiontoken and the url of the landing page of the customer usage and billing portal web app the sessiontoken can be used for calling customer usage and billing portal apis using the session in the x api key header or using the amberflo ui kit the url includes the session token and the returnurl to return to your homepage this link will be rendered in the customer portal web app, so when the user clicks on it they will be returned to your app sessiontoken can now be used to call customer usage and billing portal apis adding a custom business logo if you choose our fully hosted amberflo io customer usage and billing portal web application, you have the ability to add your business logo to do this, first go to amberflo io https //ui amberflo io/settings/business/branding settings > business details and click the + button choose a png, jpg, or svg file that is less than 1mb a preview of what your new customer portal header will look like will appear after uploading your new logo you now have a custom business logo being displayed in your customer portal customer portal customization you can configure which items to show in the customer portal to do this, go to amberflo io https //ui amberflo io/integrations/customer portal integrations > customer portal