Customer endpoint

The customer endpoint is best used for providing your customers with real-time billing information about their account. An example is to providing a view for the outstanding customer owed balance or a list of all past payments.

code for endpoints

Event endpoint

The event endpoint lets you display all billable usage events in your app.

code for events. add a screen shot of a billing events table below?

Create event

Updating event

COGS

Fermata can also be used to track COGS (cost of goods sold) to help you profile your underlying costs in real-time. This is useful for teams to understand their customer behavior prior to implementing usage-based billing, or for engineering teams to target SaaS cost optimizations.

This can be done in two ways: a COGS field that gets passed along with an event.

Another way this can be done is to submit a separate event that is COGS only (no idea if we can do this - we’d probably need a way to associate this to an event?).

Sending event

Deleting event

Plans endpoint

Create plan

Flag endpoint

Flags help you gate which features customers have access to. There are three types of flags available in the Flag endpoint.

  1. Binary flags. These are features which are either on or off depending on which plan the customer is on.
  2. [Metered?] flags. These are features which are gated based on some fixed amount. e.g. A user has access to 5GB uploads so all uploads 5GB and below will be permitted.
  3. Metered product flags. (is this true? where do users query whether a balance is out?) These are the product features associated with billable events. Fermata monitors these balances in real-time and toggles the Metered product flag on or off based on whether the user has any remaining balance.

Transactions endpoint

Fermata maintains a complete record of all past payments on an account. This is useful for display past account activity to your user.

code for pulling all the transactions

Payment endpoint

//oh wait is payment different than transactions?