#Suren-attach-card

1 messages · Page 1 of 1 (latest)

kindred harness
#

Hey! What specifically do you mean by 'attach a card'? Are you using Payment Methods and you wish to attach it to a Customer object?

austere aurora
#

yes i need to bind carts customers
and do not enter card details when paying

#

only when binding

kindred harness
#

Got it, so they're on your website adding a new card but not actually paying for anything at this point?

austere aurora
#

well we have to use for one-time payments

kindred harness
#

Got it. But there won't be a payment at the time of the payment details being captured?

#

Will attach it to the provided Customer object for future re-use and perform and required 3DS/auth

austere aurora
#

yes, you really will not be connected to the payment

#

I think this is not what I'm looking for

#

what if I get the current from the front and bind in this way

kindred harness
#

You shouldn't be using Sources really, they're an older API (replaced by Payment Methods)

#

Equally, attaching a PM to a Customer that way isn't really optimised for 3DS

#

The document I linked is the best way to collect payment data, carry out auth and then save for future usage

austere aurora
#

I just can't figure out how the binding is happening?

kindred harness
#

What do you mean by 'binding'?

#

Attaching to a Customer object?

austere aurora
#

I mean adding a card to a specific customer

kindred harness
#

That tells the API that the resulting Payment Method object created from the successful Setup Intent belongs to that customer

austere aurora
#

is this method only for binding?

kindred harness
#

No, it's not used solely to attach a payment method to a customer. The primary purpose of a Setup Intent is to authenticate payment details for future payment (i.e. saving a card). You don't have to provide a customer, but then it won't be resuable

austere aurora
#

so I can use 3DS here?

kindred harness
#

Yup, exactly. You're authenticating the card whilst your customer is present so that it can be charged in the future without requiring authentication

austere aurora
#

ok thanks a lot,
if I don't understand something I will write

kindred harness
#

Sure, we'll be happy to answer!