#david2_subscription-paymentmethods
1 messages ยท Page 1 of 1 (latest)
๐ 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/1387460687390965893
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
(continuing cutoff statement from initial post)
I see webhooks_delivered_at is null but I see from stripecli that I returned a 200 to invoice.created. This should be the only webhook listener I have registered for this sandboxed account so not sure what to make of that.
Hi there. I'll be with you shortly. I'm assisting someone in another thread.
From what I can see there are no failed webhooks or errors.
It should have been auto-charged, yes? As its subscription is charge_automatically
I'll have to double check.
Hi, taking over as my teammate needs to step away. Let me catch up.
If you look at the status of the PaymentIntent on that Invoice, https://dashboard.stripe.com/test/events/evt_3RdvKj2eR1Lfh7BG075b0gPD it states that it requires a payment mehotd. Can you add the payment method as the default by updating the customer: https://docs.stripe.com/api/customers/update?api-version=2024-09-30.acacia#update_customer-invoice_settings-default_payment_method and try again? It looks like you attached the payment method to the customer but it does not look like it's the deafault payment method on that customer object.
david2_subscription-paymentmethods
shouldn't it use the default_payment_method from the subscription?
If it's set properly yes
I think there was some confusion here. You seem to use a TestClock for a lot of this. Did you advance the clock far enough to trigger the payment?
that's a source of confusion here,
current simulation time is reported as Current simulation time: July 11, 2025 11:18 AM CDT****
next payment retry is 7/9/25, 11:33 AM
relatedly, on your side does it indicate that invoice.created was positively responded to (by my stripe cli)? I don't see any "success" events on the dashboard/workbench but I saw a 200 outbound to stripe from stripecli.
Sorry I'm a bit lost, you sahred multiple ids and I'm not following. The random one I picked hasn;'t even seen an attempt so I'm not sure where you see the "next attempt" exactly
Can I ask to clarify and focus purely on code/API responses, nothing in the Dashboard? Which exact Invoice id, where was it attempted before (exact Event id that shows a failure and the next attempt)
there is no explicit failure that I am aware of, rather it silently didn't do what I beleive it should have done.
the "invoice.created" event in question is evt_1RdvKh2eR1Lfh7BGwvzIPuCi, according to stripe CLI I responded to this with a 200
invoice.created should be irrelevant if the Invoice was finalized properly
I'm trying to grasp what you are asking/are confused about So I guess where are you seeing the next attempt? If an attempt had already happened there would be an Event for it
I was hoping you could see if there was a response by me to the invoice.created event, because it is important for the reason described here (https://docs.stripe.com/billing/subscriptions/webhooks#understand)
While I saw that I sent a 200 from the StripeCLI during the failed test run, I don't see anything about a successful receipt from the dashboard, but I might be overlooking it.
Is the Invoice finalized? If it is, then the invoice.created Event is not relevant
yes it is finalized
gotcha so the invoice.created part is a red herring
Where do you see the next attempt? I'm confused by this
that is as per the dashboard
Gotcha, that helps. So the Dashboard is saying one thing. Can you retrieve the Invoice in the API? What does https://docs.stripe.com/api/invoices/object#invoice_object-next_payment_attempt show?
(looking)
I feel like something weird happen when the clock was advanced the Invoice wasn't attempted. Can you try from scratch end to end with a brand new Customer and TestClock? I want to see if it's a one-off
It's been about 90% failure rate today, every once in a while one passes ... maybe some kind of race condition somewhere. I will contact the tech support folks via email. I appreciate your time.
(another one if you are curious in_1RdwSg2eR1Lfh7BGleafkQ3o)
Hi there ๐ jumping in as my teammate needs to step away. Can you retrieve the Customer object for that Invoice from our API and share the output?
I don't think I see a default payment method set for them, and want to confirm whether you're seeing the same.
This was the earlier incorrect advice, they explained they set the default PM on the Sub which should work
also there would still be an invoice.payment_failed in the case of a PM missing no?
Ah, good point.
It looks like we just never attempted it. I could be missing something but the fact that they say it happens a lot (90%) worries me that something is broken with TestClocks so might be the thing to try and repro for you @livid latch
Yup, I'm taking a closer look at the test clock advancements that were done, to try to get a better feel for the flow here.
Alright, I'm going to run through the steps that I saw lead to the most recent Invoice that you shared. Can you confirm if this aligns with what you did?
- A test clock was advanced, which caused a Subscription to generate a new Invoice (in_1RdwSg2eR1Lfh7BGleafkQ3o)
- A request was made to update the Invoice: https://dashboard.stripe.com/test/logs/req_qjebhg302CKAEh
- A request was made to update an associated Invoice Item: https://dashboard.stripe.com/test/logs/req_JWYDheQqK73rDH
- A request was made to finalize the Invoice: https://dashboard.stripe.com/test/logs/req_JJhrkIpExWo3Zj
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Hm, but with as far as that test clock was advanced, the Invoice should have finalized by the time it finished advancing.
I think I may see what's going on here, doing some testing in my account.
Hm, not able to reproduce so far, but I didn't explicitly test with a Sandbox + Connected Account + Subscription Schedule before.