API reference
Events
The Event object — the same envelope delivered to webhooks — and the /v1/events endpoints for reconciliation.
The Event object
| Field | Type | Description |
|---|---|---|
id | string | evt_… — also sent as the Epay-Event-Id webhook header |
object | "event" | |
type | string | e.g. payment.succeeded — see event types |
created_at | timestamp | When the event happened |
livemode | boolean | true in production |
environment | production | sandbox | |
data.object | object | Snapshot of the Payment, Refund, Payout or Invoice at the time of the event |
List events
GET/v1/eventsscope events:read
| Query parameter | Description |
|---|---|
type | Only events of this type, e.g. payment.succeeded |
limit | 1–100, default 20 |
cursor | From next_cursor |
curl "https://beta.api.epay.lk/v1/events?type=payment.succeeded&limit=100" \
-H "Authorization: Bearer $EPAY_SECRET_KEY"{
"object": "list",
"data": [
{
"id": "evt_6yR2mK9pQ4dL",
"object": "event",
"type": "payment.succeeded",
"created_at": "2026-11-22T10:16:41.000Z",
"livemode": true,
"environment": "production",
"data": { "object": { "id": "pay_8Hq2LxV0cT4mZr7N", "object": "payment", "status": "succeeded" } }
}
],
"has_more": false,
"next_cursor": null
}Use this to catch up after your webhook endpoint was down: page through events newer than the last one you processed and run them through the same idempotent handler.
Retrieve an event
GET/v1/events/:idscope events:read
curl https://beta.api.epay.lk/v1/events/evt_6yR2mK9pQ4dL -H "Authorization: Bearer $EPAY_SECRET_KEY"
