How webhooks work
Trainingym sends an HTTP POST with a JSON envelope to the endpoint you configure in
TGManager. Enable the event types you need and inspect eventType to route each delivery.
The envelope
Every event shares the same top-level shape:
| Field | Type | Description |
|---|---|---|
idEvent | string · uuid | Unique event id. Use it as the idempotency / deduplication key across retries. |
dateCreated | string · date-time | Event creation timestamp (UTC). |
eventType | string | Event type discriminator. |
center | object | Center from which the event originated: id, publicToken, name. |
data | object | array | Event payload; its shape depends on eventType. |
{
"idEvent": "b6c1a2e5-0c90-4e93-9dd0-2f2fdc0d8ef4",
"dateCreated": "2025-01-01T12:00:00Z",
"eventType": "payment.succeeded",
"center": {
"id": 1234,
"publicToken": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Portales"
},
"data": { "id": "aB3dE9", "idMember": "ZpQ1x7", "price": 102.85 }
}
Delivery semantics
- At-least-once delivery — duplicates may happen. Deduplicate on
idEvent. - Ordering is not guaranteed.
- A delivery succeeds when your endpoint returns any 2xx within 10 seconds; anything else is retried (see Receive webhooks reliably).
Type notes
- Most entity ids are sent as
string(hashids); fields documented as numeric keep their numeric type. dateCreated,paymentDateandtransactionDateare UTC timestamps (date-time).- Time-of-day values are sent as
HH:mm:ss(for example"09:30:00").
Events
Browse each event's payload in the sidebar under Event types, grouped by Payments, Activities and Access.