#Ecnarongi-return_url
1 messages · Page 1 of 1 (latest)
hello @pulsar hamlet , the return_url is the url your customer will be directed to after they complete payment. This is typically a page on your application/site
it's not the webhook endpoint url
cool, that makes sense
for example, when the customer is directed to that page, you may want to display a "payment successful" message
I get it like an Order page or Thank you
yep!
where would the webhook go in this process, I was going through the migration page for the PaymentElement and it instructed me to connect a webhook, the question is where am I connecting that webhook to?
you're referring to this section - https://stripe.com/docs/payments/payment-element/migration#post-payment?
I set it up in my dashboard, I am under the impression the webhook has to be invoked or initialized before it starts listening for events
yes that is the link
can you share your account id? i'll take a look at how it's been setup
how would I share my account, do you need my account number?
nonono, you should never give your account number
the account id which i'm referring to is a unique account id for your Stripe account
it typically looks like acct_123
you can find it if you login to your Stripe Dashboard here : https://dashboard.stripe.com/settings/account
it's in the upper right hand corner
acct_1HciXvC2qX544g6W
you've already setup your webhook successfully, an event has also been delivered to your webhook endpoint i.e. evt_3KBs9fC2qX544g6W02BHNA7B
nothing else needs to be done
should I not be expecting a response in my webhook, e.g. once received do something?
I was under the impression that once I received a response that I would update the db with data sent from stripe
ah alright, i understand what you mean now. yes, you will want to implement the logic to handle any follow up processes
so you see why I am asking WHERE do I connect the webhook in the payment process
like when is the webhook called/accessed?
you can take a look at this guide for an example of how to setup webhooks : https://stripe.com/docs/webhooks/quickstart
For example, if you want to update your database when you receive a payment_intent.successful event, you can do it here
when 'payment_intent.succeeded'
payment_intent = event.data.object # contains a Stripe::PaymentIntent
puts "Payment for #{payment_intent['amount']} succeeded."
# Then define and call a method to handle the successful payment intent.
# handle_payment_intent_succeeded(payment_intent)
yes
say all of this code lives in server.php
when does server.php get called?
is it automatically served from the stripe server?
when Stripe sends a webhook event to your server
gotcha
I was under the wrong impression
I was trying to fit a square peg into a round hole for almost a week
thank you
you're welcome, feel free to reach out anytime you have questions!
no problem, happy holidays