#.abishek
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- .abishek, 18 hours ago, 10 messages
That should be the first to take precedence
But to be sure you can look at the generated Invoice
iam assuming the subscription.latest_invoice property?
Yes, expand it and see which paymethod was used
ok, so once I expand, I have the default_payment_method property that should be enough?
i have another question related to the subscriptions payment method, sometimes the default_payment_method is null
Because it will look at some other properties, if default_payment_method is null
ie. default_source, then customer's invoice_settings.default_payment_method then customer's default_source
what scenarios does this happen?
i have a couple of payment intents that have latest_invoice.default_payment_method as null
for example, I have an invoice on Production where the default_source and the default_payment_method is null
trying to understand the scenario when such a case would happen
it was for a Subscription Renewal
Then the Subscription will look for the customer's properties to try to charge
It's explained here https://docs.stripe.com/api/subscriptions/object#subscription_object-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but my question is why would it be different for certain invoices? what determines that it uses something different?
i went through that small snippet there
It goes through the same order AFAIK, so if default_payment_method is null, it will look for default_source first
i understand the order, my question is what may be causing it to save like this. Is there something I have to do on my code so the default_payment_method is always set?
the customers only use the Stripe Checkout to Checkout
so do I have to change any settings there?
That would needs testing in Test mode. You can perform and end-to-end test on your flow and inspect the Subscription. Normally I think Stripe Checkout would set its default_payment_method
also, I have an invoice where all the 3 properties are null
default_payment_method, default_source , customer.invoice_settings.default_payment_method all of them are null
this is on a Live Invoice
ah, there is a 4th property, customer.default_source as well
and there are chances that it doesn't return an object of type PaymentMethod, but Card as well
Yeah that source is a bit legacy one
so, it could be old subscriptions?
Old Customers which has card from a legacy integration
ok