API reference
Early accessWebhook endpoints
Where Terra sends signed events. https only, with SSRF protection on every delivery.
Authentication: Secret key or dashboard session.
Guide: Webhooks
| 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.