#xwtk
1 messages ยท Page 1 of 1 (latest)
Hey Hanzo.
Hello ๐
Merchants typically rely on webhooks for real time updates
Have you read the doc already?
Not fully, read the webhook part but wanted to know if there's an IPN option
My checkout system is able to handle simultaneous requests
Something like, when payment is complete, Stripe just sends a standard HTTP request to the pre-specified URL
That's what webhooks do. When the PaymentIntent is created, confirmed, captured etc... you receive a POST request with the PaymentIntent object as a payload on your server-side route.
How exactly are you integrated with Stripe? Are you using Stripe Checkout or Elements?
Stripe Checkout with PHP library
Oh wait a moment
// Set your secret key. Remember to switch to your live secret key in production.
// See your keys here: https://dashboard.stripe.com/apikeys
\Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
$endpoint = \Stripe\WebhookEndpoint::create([
'url' => 'https://example.com/my/webhook/endpoint',
'enabled_events' => [
'payment_intent.payment_failed',
'payment_intent.succeeded',
],
]);
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
When I use this, there is no need to enable webhooks from Stripe dashboard correct?
Actually nevermind I mixed everything up
In this case, webhooks would be the best fit.
As you mentioned, customer can quickly exit the browser after paying before success redirect hits. In which case, any code you write client-side isn't going to work.
Webhooks allow you to listen to payment events on server-side, independent of what's happening on client-side
Too used to PayPal configuration hahaha
I think I got it, so I just register my webhook in Stripe
Set to only notify on successful payments, and there should pretty much be nothing else to do
Correct?
No changes to be done with the checkout initiation?
We have a guide here ๐
https://stripe.com/docs/payments/checkout/fulfill-orders
Damn sorry for wasting time๐
All good, happy to help