Webhook
A Webhook allows your application to listen for real-time loyalty events on the Gamopanda platform (such as streak milestone completions, challenge failures, or active streak warning periods). When a registered event occurs, Gamopanda sends an HTTP POST payload containing the event data to your configured endpoint URL.
All webhook notifications are signed using a secure key. You should verify the signature header on your server using the unique webhookSecret to ensure the authenticity of incoming requests.
How it works
- Configure Webhook — define a name, endpoint URL, and select the system
eventCodesyou wish to subscribe to. - Retrieve Secret — once created, the platform autogenerates a unique
webhookSecretfor security verification. - Listen for Events — when a member executes an action that triggers a subscribed event (e.g. finishes a challenge), the platform compiles the event payload.
- Receive Payload — Gamopanda sends an HTTP
POSTrequest to yourendpointUrlwith the signature header. - Acknowledge delivery — your server must respond with a
2xxHTTP status code. If delivery fails (non-2xx response or timeout), Gamopanda logs the attempt in Webhook Logs and retries automatically.
Fields
Basic information
| Field | Type | Required | Max length | Description |
|---|---|---|---|---|
name | string | ✅ | 256 | Internal name for the webhook subscription |
description | string | ❌ | 1 024 | Internal description of the webhook |
status | enum | ✅ | — | Subscription status: draft · live · paused. Default draft. |
Endpoint settings
| Field | Type | Required | Max length | Description |
|---|---|---|---|---|
endpointUrl | string | ✅ | 2 048 | The destination URL where HTTP POST requests are sent. Must be a valid URI. |
eventCodes | array (string) | ✅ | — | List of event codes that trigger this webhook. See Event Codes below. |
Read-only settings
| Field | Type | Description |
|---|---|---|
webhookSecret | string | Secure autogenerated token (max 64 chars) used to verify webhook request signatures. |
Event codes
You can subscribe your webhook to one or more of the following event codes:
streak_progress_broken— Sent when a member's streak resets due to inactivitystreak_progress_to_be_broken— Sent as a warning reminder before a streak expiresstreak_progress_completed— Sent when a member completes the overall target streakstreak_progress_milestone_completed— Sent when a member crosses a reward milestone in a streakstreak_progress_non_milestone_completed— Sent when a member completes a streak period that doesn't have a milestonestreak_progress_in_progress— Sent when a member makes progress on a streakchallenge_progress_failed— Sent when a challenge window closes without completionchallenge_progress_to_be_failed— Sent as a warning reminder before a challenge expireschallenge_progress_completed— Sent when a member completes the overall challengechallenge_progress_milestone_completed— Sent when a member reaches a milestone in a challengechallenge_progress_in_progress— Sent when a member makes progress on a challenge
Webhook signatures
Each webhook request contains a signature header (x-gamopanda-signature) containing the HMAC SHA-256 hash of the request body, signed using your webhook's unique webhookSecret.
To verify a webhook request:
- Retrieve the signature from the
x-gamopanda-signatureheader. - Compute the HMAC SHA-256 hash of the raw HTTP request body using the
webhookSecretas the signing key. - Compare the computed hash with the header signature value. To prevent timing attacks, perform a constant-time comparison.
Implementation
Node.js
Code
Python
Code
Java
Code
PHP
Code
Ruby
Code
Real-world examples
🛍️ E-commerce — Streak Milestone Webhook Subscription
Subscribe to streak progress events to trigger immediate actions on your backend (e.g., updating user CRM fields or badges):
Code
Access & permissions
| Caller | Allowed operations | Notes |
|---|---|---|
| Admin | CREATE · GET · LIST · UPDATE · DELETE | Full control over webhook subscriptions |
| End user | (none) | No access |
| Guest user | (none) | No access |
Related resources
| Resource | Description |
|---|---|
| Webhook Log | Read-only delivery logs recording execution status and retries |
| Event Log | The source system audit events that triggered the webhook |
API reference
See the API Reference for full request/response schemas and interactive examples for:
GET /schema/webhook/record— list webhooksPOST /schema/webhook/record— create a webhookGET /schema/webhook/record/{id}— get a webhook by IDPATCH /schema/webhook/record/{id}— update a webhookDELETE /schema/webhook/record/{id}— delete a webhook