Overview
Welcome to the LerionPay Enterprise Gateway. This documentation provides a comprehensive overview of how to interact with our infrastructure. Our system is built on an Infinite Liquidity Engine that ensures your business stays agile, non-custodial, and performant.
- Deterministic Routing: Our engine maps the payment to a unique destination address derived specifically for that transaction.
- Non-Custodial: Funds are routed through blockchain rails directly to our provider layer.
- Infinite Liquidity: Abstracting the complexity of multiple blockchains (ETH, BSC, Polygon, TRON) to provide a unified fiat-pegged checkout.
Authentication & Security
All requests to the LerionPay Gateway must be authenticated using the X-API-Key header.
Request Headers
X-API-Key: sk_live_your_secret_key_here
Content-Type: application/json
Create Invoice POST
Initializes a new payment session. Generates a payment intent for your customer.
/api/v1/charge.php
| Parameter | Type | Req | Description |
|---|---|---|---|
| fiat_amount | Decimal | Yes | Amount to charge in base currency. |
| fiat_currency | String | No | Defaults to 'USD'. |
| merchant_order_id | String | Yes | Your internal reference ID (e.g., 'ORD-5502'). |
Get Payment Status POST
Poll the state of a specific invoice generated by the gateway.
/api/gate.php
| Parameter | Type | Req | Description |
|---|---|---|---|
| action | String | Yes | Must be get_payment_status |
| invoice_id | String | Yes | The LerionPay invoice identifier. |
Webhook Integrations
Webhooks are essential for automated order fulfillment. LerionPay sends a POST request to your pre-configured endpoint whenever an invoice status changes (e.g., from waiting to finished).
Verification Logic (PHP Example)
$signature = $_SERVER['HTTP_X_LERIONPAY_SIGNATURE'];
$payload = file_get_contents('php://input');
$computed = hash_hmac('sha256', $payload, $webhook_secret);
if (hash_equals($computed, $signature)) {
// Payload is authentic, process blockchain receipt
}