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.
| Status | Meaning |
|---|---|
draft | Saved but not sent; no public page yet |
open | Sent and payable. Shown as Overdue after the due date (it can still be paid) |
paid | Paid in full through the checkout |
void | Canceled by you; the link no longer accepts payment |
Integrating
- The resulting payment has
source: "invoice"andinvoice_idset, and sends the normalpayment.*events. - When an invoice is paid you also receive
invoice.paidwith the invoice object indata.object, includingnumber,total,payment_idandpaid_at. - Amounts follow the same rules as everywhere else: integer minor units.

