#david2_subscription-paymentmethods

1 messages ยท Page 1 of 1 (latest)

next spruceBOT
#

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

timber drum
#

(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.

dim robin
#

Hi there. I'll be with you shortly. I'm assisting someone in another thread.

dim robin
#

From what I can see there are no failed webhooks or errors.

timber drum
#

It should have been auto-charged, yes? As its subscription is charge_automatically

dim robin
#

I'll have to double check.

next spruceBOT
dire jewel
#

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.

next spruceBOT
meager cedar
#

david2_subscription-paymentmethods

timber drum
#

shouldn't it use the default_payment_method from the subscription?

meager cedar
#

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?

timber drum
#

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.

meager cedar
#

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)

timber drum
#

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

meager cedar
#

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

timber drum
#

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.

meager cedar
#

Is the Invoice finalized? If it is, then the invoice.created Event is not relevant

timber drum
#

yes it is finalized

meager cedar
#

gotcha so the invoice.created part is a red herring

#

Where do you see the next attempt? I'm confused by this

timber drum
#

that is as per the dashboard

meager cedar
timber drum
#

1752078787

#

test clock frozen time is 1752250727

meager cedar
#

(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

timber drum
#

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)

next spruceBOT
livid latch
#

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.

meager cedar
#

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?

livid latch
#

Ah, good point.

meager cedar
#

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

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?

#

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.

livid latch
#

Hm, not able to reproduce so far, but I didn't explicitly test with a Sandbox + Connected Account + Subscription Schedule before.