# Webhooks

Gravity has API routes and a `webhookController` pre-configured for you to start accepting webhooks from external services and APIs.

A Stripe webhook handler is included for you and is used to handle accounts [downgrading their plan to free](/gravity-server/free-accounts.md#downgrading-to-free) at the end of their current billing cycle.&#x20;

Please refer to the Stripe documentation for the latest information on testing [Stripe webhooks](https://docs.stripe.com/webhooks).


---

# Agent Instructions: 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:

```
GET https://docs.usegravity.app/gravity-server/rest-api/webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
