---
title: "Webhook payload snippet"
subtitle: "<WebhookPayloadSnippet> embeds a webhook's payload example from the API reference."
---

This component pulls data from the API reference, so it updates automatically with the OpenAPI spec.

A webhook payload example:

```mdx
<WebhookPayloadSnippet webhook="payment.succeeded" example="Refunded" />
```

<ParamField path="webhook" type="string" required>Webhook name, `operationId`, or a key of the form `WEBHOOK <name>`.</ParamField>
<ParamField path="example" type="string">Named example.</ParamField>
<ParamField path="highlight" type="string | array">Lines to highlight.</ParamField>

In the page's `.md` version it's a JSON code block with the payload example.

This site's platform API doesn't define any webhooks, so no rendered example is shown here; for how to write them in the spec, see [Webhooks and SSE](../api/webhooks-and-sse.mdx).
