#tzarbuba-setupintent

1 messages ยท Page 1 of 1 (latest)

young dome
#

@atomic bloom hello, what's your question?

atomic bloom
#

Hello ๐Ÿ™‚

#

ok just a second, I type really slow

#

my goal is to update customers card details all the billing details and the card expiration etc. right now I'm not understanding the flow for doing this

#

I have to be more clear

#
      payment_method: {
        card: elements.getElement(CardElement),
        billing_details: {
          name,
          email,
        },
      },
    });```
#

this function is receiving the client_secret from stripe.setupIntents.create

#

for creating new customer then creating new setup intents then adding the card details from react element all works fine

#

what I'm failing is selecting existing customer then select existing setup intent to update it with new card details

#

my goal is to update the customer card details without making many payment methods

young dome
#

my goal is to update the customer card details without making many payment methods
you can;t. You have to create a new PaymentMethod first. Then you can always delete the old one after

atomic bloom
#

hmmm

#

so I shouldn't use setupIntents

#

sorry for being such a rookie

young dome
#

You should use SetupIntents, that's what you use to collect card details

atomic bloom
#

yes, elements need the secret

#

after setting the intent i have to confirm it with PaymentMethod?

young dome
#

I don't understand that sentence

#

that teaches you how to collect card details

atomic bloom
#

I'm doing exactly this guide

#

but don't want to charge the saved payment method and now I'm trying to update it

young dome
#

there's no "charge" it's a SetupIntent, the whole point is to collect new card details, no say

#

you can't "update an existing Payment Method" it doesn't really make sense

#

Just create a brand new one

atomic bloom
#

in the guide next step is charge

atomic bloom
#

and trying to find a way to update them not just creating new

#

as you say I could just remove pm and probably this would be fine

young dome
#

ok, that is currently working, but it creates so many payment methods
I mean it only creates a payment method when you collect a new card. You won't ask your customer for a new card every hour of the day, that's not a common operation

atomic bloom
#

yeah make sense, no need for this thread anymore, thank you โค๏ธ

young dome
#

Are you sure? Happy to answer more questions if you have some

atomic bloom
#

I'm having my first steps in stripe and have problems with the flow of the api, for now I'm ok

young dome
#

Perfect!

#

And so yes, in a perfect world we would "detect" duplicate cards and not create many pm_123. It's something we're even working on longer term

atomic bloom
#

sweet

#

hopefully will see this feature in the coming update ๐Ÿ™‚

young dome
#

๐Ÿคž

atomic bloom
#

I will start testing something else, if i have troubles will write again, see ya