andersb
3 months ago

Saving API usage for metered billing

Posted 3 months ago by andersb

Do anyone use a good package for saving API usage in Laravel?

We would like to save the API usage for our users and potentially implement a metered billing at some point and are looking for a good solution for saving this.

Imagine for example that we have four endpoints

POST /api/posts
PUT  /api/posts
GET  /api/posts
GET  /api/post/{post}

Then we would like to save when a user requests a post, when they create a post, edit a post and so on.

We could build something for this ourself, but if there is already a package out there that we don't know about then it would be stupid to do so.

Please sign in or create an account to participate in this conversation.