#User1-PaymentElement

1 messages · Page 1 of 1 (latest)

lethal thicket
#

Hi there, the PaymentElement doesn't provide a UI to display list of saved payment methods, you'll need to implement it by yourself,.

west quest
#

but if we use our own it will fall under SCA. because the SCA purpose we migrate charges to paymentIntent.

and also if possible can you explain the appropriate steps to achieve tokenization.because from yesterday itself i have try to find a solution but still i dont have a luck and its created lot of confusion over. because so many options are there in docs.

lethal thicket
#

So previously you were using CardElement+Charge API, and want to migrate to PaymentIntent API because of SCA, is my understanding correct?

west quest
#

no previously we using only charges API.we collect the card details from our own UI.we dont use any elements. now because of SCA we have migrate to payment_intent.

the normal single-time payment i have implemented curently in below flow.

  1. create paymentintent on server
  2. using clinet_secret am loaded stripe js payment element
  3. the call confirmPayment method to complete payment
lethal thicket
#

Hmm, you shouldn't collect the card details from your own UI unless your application is PCI-compliant, it's unrelated to SCA.

west quest
#

oh okay. for SCA purpose we migrate to payment_intent and using stripe js

#

actually our previous integration is live almost past two years.we have acustomers in USA,CANADA and UK. now uk its recommend to SCA process. so we migrate the flow

lethal thicket
#

OK. Got it, the payment element can help you collect the payment details from your user, and it is compatible with both PaymentIntent and SetupIntent APIs.

#

With Payment element, you don't need to handle the tokenzation, Stripe will create a PaymentMethod object (the tokenized payment info) under the hood.

west quest
#

its always save the card or we need to pass any parameter. create a customer and pass the id in customer filed while creating payment intent its enough ?

lethal thicket
#

You can set setup_future_usage=off_session when creating the Payment Intent, this will tell Stripe to save this payment method and reuse it for future off_session payment for the associated customer https://stripe.com/docs/api/payment_intents/create?lang=php#create_payment_intent-setup_future_usage

west quest
#

if possibe can you please list the steps one by one what i need to do? so i will follow that because if any of you exaecutive share some docs so i am go to read the docs it takes some time then the chat will archived.after that another person came they suggest another link and i am totally confused .

i implemnted single time paymet flow with payment_intent my project team rushing to wrap the migration.but i have struggle with tokenization.

lethal thicket
#

Sure, let me summarize the steps here, and again you don't need to worry about the tokenization/

#
  1. create a customer (if not yet created)
  2. create paymentintent on server, pass in the customer and set setup_future_usage=off_session
  3. using clinet_secret am loaded stripe js payment element
  4. the call confirmPayment method to complete payment
    -> This process will complete the payment and also attach the payment method to the customer
west quest
#

okay . then am list payment methods in our UI.
if the user selects one payment method and i have the payment method id now. what is the API that will complete the payment by using payment_method?

lethal thicket
#

the same PaymentIntent API, you can pass in the payment_method when create/update the PaymentIntent.

west quest
#

basically, payment_intent API is created I saw the payments are incomplete status in the dashboard until its confirmed(confirmPayment will complete this). so we dont uses stripe payment eleamnts for saved card so we couldn't access the confirm payment? so how its confirmed?

lethal thicket
#

You don't need to use payment element to confirm the payment intent, you can confirm it from your backend by setting confirm=true and off_session=true

west quest
#

okay, I will list the payment method in our UI and then create payment_intent with "confirm=true" to complete the payment. this will fall under SCA?

lethal thicket
#

The SCA is taken care when your user confirms (from the frontend) the 1st payment intent, the subsequent payment intent can be confirmed from backend.

#

However, since the issuing bank has the final say to determine whether a transaction requires 3DS. So it's possible that the subsequent payment intent status may become requires_action , in which case you still need to bring your customer to your page to confirm the payment.

west quest
#

when we have received this requires_action response it will get in the payment_intent API response?

lethal thicket
austere brook
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!