#TLShadow
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
hey there ๐
have you had a look at Payment Intents?
or SetupIntents
yes the thing is i have seen the woocommerce stripe plugin uses stripe elements to display a form and create a source id which then can be passed with the order information to compelte the intent
though i havent found documentation showing that you can use elements without a client_secret or key
If you're just wanting to save a Payment Method details for a customer without making a payment, Setup Intents are the way to go
this is the recommended way of using Stripe
ok though the plugin uses /v1/ soruces to create a source and pass that with the intent which is basically what we want
we have many legacy integrations that we try to recommend new users not to use
this is one of them
ok i'm reading into the setup intents .. though it does seem to be pretty similiar to payment intent .. and i see no way to credit card information before hand
and i see no way to credit card information before hand
I don't follow
ok lets do a little example .. we do have a checkout page .. contains billing etc and also the card information
we now want to send the card information to stripe and get a reference to say yeah thats the method we want to use ... and then send the order with refrence and all the rest to our backend to properly create the intent
which at least in my understanding is what sources does
If there's payment involve
let's go back a second
let's put aside the implementation details
could you please elaborate on your use case?
ok we have the following setup, we provide a woocommerce plugin for handling orderstate a backend which acts as statistic and control center and passes information to stripe (to protected the private key) ... and currently we use checkout session, which redirects the final customer from the shop to a checkout page and back if successfull
the case is now we want to realize payment completly inside the shop .. without sending any sensitive financial data to our backend.
somewhat like stripe does with their plugin
which would still redirect the user
or lets put it this way i made a test implementation using intents and elements
which works .. though you have to do the normal order stuff .. the confirmation and then collect the card information data which breaks the normal experience
what is the normal experience?
ie payment intents happens after the order is confirmed, we want to collect the payment information along side with the confirmation .. so that when you use the pay now button no further interaction is required
the normal flow would be you have one page with payment, billing, shipping address .. and submit it at once ... and then you are done.
as far as i read into the code the stripe woocommerce plugin does this by .. creating a source (depracted as i understood) and pass the resulting id along with all the other information and create an intent with that source id
don't get me wrong i have no problem using setup Intents if there is a way to send CC,CVC and all the other stuff and get back a setup intent id and the nfill in tax,shipping etc would be fine .. though i didn't find that option in the first look through intent
or maybe its easier if formulated that way .. we want to pass the sensitive payment information to stripe and get back something we can use to reference that stored data and complete the payment without redirecting or any whitelabel pages
that's possible with payment intents
you shouldn't worry about this, if you're using Elements we will do that for you
you just need to pass the client_secret for the Elements and it will automatically create the Payment Method and attach it to the Payment Intent
and if the Payment Intent is already confirmed then it would be successfully paid
yeah .. and to get a client_secret i need to create a paymentIntent .. and creating a paymentIntent each time someone visits the checkout sounds a bit problematic
though i see when setting up the sample it worked fine, problem is a bit woocommerce
there's no problem with creating Payment Intents or even reusing them
ok lemme describe the flow we ahve to use this maybe depicts the problem better:
we have a confirmation page with the items, billing, payment information. At this point there is no real order (no reference number, no total price etc, and user still has to confirm including agbs and stuff) ... so usally once that is done you can create the intent normally and all goes fine
problem at this stage is .. when we collect payment information at this point .. we would have to send it through the backend server, which is a no go option
thats why we are looking for a way to kinda create the payment with stripe and then pass a reference on which would circument the no go
or we would have to create the intent already there but that would mean for every possible checkout there would be an order, which will be confusign for the store owner since the user hasn't confirmed his intentions yet
you can use Setup Intents to collect the Payment Method and use that to create/confirm the Payment Intent in the backend and passing the Payment Method Id
we also have a new beta feature https://stripe.com/docs/payments/build-a-two-step-confirmation maybe this would also be an option for you
ah .. okay just as recap .. i kinda make skeleton setupIntent .. then i can use that to use elements to collect the payment information and further on once the order is placed i can add all the missing stuff (shipping,discount,items,total) and complete it by then ?
you have 2 options
1st option create a Setup Intent collect the Payment Method and once the order is ready, you create a PaymentIntent that you can confirm on the server side
the only problem with this is that in some cases with SCA you might be asked to ask the customer to authenticate 3DS 2 times, once on Setup and once on Payment
the other option is the two-step-confirmation which is a beta feature, with this you no longer need Setup Intents
please read through the docs to see whether this is appropriate for your use-case
hmm okay will do thanks
ok and the sources approach is totally discoruaged or could it be an option albeit not a wanted one ?
I'm here to answer any of your questions
would you mind me asking where is your Account located?
since you are in the EU SCA is a big thing to handle which is not supported by sources
so I really think you should consider one of the two options we've discussed earlier
oh okay thats a real strong point :/ thanks
let me know if you need any more help