- Mock serverhttps://docs.leanx.me/_mock/openapi/v2/events
- Leanx Test serverhttps://api.leanxtest.me/v2/events
- Leanx Production serverhttps://api.leanx.me/v2/events
curl -i -X GET \
https://docs.leanx.me/_mock/openapi/v2/events \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Server-sent event stream of your payments. Each event has an event name and a JSON data line: payment carries the full payment (the same shape as GET /v2/payments/{id}); payment-update carries only its id, timestamp and new status.
The stream starts when you connect. Events carry no id, so there is no Last-Event-ID resume, and events sent while you were disconnected are not replayed: after reconnecting, fetch the payments you are waiting on with GET /v2/payments/{id}. Lines starting with : are comments (a ping every 30 seconds keeps the connection open) and carry no data. There is no filtering: you receive events for every payment on your account.
The Authorization header is required, so use a server-side SSE client; the browser EventSource API cannot send it.
event: payment-update
data: {"id":"00000000-0000-4000-A000-000000000000","timestamp":"2024-12-01T01:05:00Z","status":"succeeded"}