Integrate with LirPay
Base URL
https://lirpay.org/api/v2/integrationUse 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 eventslive: 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:
- Create a test API key with the required scopes.
- Read an approved project from GET /projects.
- Create a checkout with POST /payment-links.
- Track the payment through GET /transactions or webhooks.
- Reconcile the settlement balance through GET /balances and GET /ledger-entries.
- 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"
}| Code | Name | Description |
|---|---|---|
| 200 | OK | The request completed. |
| 201 | Created | The API created the resource. |
| 204 | No Content | The API completed the request without a response body. |
| 400 | Bad Request | A parameter or request body failed validation. |
| 401 | Unauthorized | The credentials are missing, revoked, or invalid. |
| 403 | Forbidden | The API key lacks the required scope. |
| 404 | Not Found | The resource does not exist in this merchant environment. |
| 409 | Conflict | The idempotency key or resource state conflicts with the request. |
| 429 | Too Many Requests | The integration exceeded its rate limit. |
| 500 | Internal Server Error | The request failed inside LirPay and can be retried. |
Use the OpenAPI schema
Download the machine-readable schema from the Integration API OpenAPI document.