Place Order - On Successful Square Checkout

Hi,
I have recently started to work on square payments. When user successfully pays at the square hosted checkout page, I want my backend to be updated of the event , so that i can place an order in my DB.
Can you please guide me through the process. I know that i am supposed to subscribe a web-hook, but i don’t seem to understand which one.
Thanks in advance. :slight_smile:

Hey @saitejasuggala :wave:

There’s a couple ways you could approach this:

After a customer completes the checkout page, they will be redirected to the page defined by the redirect_url in your request. The URL for that page will have an orderId query parameter, which your redirect page can use to retrieve details about the checkout that was just completed.

You could also use webhooks to be notified when a payment is completed. I’d recommend using payment.updated, and checking for when the status is COMPLETED.

1 Like