#CarlosTorrecillas-3ds-recurring

1 messages · Page 1 of 1 (latest)

glass oasis
#

@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!

gaunt canopy
#

Hi @glass oasis thanks for the reply. Can you charge non recurring payments with that defaultPaymentMethod as well or is that JUST for recurring?

glass oasis
#

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

gaunt canopy
#

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

glass oasis
#

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

gaunt canopy
#

OK 🙂

glass oasis
gaunt canopy
#

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

glass oasis
#

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

gaunt canopy
#

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

glass oasis
#

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

gaunt canopy
#

yep I get that

glass oasis
#

I think you're missing that the PaymentMethod is the card, it replaces Token tok_xxx and Card card_xxx entirely

gaunt canopy
#

ok

#

Is it possible to get the name of the card via the PaymentMethod?

#

Not sure if that's under "billing_details.name"

glass oasis
#

that is the name of the cardholder yes(if you collect it on your frontend), like "Jane Doe"

#

is that what you wanted, or do you mean something else by 'name'?

gaunt canopy
#

that's exactly what I wanted. Indeed I collect the name in the frontend so that's cool

#

thanks so much