LunaPay® · Documentation

From your first payment to your own integration.

Download OpenAPI 3.1

Reviewed on 2026-09-19

Integrate the Pro API

Server authentication, least privilege and separate environments.

Run examples on your server with your own sandbox data. Never include keys in the frontend. This documentation does not enable live operations.

Keys and scopes

Send lp_sandbox_… or lp_live_… keys as Authorization: Bearer. Tenant and environment come from the key, not a client-supplied ID. Owner/admin/developer may issue keys with MFA; only owner/admin may delegate financial scopes. A valid Pro contract is required.

Idempotency and errors

All POST requests require an Idempotency-Key of 8–200 characters. Reusing a key with another payload in financial creation causes a conflict. Retain requestId for diagnostics. Error shape: {error:{code,message,requestId}}. HTTP 400 validates input, 401 authentication, 403 permissions/plan, 404 resource, 409 conflict, 429 limit and 500 internal error.

Pagination and limits

Lists accept limit 1–100, default 50, and before with the last received UUID. Order is descending by creation and ID. The current limit is 300 requests per minute per merchant and environment. Apply backoff; never retry charges blindly.

Server example

Use private variables and check HTTP status before processing data. The documentation has no control to execute live requests.

Server example
const key = process.env.LUNAPAY_API_KEY;
if (!key) throw new Error('Missing server API key');
const response = await fetch('https://payments.lunapay.ar/v1/payments?limit=50', {
  headers: { Authorization: 'Bearer ' + key },
});
const payload = await response.json();
if (!response.ok) throw new Error(payload.error?.code || 'API_ERROR');
const payments = payload.data;

Development contract · source: Payments · 9f82d06

Next guideVerified webhooks