How it works
Network calls fail; clocks drift; requests get retried. The flow below is designed so that, despite all of that, each business event credits EP exactly once — and the credit is applied synchronously, before you get the response.
-
Your business event fires
A user completes a qualifying action (an order, a check-in, a campaign event).
-
You build & sign the request
Serialize the JSON body once, then compute an HMAC-SHA256 signature over the timestamp and the exact body bytes. See Authentication.
-
You POST to the award endpoint
We verify the signature and timestamp window, check the tenant allow-list / caps, convert the raw
amountto EP, and de-duplicate by yourorderId. -
We credit the wallet atomically
The user credit and the idempotency row are written in one atomic step, so a retry can never double-credit.
-
We acknowledge with
202You receive
epTransactionId,status: COMPLETED, and the EPpointscredited. A replay of the sameorderIdreturns200withcode: DUPLICATE.
End-to-end flow
Section titled “End-to-end flow”sequenceDiagram participant P as Partner backend participant E as Eventista EP engine participant L as EP ledger / wallet P->>P: Build body, timestamp; sign HMAC-SHA256 P->>E: POST /v1/ep/webhook (X-Api-Key, X-Timestamp, X-Signature) E->>E: Verify signature + timestamp window E->>E: Check tenant allow-list, EP enabled, caps E->>E: Convert amount to EP, de-dupe by orderId E->>L: Credit user (treasury to user) + idempotency row (atomic) L-->>E: Committed E-->>P: 202 epTransactionId, status COMPLETED, points Note over P,E: Retry same orderId returns 200 code DUPLICATE