#justinkennedy10 - Setup Intents

1 messages · Page 1 of 1 (latest)

dawn pagoda
#

Also, I strongly recommend you use Stripe.js and Elements. If there's a specific reason they're not working for you I may be able to provide a workaround?

wet cosmos
#

let me ask my frontend engineer why he doesn't want to use elements and get back to you (5mins)

#

sis the above correct though (assuming he is right)?

dawn pagoda
#

Well, it's highly unusual to use Stripe.js but not use Elements. Usually people don't want to use Stripe.js at all, but if using it is an option there are other approaches you can take. Can you tell me more about the flow? Specifically, how are you creating the Payment Methods you're using and attaching them to the Payment Intents?

wet cosmos
#

Sure! We have users of our app that can configure one payment method each for now. We were planning on just calling createSetupIntent server side for the customer + pass the secret to the client where confirmation would occur but my frontend engineer doesn't want to use Elements (he is still afk). Then for Payment Intents we would simply include the Customer ID + Payment Method ID when calling CreatePaymentIntent, and doing the same client-side confirmation with the payment intent secret key

dawn pagoda
#

So are you fully PCI compliant?

wet cosmos
#

Hmm maybe he is misunderstanding the confirmSetupIntent Stripe.js API

#

Do you know if in the "data" parameter here he needs to provide anything related to Elements? Or just a JSON object with the card info he gets from our UI?

#

Ah I think we need an actual cardElement in there

dawn pagoda
#

That's the wrong API.

#

That's the one that works with Elements, which you're not using.

#

Have a look at the link I provided above.

#

It links to a different version of that method.

wet cosmos
#

I think the one you linked is for confirming a payment

#

not a setup

dawn pagoda
#

Oh, sorry.

wet cosmos
#

(correct me if I'm wrong)

#

No prob at all - I appreciate you helping me out here

dawn pagoda
#

Sorry about that!

#

Let me know if that looks right or not.

wet cosmos
#

yes perfect!

#

If I create a payment method first

dawn pagoda
#

Yep, you can use that if you have the Payment Method ID client-side.

wet cosmos
#

And do you know of anyway to create a payment method client side without Elements (haha sorry)

#

I assume you can do so with the publishable key

dawn pagoda
#

You really should use Elements unless you're fully PCI compliant and know all the risks involved.

#

Can you confirm you're fully PCI compliant?

wet cosmos
#

I convinced him to go with Elements

#

not trying F around with PCI stuff hahahaha

#

thank you so much for your help though

#

we can just follow the normal SetupIntents guide now