> For the complete documentation index, see [llms.txt](https://docs.loomgate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.loomgate.io/en/webhooks.md).

# Webhooks

Receive payment, refund, balance adjustment and unlock results over HTTP.

Loomgate sends webhooks (HTTP `POST`, JSON body) to your server when events happen: a payment succeeds or is canceled, a refund completes or fails, your balance is adjusted, an unlock step of a payment becomes available. Webhooks are the source of truth for fulfillment: the browser may close before the payment completes, but the webhook always arrives.

Every webhook is signed with Ed25519 and bound to your endpoint ID, so a webhook captured somewhere else cannot be replayed against you.

| Page                                                   | Contents                                                      |
| ------------------------------------------------------ | ------------------------------------------------------------- |
| [Set up webhooks](/en/webhooks/webhook-endpoints.md)   | Create endpoints, URL requirements, retries                   |
| [Verify signatures](/en/webhooks/verify-signatures.md) | Check the `Loomgate-Signature` header in Node.js, PHP, Python |
| [Event types](/en/webhooks/webhook-events.md)          | Event types and sample payloads                               |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.loomgate.io/en/webhooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
