If you have chosen to use the usage-events add-on, then you can benefit from Apiable automatically billing developer usage at the end of the month.
Set the API Matching Criteria
Navigate to the product and plan where you want to start collecting usage events.
Select the Monetization tab.
Usage Based Pricing is available on the following revenue models:
API Usage with Graduated Pricing
API Usage with Volume Pricing
Apiable allows you to have multiple prices for each plan and to charge your customers accordingly.
For the given price, under Set the API Matching Criteria click on + Add additional criteria.
There are two fields to set the matching criteria.
Set criteria for API
Specify from All APIs - every API in this plan or choose individual APIs attached to this plan.
Criteria
Multiple matching criteria may be added:
Response code parses the response of the API and matches against the chosen codes. Individual codes e.g. 201 or a range 2xx may be selected.
The method may be used to set
GET
,PUT
,POST
,DELETE
,PATCH
,OPTIONS
,HEAD
.
The given where clause will be the one used to query the usage events database and is for your reference only.
Reporting to Stripe
Apiable will immediately start reporting incremental API usage of consumers subscribed to this plan. At the end of the billing period, Stripe will bill the subscriber accordingly.
Usage Events is an Add-on to your current subscription. To activate please navigate to Settings > Billing & Subscriptions and activate the usage-events add-on or speak to sales.