#adamlbailey-card-preferred
1 messages · Page 1 of 1 (latest)
@subtle ingot there's no "preferred card" for card payments really you should track this yourself and explicitly pass the PaymentMethod id pm_123 on each payment
if you're using Subscription or Invoicing though you can set https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
Hello!
I am using subscriptions and invoicing. I want each new card added to be the default payment method. Is the only way I can accomplish this to listen to webhooks and then mark each new card added as preferred?
Hey, how's it going?
Good! You?
Regarding your question, there is no "preferred" or "default" when it comes to Payment Methods. Are you coming from older APIs where there was a default_source?
Very good thanks. So we want a user to be able to add multiple cards and then select which one they want to be the card we hit for subscription payments and invoicing.
Sounds good. What specifically is blocking you?
Well I suppose we could use default_payment_method in invoice settings if exists and if not default to the last card added. So maybe nothing come to think of it. I expected there would be a way for a user to add a card and for that to become the explicit default_payment_method in invoice settings.
It will become that if you set it, but there's no single way to both add it and make it the default aside from setting both properties.
Cool. I think i'm all set. Appreciate the sounding board : )
Happy to help!