#eran_acss-setupintent

1 messages ยท Page 1 of 1 (latest)

crude tartanBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1230632568672616459

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

stark lichenBOT
paper fox
#

Hi there!

final lily
#

Also, alternatively we tried using stripe.confirmSetup, but we don't know how to change the payment intent for that when the user selects the Pre-authorized debit option.

#

Hi there!

#

That method does appear to send the collect name and email, but we would need to change the payment intent to an acss_debit intent for it to work.

paper fox
#

Give me a few minutes to test this out. I think you should just be able to use confirmPayment instead

final lily
#

This is for setting up a payment method, not for making a payment

paper fox
#

Got it. Can you clarify what you mean by this in that case?

we don't know how to change the payment intent for that when the user selects the Pre-authorized debit option.

final lily
#

The default payment method in the Payment Element is "card" for collecting credit-card details. As such, when we set up the elements object, we pass a "card" setup intent. When the user changes the selected payment method to "Pre-authorized debit", the setup intent is still set to the "Card" intent. If we could change the intent the Payment Element is set up with when the user changes the payment method in the UI, this should work with the stripe.confirmSetup method

#

We don't see any documentation on how to change the setup intent for the element after its been created

paper fox
#

Do you have an example SetupIntent ID I can review?

#

Are you currently hard coding payment_method_types: ['card'] when creating a SetupIntent?

final lily
#

But the setup intent the element is created with is a card intent

#

var options = {clientSecret:intentSecret};
var elements = stripe.elements(options);

#

Like so

paper fox
#

Hm, I'm not really following. If you're using dynamic payment methods, I don't understand what you mean by "the setup intent the element is created with is a card intent"

#

A SetupIntent ID would help me see what's happening/how this is being created

final lily
#

Sure, let me pull up the ID

#

seti_1P72IzKlOm1BTbHsy44mJ5Qk

#

When instancing the payment element in JS, you need to pass a setup intent. That setup intent is set up for card payments

paper fox
final lily
#

Sorry, I sent you the wrong intent. Give me a second

#

seti_1P72IyKlOm1BTbHsZTfqRDN2

#

This is the card setup intent. Is it possible to pass more than one method to the setup intent?

paper fox
final lily
#

I see, though the confirmSetup method complains that it's missing the mandate. If we use stripe.confirmAcssDebitSetup() with the acss intent I sent you earlier, it does work fine

paper fox
#

So, when you create the SetupIntent server side, including these parameters will automatically create the required mandate

final lily
#

I see

#

Let me try this out, thanks for your patience with this ๐Ÿ™‚

paper fox
#

Sure thing!

final lily
#

Appears to work well! Thank you very much for the help ๐Ÿ™‚

paper fox
#

Glad to help! ACSS isn't the most straightforward payment method type ๐Ÿ˜…

final lily
#

For sure!

stark lichenBOT