LirPay
OpenAPI

Integrate with LirPay

Base URL

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

Use the Integration API to create hosted payments, reconcile balances, withdraw funds, convert currencies, and receive signed events.

Choose an environment

Each API key belongs to either the test or live environment. The key determines the environment for every request.

  • test: isolated balances, payments, ledger entries, conversions, withdrawals, rules, and webhook events
  • live: live-environment data and provider calls
  • Test withdrawals complete through the simulator and never call a payout provider

Follow the integration flow

A hosted checkout integration follows this sequence:

  1. Create a test API key with the required scopes.
  2. Read an approved project from GET /projects.
  3. Create a checkout with POST /payment-links.
  4. Track the payment through GET /transactions or webhooks.
  5. Reconcile the settlement balance through GET /balances and GET /ledger-entries.
  6. Create a withdrawal quote, then create the withdrawal from that quote.

Read monetary fields

Financial responses include integer minor units, a formatted decimal string, and the currency precision.

{
  "currency_code": "USDT",
  "amount_minor": 125050,
  "amount": "1250.50",
  "decimals": 2
}

Paginate list responses

Paginated endpoints accept page and limit. Their response includes one pagination object.

{
  "pagination": {
    "total": 47,
    "page": 2,
    "limit": 20,
    "total_pages": 3
  }
}

Handle errors

Every error keeps the compatible error field and adds a stable code, details, and request identifier.

{
  "error": "api key does not have required scope",
  "code": "missing_scope",
  "details": {
    "required_scope": "withdrawals:write"
  },
  "request_id": "778f6767-f3aa-42d1-8612-b9ab1dbcc20e"
}
CodeNameDescription
200OKThe request completed.
201CreatedThe API created the resource.
204No ContentThe API completed the request without a response body.
400Bad RequestA parameter or request body failed validation.
401UnauthorizedThe credentials are missing, revoked, or invalid.
403ForbiddenThe API key lacks the required scope.
404Not FoundThe resource does not exist in this merchant environment.
409ConflictThe idempotency key or resource state conflicts with the request.
429Too Many RequestsThe integration exceeded its rate limit.
500Internal Server ErrorThe request failed inside LirPay and can be retried.

Use the OpenAPI schema

Download the machine-readable schema from the Integration API OpenAPI document.