#scif-paymentelement-mandate

1 messages · Page 1 of 1 (latest)

unborn sparrowBOT
steel python
#

Hi there! Just to confirm, is there a gap of time between steps 2 & 3 above?

#

In other words, if you're asking whether the flow above should be used to immediately create a charge, then no. If you're creating a charge shortly after collecting a customer's payment details, you can skip steps 1&2 altogether. If any authentication is required, this will happen when your frontend confirms the PI

zenith valley
#

There is no time gap, all steps will be done in one session. The idea of 1&2 is next: we support multiple payment methods and creation of subscription/PI requires different set of parameters for different PM's (for example: card vs SEPA vs Giropay — requires 3 different sets of parameters)

steel python
#

Hm, not sure I follow. If you're using Subscriptions, you should allow the PI to be automatically created by the subscription.

unborn sparrowBOT
zenith valley
#

Subscriptions to be paid by Sepa should be created with 'payment_behavior' => 'allow_incomplete' while to those paid by a card must be created with 'payment_behavior' => 'default_incomplete',

#

Therefore I cannot create one subscription, fetch it's PI's clientSecret and use it for confirmSepaPayment() as well as confirmCardPayment()

jaunty ice
#

Hi, stepping in and catching up here

#

I'm re-reading the ask here and not fully understanding the ask, I'm sorry. Can you reword this 'Will customer be requested second time to pass 3ds/confirm electronic mandate/whateverSCAcheck on step #5' ask please?

zenith valley
#

Use stripe.confirmCardSetup in the Setup Intents API flow when the customer submits your payment form. When called, it will confirm the SetupIntent with data you provide and carry out 3DS or other next actions if they are required.

This is a quote from docs. So if a customer in India then they will be asked to accept electronic mandate or/and pass 3ds checks

#

Use stripe.confirmCardPayment when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide and carry out 3DS or other next actions if they are required.

This is for confirm*payment methods

#

As I can see, both methods are going to conduct any checks required customer actions (3ds/electronic mandate/etc)

#

Does my question make sense now?

west beacon
#

scif-paymentelement-mandate

#

👋 I'm not really following your multiple separate asks. Can you share concrete example requests for me to work backwards from?

#

also if you could link the exact doc(s) you are reading, because you are quoting parts of it but we have hundreds of docs and I don't really get what you're looking at

zenith valley
#

What I should start from?

#

Those are docs I referred to

west beacon
#

Mostly start from your real question. Because no one should really be using confirmCardSetup() in most cases. So what are you really trying to do. Why do you create the SetupIntent yourself? Why do you then create the PaymentIntent? Where does SEPA Debit (europe) come into play vs you talking about Indian regulations

Sorry you just asked many mixed up things that are quite different and right now I don't really understand what the real original question is

#

If you do SEPA and others, you really should be using PaymentElement instead

#

You also mentioned Subscriptions but started with PaymentIntents so I'm totally confused

zenith valley
#

Thanks for your patience and trying to figure out! Let me explain

#

My platform sells both one-off (implemented as invoice charges) and subscriptions. Also, I'm trying to provide as much payment methods as possible: cards, gpay, for EU: sepa/giropay/ideal, for India:netbanking, upi…

west beacon
#

Okay so you have an Invoice, that Invoice has a PaymentIntent, and you use PaymentElement to confirm that PaymentIntent

#

If you aren't doing that, you're already making your life harder

zenith valley
#

For one-off purchases I create an invoice, grab PI's clientSecret and send it to FE. On FE I use confirmCard/Sepa/…Payment()

#

But! Invoice must be created with different params based on particular payment method customer tried to use

#

Like 'collection_method' for some methods should have value of 'send_invoice' and 'charge_automatically' for others

#

Therefore I cannot create one invoice and try to complete the payment using any payment type

#

Is this correct?

west beacon
#

I don't really grasp what that could mean so I want to say not really. But yes some payment methods only work with send_invoice. But do you really need every single payment method?

zenith valley
#

Ok, let's imagine just two: for EU clients: card and giropay. Card does not require while giropay requires

#

The idea how to overcome that issue was next: I create a setupIntent (SI) and ask customer to confirm it. Once I've collected it, I could be sure, that card or bank account has passed all required checks (sca/3ds/etc). Therefore I can create a PI just for this payment method and customer will not be willing to change it

#

Does it make sense?

west beacon
#

what does that mean "giropay requires"/ Requires what?

zenith valley
#

Collection method to be set to send_invoice

west beacon
#

sure but if you care about Giropay absolutely then you would default to that and it works fine for card

zenith valley
#

Ok. Cool. Will do, but similar issue happen with subscriptions

unborn sparrowBOT
zenith valley
#

For cards I have to set 'payment_behavior' => 'default_incomplete', but for other types to 'allow_incomplete'

west beacon
#

but why? that's the part I'm lost about

zenith valley
#

To use completeCard/Sepa/*Payment() I have to provide a clientSEcret

west beacon
#

but just use PaymentElement and use the normal confirmPayment()

zenith valley
#

Sorry, that's where I'm lost 🙂 How the PaymentElement will help with this? The requirement to specify correct payment_behavior comes from Stripe api, afaik

west beacon
#

I'm fairly confident that is not correct

#

I haven't tried this in a while that's why I'd like to get more specific details from you

zenith valley
#

Hmmm. That's interesting. So, does it mean I should just create a subscription with no payment_behavior specified using my BE and then try to use confirmPayment()?

west beacon
#

I think so

zenith valley
#

Ok, let me try

#

Will this be working fine if there are several payment elements mounted to the same Stripe instance?

west beacon
#

why would there be?

zenith valley
#

One page contains several methods, so I use the same variable to store stripe

west beacon
#

what does "contains several methods" even mean?

#

The goal of PaymentElement is to take one client_secret and render a UI to offer any support payment method all in one screen

zenith valley
#

what does "contains several methods" even mean?

#

Ahh, I remembered why using of confirmPayment() is not really the case to us — we handle coupons on the same page and creation of a subscription must be done once coupon entered

west beacon
#

😅 yeah I'm sorry I'm really struggling to grasp what you're doing, you seem to have a really complex payment flow

zenith valley
west beacon
#

yeah I think overall you seem to have a strange integration path and then my advice with PaymentElement is not going to work for you if you don't change your payment form

zenith valley
#

Do you mean PaymentElement===stripe.confirmPayment() or any stripe.confirmCard/Sepa…Payment()?

west beacon
#

😅 I don't even know what your sentence could mean.

#

But yes PaymentElement goes hand in hand with confirmPayment()

zenith valley
cursive gorge
#

since you have multiple payment method types, it would be easier for you to use the Payment Element and confirmPayment. confirm_card_payment only works for cards

west beacon
#

We went through this above. This will never work for them. They have a super complex flow collecting a Coupon upfront, it's just not viable. Unless they re-design their whole UI, the best option is to stick with "separate elements for each payment method type"

cursive gorge
#

aaah

west beacon
zenith valley
#

Wow, that looks promising!

cursive gorge
#

if you want to get access to it, you can reach out via the contact us on that page