#altairsama2_api

1 messages ¡ Page 1 of 1 (latest)

tame flowerBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1286284989201383566

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

azure hatch
#

Also, is there a way we can combine subscription and meter apis? our usecase is, we want a running tiered subscription and only prompt the user for topup if their tokens run below a particular amount. The second case is handled via meter from what I saw on the docs

radiant laurel
#

or you can check the invoice

azure hatch
#

so after invoice.created there's no indication from stripe's side regarding usagE?

#

also what about the second case? we would ideally want to generate a subscription on our end and send it to stripe and only allow automatic wallet topups if the client opts in for that

#

will meter supoprt this or should we stick with Stripe invoice?

#

where we generate adhoc invoices on the fly based on usage and send to stripe?

#

and stripe will auto deduct payments as per that invoice and let us know?

radiant laurel
azure hatch
radiant laurel
#

also what about the second case? we would ideally want to generate a subscription on our end and send it to stripe and only allow automatic wallet topups if the client opts in for that
why you want to manage Subscriptions on your side ?

azure hatch
#

no, Stripe will manage that for us, this is for new client onboarding

azure hatch
#

we would ask them if they want to opt in for auto topups

#

and only then allow it on stripe

#

I havent found anything in the docs for this usevase

#

and in the api too

#

only way I can figure this is via manually calling stripe like stripe.Invoice.create(customer="cus_")

azure hatch
radiant laurel
azure hatch
#

and lets say, you opted for Tier A plan which gives 1mil credits for 1000$

#

but after some usage, you only have a 1000 credits left

#

stripe in this case will detect that and create an invoice and charge the customer for a topup

#

meanwhile the subscription will continue as usual

#

so 1000$/monthly for 1 mil credits

#

and some topup amount if credits in a month runs low

azure hatch
tawdry quarry
azure hatch
#

I was checking out meter for our usecase

tawdry quarry
#

so your question is if we can do that automatically instead?

azure hatch
#

yeah

#

basically billing/tracking everything by stripe and we pay for it

tawdry quarry
azure hatch
#

afaik subscription is another set of APIs

#

and in this case, we will need to trigger it ourselves

tawdry quarry
#

A meter is how you report usage of an item on a subscription, I don't think of them as separate.

azure hatch
#

I think this suits our purpose perfectly but its in beta right now

#

would you recommend trying beta on prod?

tawdry quarry
#

yes, most of this is in beta and various states of being built as we try to solve for more advanced use cases than the existing usage APIs used to, it will be that way for a while

#

we'd say it's fine to use beta products, as long as you have the ability to change your integration when we move things from beta to GA as there can be changes/tweaks at that point, as opposed to "build once and never touch again".

azure hatch
#

ah, but chances of it breaking is nil right? only thing we have to make sure is to adap for any feature changes

tawdry quarry
#

depends what you mean by 'breaking'? No chance is ever nil.

azure hatch
azure hatch
tawdry quarry
#

yes, seems like it would be useful for what you describe if you don't want to count the usage on your side for that alerting.

azure hatch
tawdry quarry
# azure hatch ah yeah, by breaking I meant, unexpected outages, incorrect reports etc

I mean that's possible, and that's possible in GA APIs too really. It would really depend on the specific beta feature, they're all different and you generally work closely with the product teams involved. Sorry, my team doesn't work much with this, we only commit to doing developer support for GA features for the most part, if you have sales contacts or are deeply involved with the product teams they generally work with betas.

azure hatch