> Source: https://developers.terrawallet.us/docs/reference/webhook-endpoints . Terra Wallet developer docs (early access).

<!-- GENERATED by apps/mcp/scripts/build-docs-index.mjs. Do not edit by hand. -->

# Webhook endpoints

> **Preview.** Generated from `docs/developers/openapi-v1.json` (the exported OpenAPI document, authoritative) and, for operations it does not contain yet, from the v1 build contract (`docs/platform/V1_CONTRACT.md`). Each contract-only operation is marked.

Where Terra sends signed events. https only, with SSRF protection on every delivery.

**Authentication:** Secret key or dashboard session.

**Guide:** [Webhooks](https://developers.terrawallet.us/docs/webhooks.md)

| Method | Path | Summary |
|---|---|---|
| POST | `/v1/webhook_endpoints` | Register a webhook endpoint. The signing secret is returned once. |

## POST /v1/webhook_endpoints

Register a webhook endpoint. The signing secret is returned once.

- Operation id: `createWebhookEndpoint`
- Authentication: Secret key or dashboard session
- `Idempotency-Key`: required
- Source: the v1 contract. This operation is not in the OpenAPI document yet.

### Request body

| Name | Type | Required | Notes |
|---|---|---|---|
| `url` | string (url) | yes | https only. Private, loopback, link-local, CGNAT and metadata addresses are refused. |
| `events` | array of string | yes | Event types to receive. |

### Response

The secret is shown once.

```json
{
  "secret": "whsec_..."
}
```

### Notes

- Signature header: Terra-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + "." + body)>, with a 5-minute tolerance.
- Retries with exponential backoff for 3 days, a delivery log and manual replay. No redirects, a 10 s timeout and a 256 KB response cap.
- Events: payment_intent.succeeded, payment_intent.expired, payment_intent.underpaid, invoice.paid, invoice.overdue, subscription.created, subscription.renewed, subscription.payment_failed, subscription.past_due, subscription.canceled, payout_wallet.activated.
