Correlate centers with publicToken
Every webhook envelope carries a center object identifying where the event originated:
"center": {
"id": 1234,
"publicToken": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Portales"
}
Use publicToken, not id
publicTokenis a stable public identifier — the recommended key to correlate centers across systems.idis Trainingym's internal id. It works, but it is an internal detail; preferpublicTokenwhen storing the mapping on your side.nameis a display label and can change; never key on it.
Mapping pattern
Store the publicToken → your account/tenant mapping once, then resolve it on every
incoming event:
var account = accounts.byTrainingymToken(evt.center.publicToken);
if (account is null)
{
// Unknown center — log and still return 2xx so it isn't retried forever.
return Results.Ok();
}
The center object is present in every event regardless of eventType, so this
lookup works uniformly across payments, activities and access events.