#maxime_unexpected
1 messages ยท Page 1 of 1 (latest)
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.
- maxime_docs, 18 hours ago, 32 messages
๐ 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/1239830608570613770
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
And I'd have thought that payment methods manually set to a given subscription wouldn't be overridden when changing the global default payment method.
Is that a bug?
What's the subscription ID?
The customer ID rather? So that you're able to see both active subs? cus_PyjH8iayxcn9DK
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Is it about sub_1PFyDCJdX8lIDNiaDPsPwTHB?
Well, what I've described can only occur when there's more than 1 sub
so it's about sub_1PBtZBJdX8lIDNiaXaG1w3Sz and sub_1PFyDCJdX8lIDNiaDPsPwTHB
Try to play with it from the customer portal https://billing.stripe.com/p/session/test_YWNjdF8xTXRVbFpKZFg4bElETmlhLF9RNlMzVzR3c1pXNEk0ZG9MOGJwZFNLR0hrSXJRTEc50100ZS7jO4tj
"Updating a default card also updates the cards assigned to a specific subscription" -> can you elaborate? update the default card to a customer or to a subscription ?
So you are change the default payment on a subscription ?
So far, so good
And now, switching back to the previous default card:
Why is this one not on Mastercard?
As I had explicitely set it at the subscription level
Short video in case
also, from the video you can see that on the last step, when I select the previous card to be the default, the one not attached to a subscription updates first, and the top one that I'd expect wouldn't update as it was set at the subscription level, updates. But after like 2s.
OK, that's because sub_1PFyDCJdX8lIDNiaDPsPwTHB doesn't have a default_payement_method, and Stripe will customer's invoice_setting.default_payment_method to pay the invoice.
so how come when I change the first one to use the mastercard, can I have it set only on one sub? Surely it has the default payment method set, no?
I'll do it again till that stage
https://docs.stripe.com/api/subscriptions/object#subscription_object-default_payment_method this behaviour is explained in api reference
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Well, I understand the idea, but I don't think that at this step the subscription doesn't have a default payment method:
Sorry, it's sub_1PBtZBJdX8lIDNiaXaG1w3Sz that doesn't have a default_payement_method
Yup indeed, double checked
So the question is, is it normal that Stripe changes the payment method set on a subscription when the default payment method of a user is updated?
I'm guessing not, but you tell me ๐
When you change the customer's default payment method on Billing portal, the new payment method will be reflected on those subscriptions that doesn't have default_payment_method , i.e., sub_1PBtZBJdX8lIDNiaXaG1w3Sz
As I explainer earlier, Stripe will use customer's invoice_setting.default_payment_method for pay invoices for subscription that doesn't have a default_payment_method
Therefore, the billing portal may give you an impression that the subscription's default_payment_method is changed, but actually what it shows is the customer's invoice_setting.default_payment_method
I know. What I'm saying is that it doesn't only reflects it on the one that has no payment method set at the sub level.
It also changes it on the one that has a payment method set at the subscription level
I'll provide a couple of screenshots that'll make it clear, one sec
State 1: Expected.
- Subscription
sub_1PFyDCJdX8lIDNiaDPsPwTHBhas a payment method set at the subscription level - Subscription
sub_1PBtZBJdX8lIDNiaXaG1w3Szhas no payment method set at the subscription level (and therefore default to the customer one)
So far, so good.
State 2: Expected.
You can see that I have changed the default payment method at the customer level, and looking at each subscription, they're in the expected state.
The first one still has the payment method set at the subscription level.
The second one doesn't have any payment method set at subscription level and uses the user default one.
So far, so good.
State 3: Unexpected โ ๏ธ
I change the default payment method at the customer level, and the subscription where I had set a payment method at the subscription level is gone, it's now defaulting to the customer level payment method!
Does it make more sense why I think it's a bug?
Do you mind if I use your billing portal link to produce https://billing.stripe.com/p/session/test_YWNjdF8xTXRVbFpKZFg4bElETmlhLF9RNlMzVzR3c1pXNEk0ZG9MOGJwZFNLR0hrSXJRTEc50100ZS7jO4tj ?
Go ahead, I'll stop playing around with it while you test it yourself ๐
Hmm, I can't reproduce the problem. I add a new 4242 payment method, set it as the default_payemnt_method to sub_1PFyDCJdX8lIDNiaDPsPwTHB, and then change the default_payemnt_method on customer to 5556, sub_1PFyDCJdX8lIDNiaDPsPwTHB is still using 4242 as its default_payemnt_method
Umh, try doing the following:
- Make sure no sub has a default payment method yet
- Let say there's card 1 and card 2, card 1 is the default at the customer level for now
- Attach card 2 as a specific payment method on subscription 1
- Make card 2 the default payment method at the customer level
- Make card 1 the default payment method at the customer level
You'll see that the subscription 1 now has no default payment method attached anymore at the subscription level
Can you share with me the subscription IDs?
Hold on, I'll put you right in the good spot where you'll only have 1 thing to do to see the bug
- Take a look into this customer portal: https://billing.stripe.com/p/session/test_YWNjdF8xTXRVbFpKZFg4bElETmlhLF9RNlMzVzR3c1pXNEk0ZG9MOGJwZFNLR0hrSXJRTEc50100ZS7jO4tj
- Notice that Mastercard 8210 is the default payment method at the customer level
- See that https://dashboard.stripe.com/test/subscriptions/sub_1PFyDCJdX8lIDNiaDPsPwTHB this subscription has the same card set at the subscription level than the default one. So changing the global payment method at the customer level shouldn't update this
- Now go back to the customer portal and at the customer level, select the card
5556 - Take a look again into the subscription https://dashboard.stripe.com/test/subscriptions/sub_1PFyDCJdX8lIDNiaDPsPwTHB and you'll see that the payment method will not be set anymore. Meaning that updating the payment method at the customer level removes the payment method at the subscription level
Hopefully that's clear
I see, I can reproduce the problem now, sub_1PFyDCJdX8lIDNiaDPsPwTHB's default_payment_method is indeed unset.
I'd escalate this problem to our internal team. Thank you so much for letting us know this!
So you do confirm this is not the expected behaviour?
I wasn't 100% sure but it seemed strange to loose the payment method on the subscription by changing the global default ๐
No it's not the expected behaviour.
Cool thanks! And thanks for reporting it to your internal team ๐