Skip to Content
ePay.lkDocs
API reference

Events

The Event object — the same envelope delivered to webhooks — and the /v1/events endpoints for reconciliation.

The Event object

FieldTypeDescription
idstringevt_… — also sent as the Epay-Event-Id webhook header
object"event"
typestringe.g. payment.succeeded — see event types
created_attimestampWhen the event happened
livemodebooleantrue in production
environmentproduction | sandbox
data.objectobjectSnapshot of the Payment, Refund, Payout or Invoice at the time of the event

List events

GET/v1/eventsscope events:read
Query parameterDescription
typeOnly events of this type, e.g. payment.succeeded
limit1–100, default 20
cursorFrom next_cursor
Request
curl "https://beta.api.epay.lk/v1/events?type=payment.succeeded&limit=100" \
  -H "Authorization: Bearer $EPAY_SECRET_KEY"
Response 200
{
  "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
Request
curl https://beta.api.epay.lk/v1/events/evt_6yR2mK9pQ4dL -H "Authorization: Bearer $EPAY_SECRET_KEY"

On this page