Skip to content
Terra WalletDevelopers

Early access. The Terra API and SDKs may change before launch, and the SDK packages are not published yet.

View as Markdown

API reference

Early access

Webhook endpoints

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

Authentication: Secret key or dashboard session.

Guide: Webhooks

MethodPathSummary
POST/v1/webhook_endpointsRegister 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#

NameTypeRequiredNotes
urlstring (url)yeshttps only. Private, loopback, link-local, CGNAT and metadata addresses are refused.
eventsarray of stringyesEvent 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.