Stream payment events such as payment status or quote responses
- Mock serverhttps://docs.swiftxpay.com/_mock/openapi/v2/events
- Swiftx Test serverhttps://api.swiftxapptest.net/v2/events
- Swiftx Production serverhttps://api.swiftxapp.net/v2/events
curl -i -X GET \
https://docs.swiftxpay.com/_mock/openapi/v2/events \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'last-event-id: string'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.
Each event has an id (a UUID7). Reconnect with that id in Last-Event-ID to resume right after it; without one, the stream starts when you connect. Replay is best effort: only recent events are retained, and events sent before ids existed have none, so after a long disconnect fetch the payments you are waiting on with GET /v2/payments/{id}. Lines starting with : are comments (a ping every 15 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"}