#Carlos M - Default PM

1 messages · Page 1 of 1 (latest)

north canopy
#

Hi there! You can either (a) set the default_payment_method on the Subscription itself, or (b) set a payment_method on the Customer

#

If you do both, the payment_method attached to the Subscription will take precedence

bright jasper
#

but how to capture card data for trial subscriptions?

#

So I don't need to ask for the data in the future.

thorn laurel
bright jasper
#

ok

#

thanks

#

If the customer changes payment method because the other one failed, how do I identify that the old payment method was changed to a new one?

thorn laurel
#

If you are setting this as the default payment method on the subscription, I believe you should get a customer.subscription.updated event

bright jasper
#

if the customer changes cards, is the payment_method changed?

#

I can compare the current default payment method with the old one, if it is different I set a new default

#

correct?

thorn laurel
#

Changes cards how?

#

Is this your custom page or the Stripe hosted customer portal?

bright jasper
#

personalized

thorn laurel
#

If it is a card, you can check the payment method's card.fingerprint property and see if it matches with the payment method that you already have on the subscription

bright jasper
#

ok