Skip to Content
ePay.lkDocs

Invoices

Itemised invoices created in the dashboard, emailed to your customer with a public link they can pay online.

Invoices are created and sent from the merchant dashboard (Invoices → New invoice). There is no /v1 endpoint for creating invoices yet; you integrate with them through webhooks and payments.

What your customer gets

When you send an invoice (status open), the customer receives an email with a link to its public page:

https://beta.pay.epay.lk/i/<code>

The page shows your business, the invoice number, line items, subtotal, discount, tax, total and due date, with Print / Save PDF and Pay buttons. Paying opens the regular hosted checkout for the invoice total. Once paid, the page shows the payment date; voided invoices can no longer be paid.

StatusMeaning
draftSaved but not sent; no public page yet
openSent and payable. Shown as Overdue after the due date (it can still be paid)
paidPaid in full through the checkout
voidCanceled by you; the link no longer accepts payment

Integrating

  • The resulting payment has source: "invoice" and invoice_id set, and sends the normal payment.* events.
  • When an invoice is paid you also receive invoice.paid with the invoice object in data.object, including number, total, payment_id and paid_at.
  • Amounts follow the same rules as everywhere else: integer minor units.

On this page