#paolo_api

1 messages ยท Page 1 of 1 (latest)

raven streamBOT
#

๐Ÿ‘‹ 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/1336691712369885214

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

tranquil crest
#

๐Ÿ‘‹
You should call /v1/billing/meter_events endpoint instead

worthy torrent
worthy torrent
#

You should call /v1/billing/meter_events endpoint instead
yes, I know - but that doesn't seem to increment.

#

Here's my POST in postman:

#

It shows up in the meters dashboard:

#

Oh wait, now it showed up as incremented in the subscription. Is there a delay on Stripe's end or is this done via a job in the background? I swear I didn't see it before

tranquil crest
#

No worries, yes it take some time to propagate.

worthy torrent
#

Ok thanks!

Another related question:

tranquil crest
#

Yes sure, happy to help, what it is ?

worthy torrent
tranquil crest
#

Mm not realy but they could be used for the same reason (to enforce uniqueness).

#

You can still use both.

#

idempotency-key is a header for all Stripe requests.

worthy torrent
#

Ok, we will stick with using idempotency-key then, thanks!

raven streamBOT
tranquil crest
#

Welcome!

gleaming mica
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needs to step away soon. The idempotency key is used to allow you to safely remake a request, without risking duplicate action, if you do not receive a response and are unsure of the outcome of your previous request. I don't think it's comparable to the identifier parameter.
https://docs.stripe.com/api/idempotent_requests

worthy torrent
#

Got it - thanks!

#

Last question:

#

For usage-based subscriptions, do you recommend we set up a different meter for every customer or can we reuse a single meter across all usage-based subscription prices?

gleaming mica
worthy torrent
#

Yeah - was just short cutting it.

So say I have multiple customers:

  • customer A, subscription 1 with price X, price X has meter Y
  • customer B, subscription 2 with price X, price X has meter Y

when posting a billing event POST https://api.stripe.com/v1/billing/meter_events , and I specify payload[stripe_customer_id]=cus_A, only the usage on the invoice for cus_A will be incremented and NOT cus_B, right?

gleaming mica
#

Yup

worthy torrent
#

Thank you!

Really appreciate the quick help here! โค๏ธ