LirPay
OpenAPI

Authenticate API requests

Base URL

https://lirpay.org/api/v2/integration

Create API keys in the merchant dashboard. Send the public key and secret on every Integration API request.

Send the required headers

ParameterTypeInRequiredDescription
X-Lirpay-Public-KeystringheaderyesPublic key for the selected environment.
X-Lirpay-Secret-KeystringheaderyesSecret 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_0123456789abcdef0123456789abcdef

Assign scopes

Scopes limit each key to the operations that its integration needs. Existing keys keep project and payment permissions only.

ParameterTypeInRequiredDescription
projects:readscopebodynoRead approved projects and project payment methods.
payments:readscopebodynoRead payment links and transactions.
payments:writescopebodynoCreate and cancel payment links, and refund Telegram Stars payments.
balances:readscopebodynoRead balances and ledger entries.
withdrawals:readscopebodynoRead methods, create quotes, and read withdrawal history.
withdrawals:writescopebodynoCreate, cancel, and automate withdrawals. Disabled by default.
conversions:readscopebodynoRead pairs, create quotes, and read conversions.
conversions:writescopebodynoExecute conversions and manage conversion rules.
webhooks:readscopebodynoRead webhook configuration and event history.
webhooks:writescopebodynoConfigure, test, rotate, and redeliver webhooks.
settings:readscopebodynoRead integration settings.
settings:writescopebodynoUpdate integration settings.
reports:readscopebodynoRead summary reports.

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