Notify your server
Add a webhook endpoint to a payment link that notifies your server of each payment, ticket, donation or refund, and manage its signing secret.
A link's Webhooks tab sends its events to an address on your server, signed with a secret of each endpoint's own. Anyone who sees payment links sees the tab; adding, editing or deleting an endpoint needs Manage payment links. These actions, like revealing or rolling an endpoint's secret, ask for the security code. Links only exist in Live. The content of the events and how to verify the signature are described in the developer documentation: Webhooks of one link.
The steps
Step 1, Open the Webhooks tab
On the link's page, open the Webhooks tab, then Add endpoint.
Step 2, Give your server's address
In Endpoint URL, enter a public HTTPS address on your server.
Step 3, Choose the events
Under Events, tick the ones the endpoint should receive: Payment completed successfully, Event ticket purchased, Donation received, Order placed, Payment refunded, or lost in a dispute and Link expired. It only receives those.
The endpoint only receives the ticked events. Step 4, Save the endpoint
Add endpoint, at the bottom of the window, saves it after the security code. When your organisation already has as many endpoints as allowed, the window says so under Endpoint URL: delete one you no longer use to add another.
Step 5, Copy the signing secret
In the endpoint's menu, Reveal signing secret gives, after the security code, the Signing secret your server uses to verify each delivery.
Step 6, Send a test
Send test, in the endpoint's menu, sends a test event and says whether your server accepted it. After too many tests, the message says when you can try again. The Last delivery, on the endpoint's row, only counts real events, with the HTTP status received.
Manage an endpoint
Each endpoint's menu also offers Copy URL and Edit endpoint, where turning off Active keeps its settings without sending it anything. Roll signing secret opens Roll signing secret?, which says when the old secret stops working. Roll secret, after the security code, signs deliveries with a new secret and shows it under Signing secret: put it on your server so that it keeps accepting deliveries. Delete endpoint asks Delete this endpoint?: the endpoint stops receiving the link's events and its secret is lost, with no way back.
To receive the events of all your links at once, use the developer console webhooks instead; their list of events is under Payment links.