Fixed, liquid, and everything in between.
Price
objects are the core of the Sulu monetization experience.
They are dynamic objects which set the price of each request that passes through
the Sulu infrastructure. In this page, you will learn everything about how to
create, manage, and use prices to earn from your APIs.
price
, even if that price is 0 (what we usually call free ๐).
Prices are associated to each request on a per call, per endpoint basis.
All the requests made to an endpoint share the same price
object, but this
does not mean that each requestโs price is the same.
This is because prices can be dynamic. For example, in Volume Variable Pricing,
the price of a request is affected by how many requests have been done previously within
a specified time period, ie. the previous volume of usage.
GET sample/endpoint
means that every request made
to GET sample/endpoint
has a price of $0.0001 .
X-Suluhub-DynamicPrice
header which contains the price for that request in usd.
The response should only be a number with the dollar amount for that request, for example 0.00123
.
We only support a precision of 9 decimal digits anything after will be ignored a value of 0.0123456789
will be charged as 0.012345678
You will have to define an lower and upper bound for your pricing so users of your API know what the request might cost.
If the header is not set in the response or contains an invalid value the minimum price is used instead.
price function
.
In this case, price is a function of request volume.
price
entry.
price
.