API Reference: Webhook Events
This document provides a detailed reference for all supported webhook types and their corresponding payloads in Reward plugin.
Overview
Each webhook event represents a specific type of data change or action in Reward. When triggered, the webhook sends a POST
request to your configured URL with a JSON payload containing event-specific details.
Webhook Event Fields
All webhook payloads share these common fields:
Field | Type | Description |
---|---|---|
id | string | Unique identifier for the webhook event. |
type | string | Type of event that occurred (e.g., event.name ). |
time | string | ISO 8601 timestamp of when the event occurred. |
data | object | Event-specific data payload (details below). |
Supported Webhook Events
trigger_event.created
Description
Triggered when a new trigger event is created in Reward. Use this event to track or react to specific user actions, like successful payments or completed tasks.
Payload Fields
Field | Type | Description |
---|---|---|
data.user.id | string | The unique ID of the user associated with the event. |
data.value | number | The event value sent with the trigger event. |
data.trigger.id | string | The ID of the trigger (e.g., successful_payment ). |
Payload Structure
{
"id": "we_01jf2wkmvcfw6ts1qmgzya291c",
"type": "trigger_event.created",
"time": "2024-12-14T15:29:18.821Z",
"data": {
"user": {
"id": "ca9bb5c2-25a6-43e9-972e-862d28241a47"
},
"value": 2.99,
"trigger": {
"id": "successful_payment"
}
}
}
balance.credit_points_issued
Description
Triggered when credit pointss are issued to a user. Use this event to update user balances or sync credit points in your application.
Payload Fields
Field | Type | Description |
---|---|---|
data.user.id | string | The unique ID of the user receiving the credits. |
data.transaction.id | string | The unique ID of the credit transaction. |
data.transaction.amount | number | The amount of credits issued to the user. |
Payload Structure
{
"id": "we_01jf2z4wrwfnw9mhhn2qa80syb",
"type": "balance.credit_points_issued",
"time": "2024-12-14T16:13:41.187Z",
"data": {
"user": {
"id": "ca9bb5c2-25a6-43e9-972e-862d28241a47"
},
"transaction": {
"id": "trx_01jf2z4wpgeq0v1zk7ye6zg5aw",
"amount": 10
}
}
}
Changelog
Date | Change |
---|---|
2024-12-16 | Initial version of the webhook events reference. |