#toxiCity

1 messages · Page 1 of 1 (latest)

nimble oakBOT
lime violet
chilly dome
#

Can you rephrase your question? What are you trying to do exactly?

lime violet
#

What value should I use for the payment method parameter

chilly dome
#

The value should be a PaymentMethod ID, but you won't have that ID unless you've collected payment details from a customer and used these details to create a PaymentMethod object

lime violet
#

already have that

#

where can I get the payment method

chilly dome
#

Is there a particular reason why you're not confirming the SetupIntent client side? typically, integrations will collect payment details on the frontend and use confirmSetup to create a PaymentMethod and confirm the SetupIntent in one go

lime violet
#

I need to add a card then delete the previous card so there will only be one payment method on the system programatically

chilly dome
#

Okay, understood. How are you collecting the customer's new card details?

lime violet
#

they have to register a new card using the PaymentElement

chilly dome
#

Okay, good. In that case, I recommend following the steps in the guide I linked above.

#

I assume you're using the SetupIntent's client secret for this PaymentElement?

lime violet
#

yes that's correct

chilly dome
lime violet
#

let me try

#

already did what was in the documentation

chilly dome