Checkout payment link - webhooks

Hi,

I’m using cURL (Checkout payment link) and all works fine but I can’t find any information on how to use webhooks.
My questions:

  • where I can set the return URL up
  • what data is returning ( any PHP examples welcome )

Thanks

At this time when a checkout is created an order webhook events are triggered. When a checkout link is paid for then payment and order events are triggered.

The redirect_url for a payment link is set in the checkout_link_options. :slightly_smiling_face:

1 Like

Thanks for the explanation.
So at the redirect_link I’ll get an order_id and then I need to use GET
/v2/orders/{order_id} to get all details?
If so the order_id comes as GET or POST?
Best regards
Dan

You’ll get the order_id when you create the payment link. So you can get the order details before the customer pays for the link. :slightly_smiling_face:

True, but I need it after payment is done not before :slight_smile: So I need to know that payment is done ( redirect_url) and then check a current status and change an order status in my marketplace

Okay, then you’ll need to listen to payment webhook events. When the link is paid for the payment object in the webhook event will have the order_id that you can use to call the Orders API to get the details. :slightly_smiling_face:

1 Like