#CarlosTorrecillas-3ds-recurring
1 messages · Page 1 of 1 (latest)
@gaunt canopy I don't think there is since default_source can't take a pm_xxx PaymentMethod ID which is what you'd get from the SetupIntent
Ultimately it doesn't matter because we look at the invoiceSettings.defaultPaymentMethod first for what to charge, so if something is there, it will be used and we don't look at default_source!
Hi @glass oasis thanks for the reply. Can you charge non recurring payments with that defaultPaymentMethod as well or is that JUST for recurring?
it's only for recurring. For any other payment you make(using a PaymentIntent), your code calling the API has to tell us the paymentMethod to use
you can of course just read the ID from that field and then pass it through if you want to, that works! it's just we won't charge any one as a 'default', you have to tell us which one
OK - one last question, is there a way to get the actual source of a payment method so that I can also update the default source for that customer with the same card? Does that make sense?=
At the moment, what I am doing is getting the Token I get when I tokenise the card and create (again) the card in the backend to get the Id so that I can use it to default the source of the customer but I get not such source from that card although it was previously created by the setupIntent
is there a way to get the actual source of a payment method so that I can also update the default source for that customer with the same card? Does that make sense?=
no, and you don't need to
default_source and all that is legacy
as I said, if you have an invoice_settings[default_payment_method] set then we will look at that and ignore default_source so you don't have to worry about it
what I am doing is getting the Token I get when I tokenise the card and create (again) the card in the backend to get the Id so that I can use it to default the source of the customer
that makes no sense at all unfortunately
OK 🙂
just use PaymentMethods directly, tokens and sources are deprecated and legacy and PaymentMethods is backwards compatible https://stripe.com/docs/payments/payment-methods/transitioning#compatibility
OK - so that when I set up the card at the very first time I will set the invoiceSettings directly instead of the defaultSource - got it. I can still charge that card via the dashboard - as a standard payment - with no trouble I would have thought?
And last question, is there a way to get the card that is set up as invoicesettings.defaultpaymentmethod for a particular customer? is that available in the get options? - Oh I see I just query using customer.invoiceSettings.DefaultPaymentMethod id and that should be it
you can charge through the dashboard as far as I know yes.
and yes invoice_settings[default_payment_method] is a field on the customer object so you should be able to read it from your (Java/.NET, not sure which you're using) object directly yep
ok - sorry for the last question - but I'd like to know if you can get a cardId from a paymentmethod
essentially Id like to get the card associated to that DefaultPaymentMethod
there's no such thing , so no
the PaymentMethod is the card
as I said the things you mentioned earlier about getting "the actual source" and using token twice and stuff makes no sense
yep I get that
I think you're missing that the PaymentMethod is the card, it replaces Token tok_xxx and Card card_xxx entirely
ok
Is it possible to get the name of the card via the PaymentMethod?
Not sure if that's under "billing_details.name"