Skip to Content
ePay.lkDocs
API reference

Payment links

The PaymentLink object and the /v1/payment_links endpoints.

FieldTypeDescription
idstringplink_…
object"payment_link"
codestringShort code used in the URL
urlstringPublic URL, https://beta.pay.epay.lk/l/<code>
titlestring
descriptionstring | null
amountinteger | nullFixed amount, or null when the payer chooses
min_amount / max_amountinteger | nullBounds for payer-chosen amounts
currencyLKR | USD
statusactive | inactive
max_usesinteger | nullUsage limit
use_countintegerTimes used so far
collect_phonebooleanWhether the payer is asked for a phone number
redirect_urlstring | nullWhere payers return after paying
expires_attimestamp | null
created_attimestamp
POST/v1/payment_linksscope payment_links:write
Body parameterTypeDescription
titlestring 1–200, required
descriptionstring ≤ 1000
amountinteger | nullOmit/null for payer-chosen amount
min_amount, max_amountinteger
currencyLKR | USDDefault LKR
max_usesinteger ≤ 1,000,000
collect_phoneboolean
redirect_urlURLhttp(s)
expires_atISO 8601 with offsete.g. 2026-12-31T23:59:59+05:30
Request
curl https://beta.api.epay.lk/v1/payment_links \
  -H "Authorization: Bearer $EPAY_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "title": "Donation", "min_amount": 50000, "max_amount": 5000000 }'
Response 200
{
  "id": "plink_2bV7cW9eR1",
  "object": "payment_link",
  "code": "k3Hq9TzP",
  "url": "https://beta.pay.epay.lk/l/k3Hq9TzP",
  "title": "Donation",
  "description": null,
  "amount": null,
  "min_amount": 50000,
  "max_amount": 5000000,
  "currency": "LKR",
  "status": "active",
  "max_uses": null,
  "use_count": 0,
  "collect_phone": false,
  "redirect_url": null,
  "expires_at": null,
  "created_at": "2026-11-22T10:00:00.000Z"
}

This endpoint doesn't take an Idempotency-Key; if a create times out, check the dashboard before retrying to avoid a duplicate link.

GET/v1/payment_links/:idscope payment_links:read
Request
curl https://beta.api.epay.lk/v1/payment_links/plink_2bV7cW9eR1 -H "Authorization: Bearer $EPAY_SECRET_KEY"

Returns the PaymentLink object.

On this page