API Keys
An API key identifies your merchant account. Every request must carry it.Where to get your key
Go to your dashboard → Settings → API Keys. You can generate multiple keys and rotate them independently.How to send it
Bearer tokens (JWT)
Some endpoints — particularly those that act on behalf of a specific user (e.g., initiating a payment from a user’s wallet) — require a short-lived JWT in addition to the API key. The token is obtained by authenticating the user via the/auth/web endpoint:
OTP tokens
The four-step payment flow adds a third layer: an OTP-derived token that authorizes the specific transaction.
In the browser SDK, the token is held in memory in the
LyelPay instance (not persisted). It is scoped to one transaction.
Authentication by SDK
Security checklist
- Store API keys in environment variables, never in source code
- Use HTTPS for all requests (enforced by the API)
- Validate webhook signatures on your server before processing events (see Webhooks)
- Rotate API keys periodically from the dashboard