#Proteus
1 messages ยท Page 1 of 1 (latest)
Hello ๐
I am not sure if we have any docs that compare the differences comprehensively.
Are you building a new integration?
Yes. Custom integration.
Gotcha. And with Stripe v2 and v3, I believe you're referring to Stripe.js correct?
Yes, v3 is our latest client-side library version which is equipped to work with our latest APIs
https://stripe.com/docs/js
Ok. Once I have a "successful" payment, how can I extract the return data from Stripe? And what data do I get back? Right now I am getting this:
/thankyou.html?payment_intent=pi_3MgCjgL7M4NHiqBD1aSNHcPV&payment_intent_client_secret=pi_3MgCjgL7M4NHiqBD1aSNHcPV_secret_TIdZ5IGsOUzSvlYkF2o3KBHRT&redirect_status=succeeded
I want to do as much of this as I can using PHP.
( as in, I would like to be able to access all returned data via PHP )
We typically recommend folks to build a webhook endpoint to receive real-time info on their backend by leveraging webhook events
https://stripe.com/docs/webhooks
With webhook events, you typically get access to the whole PaymentIntent object
Do you guys have any recommended instructional videos on setting up these webhooks?
Found it right on the page ๐
Awesome ๐
@serene cloak, is there any way to do these things without terminal / composer?
Something pre-packaged?
@serene cloak, I am following the instructions here: https://stripe.com/docs/payments/quickstart
I am using PHP to add orders and payments to my DB.
You should be able to build the webhook endpoint without the terminal
How can I retrieve "success" and a transaction id once payment is successful? And what data do I get back?
payment_intent = transaction id?
I think the data returned depends on if you're retrieving the PaymentIntent on server-side OR client-side.
If you use stripe-php SDK to fetch the PaymentIntent using the id then you get access to the PaymentIntent object
https://stripe.com/docs/api/payment_intents/object
https://stripe.com/docs/api/payment_intents/retrieve
Where you can look at the status to check if it succeeded
BTW - I don't mean to be a pain in the butt. Like I said, I am a total noob when it comes to API's etc., but once I get a hang of things, I will be integrating Stripe into all my client's websites.
NP! ๐ Happy to help with any/all questions
PaymentIntent object = before payment, correct? This is the data sent to Stripe to process the payment? Then, after the payment is supposed to have been made, you can retrieve the PaymentIntent object to see whether payment was successful? Am I understanding this?
Yes, the PaymentIntent object encapsulates pretty much all parts of the payment process
We have comprehensive docs on them here
https://stripe.com/docs/payments/intents
https://stripe.com/docs/payments/payment-intents/verifying-status
I'd recommend reading through them as it would make it much easier to integrate once you understand the PaymentIntent API