#jacoboxvi_webhooks

1 messages · Page 1 of 1 (latest)

grand quartzBOT
#

👋 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/1382029623977574461

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

elder marsh
#

This is the full message I first wrote:

Hey!!
We’re encountering an issue with our Stripe integration and wanted to get your advice on the best approach to resolve it. Here’s the context:

  1. We have a custom checkout that supports both zero-dollar transactions and transactions greater than zero.
  2. For zero-dollar transactions, we rely on the customer.subscription.updated webhook (specifically, when the subscription status changes from incomplete to active) to create the corresponding member subscription record in our system.
  3. For all invoices (including the first invoice), we also use the invoice.payment_succeeded webhook to handle additional business logic. This logic depends on the subscription record already existing (i.e., customer.subscription.updated having been processed first).
    Initially, this worked because customer.subscription.updated always arrived before invoice.payment_succeeded. However, recently (for the past few days), we are seeing that the order of these events has become inconsistent. As a result, invoice.payment_succeeded sometimes fails on the first attempt (due to the missing subscription record) but succeeds on retry.
    While the retry mechanism will succeed, the failed attempts trigger unnecessary error alerts in our system. We’d like to ask:
    Is our current approach (depending on customer.subscription.updated arriving first) the recommended way to handle this?
    Are there any best practices on handling zero dollar checkouts like we do?
    Thank you!
tardy birch
elder marsh
#

Perfect! Thanks @tardy birch