Authenticate API requests
Base URL
https://lirpay.org/api/v2/integrationCreate API keys in the merchant dashboard. Send the public key and secret on every Integration API request.
Third-party apps can use LirPay Cloud OAuth with merchant-selected permissions. Send Authorization: Bearer lc_at_... without API key headers. OAuth tokens use the permissions selected during consent. The same idempotency rules apply to both credential types.
Send the required headers
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| X-Lirpay-Public-Key | string | header | yes | Public key for the selected environment. |
| X-Lirpay-Secret-Key | string | header | yes | Secret shown once when you create the key. |
curl -sS https://lirpay.org/api/v2/integration/account \
-H "X-Lirpay-Public-Key: lpk_test_a1b2c3d4e5f67890" \
-H "X-Lirpay-Secret-Key: lsk_test_0123456789abcdef0123456789abcdef"Send the secret as a bearer token
You can replace X-Lirpay-Secret-Key with the standard Authorization header.
X-Lirpay-Public-Key: lpk_live_a1b2c3d4e5f67890
Authorization: Bearer lsk_live_0123456789abcdef0123456789abcdefFull merchant access
Every API key, including an existing key, has all merchant permissions in its test or live environment. You do not select individual scopes. Merchant ownership, environment isolation, withdrawal review, and revocation still apply.
OAuth applications receive only the permissions approved by the merchant. A limited OAuth token cannot create an unrestricted API key.
Use idempotency keys
Send Idempotency-Key on every monetary POST request. Repeating the same key and body returns the stored response.
- Reuse the same key only when retrying the same operation
- A different body with the same key returns
409 idempotency_conflict - A concurrent request with the same key returns
409 request_in_progress