Webhooks

The events JomForm sends, how to verify a delivery, and how to re-send one that failed.

Webhooks

A webhook posts a JSON body to your URL when an event happens. The body is the sale, response or subscription the API returns.

  • sale.paid fires when a payment is confirmed.
  • sale.failed fires when a payment fails.
  • subscription.charged fires on a recurring charge.
  • * subscribes to every event above.

Verify the signature

Every request carries X-JomForm-Event and an HMAC-SHA256 X-JomForm-Signature header over the raw body.

An account with an Ed25519 key also gets X-JomForm-Signature-Ed25519, verified with the public key from get_webhook_signing_key.

Deliveries are logged with their status code, attempt number and error. GET /v1/rest/webhooks/{id}/deliveries lists them.

Re-send a failed delivery with its retry route; it is queued for the next sweep. A scheduled retry has its own route.

Webhooks

MethodPathAccessWhat it does
GET/v1/rest/webhooksreadList outbound webhooks
POST/v1/rest/webhookswriteCreate an outbound webhook
PUT/v1/rest/webhooks/{id}writeUpdate an outbound webhook
DELETE/v1/rest/webhooks/{id}writeDelete an outbound webhook
GET/v1/rest/webhooks/{id}/deliveriesreadList a webhook's recent deliveries
POST/v1/rest/webhooks/{id}/deliveries/{deliveryId}/retrywriteRetry a failed delivery
POST/v1/rest/webhooks/{id}/retries/{retryId}/retrywriteRetry a dead-lettered delivery