Request: Can we get an example of how to use the new usage billing feature #5530
Unanswered
wanjohiryan
asked this question in
Q&A
Replies: 1 comment
-
We'll probably need to improve the docs but in a nutshell: Your application sends Events to our API. Typically, an event reflects some usage done by a customer in your app. For example:
You are free to use any name you want and add any metadata to the event as you see fit. If I take the upload example, it could be: {
"name": "file_uploaded"
"external_customer_id": "USER_ID"
"metadata": {"bytes": 1024}
} On Polar's side, you can then configure Meters. Those meters are responsible for:
With the same example, other aggregations would do this:
Of course, depending on the use-case, some aggregations may not really make sense (like here with Min and Max). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there 👋🏾
Maybe am too early to be trying to implement this 😅, but I really need it as am shipping a more comprehensive billing to our project
I have been looking at the docs and am more confused about everything:
A simple solution would be to build a simple example using this...
Thank you in advance :D
Beta Was this translation helpful? Give feedback.
All reactions