#elBR
1 messages · Page 1 of 1 (latest)
👋 happy to help
default payment method and invoice_settings.default_payment_method are 2 separate things
one is for one-off payments and the other is for recurring payments
but how can I be shure to check what is the customer default payment method
I have just created cards
not paid anything yet with them
the card/Payment Method is never assigned as invoice_settings.default_payment_method on its own
you have to create that link yourself
so I shpuld check default_source?
default_source is for one-off payments
I have just created a customer and assigned some cards
that all
and I see on Stripe a label "default" on one of my cards
my question is which field rapresent that default that I see on Stripe
I see this
I have not created any invoice or subscription
sorry still looking, discord is a bit busy, I'm on it
yes so basically default_source is the "default" card/payment method
ok but why when I use the Stripe dashboard when I remove a payment method that was default it automatically assigns a new default card
this does not happen with the API
after I detach a paymentmethod from customer
and olso in create the first card created becomes default
insted on API these do not happen
I have to manually make it default
there are some behavior differences between the API and the Dashboard
why some payment method id start with src_ some with pm_ and some with card_?
it's some legacy code that we keep for backwards compatibility
src is for Source, pm for Payment Method and card for Cards
but nowadays we should always use PaymentMethods
but I m not understanding because as long as I have payment methods that start with "src", the default moves from one card to another if removed. Otherwise if there are no more cards that strat with "src" the default key does not move but leaves the customer without default payment method
sorry I don't follow
If I have 2 payment method whose id starts with "src" and one of them is default, if I remove that default one, the other one gets automatically assigned as default after the removal
instead this behaviour does not happen with payment methods that start with "pm"
do you mean using the API?
yep, there's no such thing as a default payment method for a customer's one time payment in the new APIs, and they don't use fields like default_source or stuff