Skip to Content
ePay.lkDocs

Introduction

ePay is a Sri Lankan internet payment gateway. Accept card and LankaQR payments through a hosted checkout, with refunds, payment links, invoices and signed webhooks.

The ePay API is a REST API with JSON request and response bodies. Your server talks to it with a secret key; your payers only ever see ePay's hosted checkout page. You never collect card numbers yourself.

How a payment works

Your server creates a payment. Call POST /v1/payments with the amount in minor units (125000 = LKR 1,250.00). ePay returns the payment with a one-time checkout_url.

Redirect the payer to checkout_url. On beta.pay.epay.lk they choose a payment method. Card details are entered on the acquiring bank's 3-D Secure page — never on your site and never on ePay's checkout page.

The payer comes back to your return_url with payment_id, status and order_id query parameters. Treat these as a hint to show the right page, not as proof of payment.

Confirm on your server. Fulfil the order when you receive the signed payment.succeeded webhook, or after checking GET /v1/payments/:id yourself.

Hostnames

SurfaceProductionSandboxWho uses it
REST APIhttps://beta.api.epay.lkhttps://beta.sandbox-api.epay.lkYour server (secret key)
Hosted checkouthttps://beta.pay.epay.lkhttps://beta.sandbox-pay.epay.lkYour payers' browsers
Merchant dashboardhttps://beta.merchant.epay.lkhttps://beta.sandbox-merchant.epay.lkYour team
Legacy form-POST gatewayhttps://beta.ipg.epay.lkhttps://beta.sandbox-ipg.epay.lkExisting form-POST integrations
Bank simulator—https://beta.sandbox-bank.epay.lkSandbox test payments only

Production and sandbox are completely separate deployments with separate accounts, keys and data.

Conventions

  • JSON, snake_case. Send Content-Type: application/json.
  • Amounts are integers in minor units. LKR has two decimals, so 125000 means LKR 1,250.00. Never send decimals or strings.
  • Currency is LKR by default; USD is accepted where enabled for your account.
  • Timestamps are ISO 8601 strings in UTC, e.g. 2026-11-22T10:15:00.000Z.
  • IDs are prefixed by type: pay_… (payment), re_… (refund), plink_… (payment link), evt_… (event).
  • Errors always use the same envelope and include a request_id — quote it when you contact support.

Where to next

On this page