#.abishek

1 messages · Page 1 of 1 (latest)

prisma gateBOT
#

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.

prisma fog
#

That should be the first to take precedence

#

But to be sure you can look at the generated Invoice

clever otter
#

iam assuming the subscription.latest_invoice property?

prisma fog
#

Yes, expand it and see which paymethod was used

clever otter
#

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

prisma fog
#

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

clever otter
#

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

prisma fog
#

Then the Subscription will look for the customer's properties to try to charge

clever otter
#

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

prisma fog
#

It goes through the same order AFAIK, so if default_payment_method is null, it will look for default_source first

clever otter
#

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?

prisma fog
#

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

clever otter
#

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

prisma fog
#

Yeah that source is a bit legacy one

clever otter
#

so, it could be old subscriptions?

prisma fog
#

Old Customers which has card from a legacy integration

clever otter
#

ok