#szy_unexpected

1 messages ยท Page 1 of 1 (latest)

silent violetBOT
#

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

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

scarlet sageBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

marsh leaf
#

Hello

fathom dock
#

Hey ๐Ÿ™‚

marsh leaf
#

Can you share the Customer ID or Subscription ID from your reproduction?

#

I'd like to see exactly which properties you are using

fathom dock
#

customer id: cus_Px81GMk8bm4EAc
subscription id: sub_1P7DxGC5Vnk6f7u9H0DKdrWC

marsh leaf
#

Thanks, looking

#

If you don't have a default set on the Subscription then this is the PaymentMethod that will be charged

#

That does not change when you attach a new PaymentMethod to the Customer unless you explicitly update that property

scarlet sageBOT
fathom dock
#

that's what i used before to detect customer's payment method. The problem with that is that in such scenario: i deleted card that was default on a subscription -> the invoice_settings.default_payment_method is null. i think it's null until it's charged when the next payment happens.

torpid edge
#

From what I'm seeing on that customer specifically, the default payment method was always set explicitly by a dashboard action. It looks like our dashboard makes sure to specify invoice_settings.default_payment_method when you add a new card
https://dashboard.stripe.com/test/logs/req_h32ajhwEO3PsLS

#

Whoops wrong request

#

That is the kind of call I am seeing for that customer. As far as I can see it wasn't automatically set

fathom dock
#

I think that was done on a different customer (removed from my app).

#

should i reproduce it on this customer?

torpid edge
#

If you can I would appreciate it, I will try myself as well

fathom dock
#

just did it

torpid edge
#

I see you removed the default. Are you saying that if you start a subscription now another card will be charged?

fathom dock
#

I removed the default from subscription. i want to be able to detect which one is the default now since no other default payment method was applied to a subscription after that.

#

From what i understand. the new default will be the latest added card, unless i change in dashboard the default card for the customer. that's a bit confusing if i want to display for the user what's their default payment method.

torpid edge
#

From what I understand, we try to use: the subscription's default -> the customer's default PM -> the customer's default source. Your customer currently does not have the last two, so as I understand it we wouldn't charge the existing card that is saved to that customer

#

Can you create a subscription on that customer to confirm if we charge that card or not? I think the doc you linked to is specific to our Sources behavior. Because the dashboard is setting the cards as the default Payment Method, I don't think that behavior applies.

fathom dock
#

there is a subscriptoin on that customer already

torpid edge
#

Right, but nothing will be charged on that subscription for a bit. I was saying create a new subscription to check what happens when a subscription charges a customer in that state

fathom dock
#

i can only have one subscription per user

#

i could simulate in stripe dashboard one month from now to see what will happen. should i?

torpid edge
#

Yes please

fathom dock
#

yup, i got a failed payment.
Attempted to charge the customer's payment method on file 9 times and failed. No more retries are scheduled.

#

okay, i think that's good then. i should basically not allow the user to remove the default payment method before switching to a different one and rely on the data from the invoice_settings.default_payment_method property.

#

(i mean i could allow but then i need to handle updating default payment method with one of the existing one when the user removes the default payment)

torpid edge
#

Thank you for confirming that behavior. And yes that makes sense as a way to handle this. Happy we could clear this behavior up

fathom dock
#

thank you