Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating Custom Bills | Question #136

Open
karankapoor229 opened this issue Sep 3, 2018 · 2 comments
Open

Generating Custom Bills | Question #136

karankapoor229 opened this issue Sep 3, 2018 · 2 comments
Labels

Comments

@karankapoor229
Copy link

I want to charge users extra per request if the usage is above the bundled usage in Subscription Plan for e.g if the plan has bundled 100 requests to a certain endpoint but the user ends up doing 105, so I want to charge the user for those extra 5 requests at the end of the billing period. I looked up the docs, but couldn't find a solution. Need some suggestions on how to do it?

@smirolo
Copy link
Contributor

smirolo commented Sep 3, 2018

There is a UseCharge model which can associated to a Plan. In your case, you would create a subscription plan for 100 requests and a use charge per extra request. I will have to look through the code again to see if we either came around to add the use charge at the end of the billing period. Please give me a few days to check. Thank you.

@smirolo
Copy link
Contributor

smirolo commented Feb 6, 2019

new_use_charge and record_use_charge are the backbone to implement extra use charges above a quota included in the subscription.

Revenue recognition for UseCharge was implemented in commit 64afb15.

smirolo added a commit that referenced this issue Sep 4, 2019
This commit also documents the various pricing models supported,
including group_buy (#151), usage billing (#136)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants