Subscribing
Endpoint:POST /webhook
Available event types
| Event type | Description |
|---|---|
Overage | Customer exceeds their provisioned amount for a product |
AnonymousCustomer | Event received for an unrecognized customer alias — auto-created as anonymous |
UpcomingRenewal | Customer contract is approaching its renewal date |
InvoiceApproved | An invoice has been approved and is ready to send |
UnchargedEvents | Events exist that have not been counted against any meter |
TierCrossed | Customer usage has crossed into a new pricing tier |
CommitmentCrossed | Customer has crossed their committed usage threshold |
FinalTierExceeded | Customer usage has exceeded the final pricing tier |
InvoicePaymentStatusChanged | An invoice payment status has changed (e.g. paid, failed, overdue) |
Webhook payloads
Overage
AnonymousCustomer
UpcomingRenewal
InvoiceApproved
InvoicePaymentStatusChanged
TierCrossed
CommitmentCrossed
FinalTierExceeded
UnchargedEvents
Handling webhook events
A minimal server that receives Vayu webhooks, routes by event type, and reads the payload:In production, always verify the webhook signature before processing the payload.
Webhook security
All Vayu webhook requests include headers for signature verification:| Header | Description |
|---|---|
X-Timestamp | Unix timestamp (seconds) of when the request was sent |
X-Signature | Base64-encoded RSA-SHA256 signature of timestamp.JSON(payload) |
X-Signature-Version | Signature scheme version (currently v1) |
${timestamp}.${JSON.stringify(payload)}
Only HTTPS callback URLs are supported.
