#mink4501_api

1 messages ยท Page 1 of 1 (latest)

tame notchBOT
#

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

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

lethal vortexBOT
dusty vine
#

Hi ๐Ÿ‘‹ we never bundle Events from our side. If you bundle them into single DB transactions on your end, that isn't something we'd have insight into.

near oak
#

Hi.

It seems that when an invoice.paid event is fired on a subscription, a subscription.updated event is fired, I was wondering if this happens within the same database transaction.

#

Ultimately, I'll tell you what I need to do.

We need to store the start date and end date of the current cycle of the subscription together once the payment has been made on the subscription.
How do we accomplish this?

dusty vine
#

Sorry, I'm still not grasping the question. You build the logic that handles the Events we send to your endpoint, so you'd be best suited to indicate whether your logic bundles those into a single database transaction.

It sounds like you want to listen for customer.subscription.updated Events and track when current_period_start and current_period_end change values. Then write logic to store those new values on your end.

lethal vortexBOT
near oak
#

I would like to know the subscription current_period_start and current_period_end at that point in time when a payment has been made on the subscription.

However, since Subscription and Invoice are separate from each other, the data may change. Therefore, if I have information like the same Database TransactionId at the time invoice.paid is completed, I would like to be able to look up the subscription information specifically at that time.

dusty vine
#

That is not possible. You can only retrieve the current state of an object from our API, there is no way to retrieve a point-in-time version of the object.

near oak
#

I think it's a design mistake on Stripe's part if they don't support this.

#

Are there any plans to support this?