> For the complete documentation index, see [llms.txt](https://central-bank-of-libya.gitbook.io/devportal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://central-bank-of-libya.gitbook.io/devportal/lypay/accounting-and-settlement-in-lypay.md).

# Accounting & Settlement in LYPay

Accounting entries, settlement flows, reversals, and fee allocation for intra-bank and inter-bank LYPay transactions.

LYPay enables instant fund transfers while supporting structured financial accounting and settlement. This page describes the **accounting schema, general-ledger entries, settlement mechanisms, reversals, and fee allocation** for intra-bank and inter-bank transactions.

{% hint style="info" %}
The accounting model is designed to ensure that each transaction is recorded, classified, settled, and reconciled consistently across participating institutions.
{% endhint %}

## 1. Financial accounts

Each LYPay transaction involves multiple financial accounts, including:

* **Payer’s account — customer account**
* **Beneficiary’s account — customer account**
* **Bank General Ledger — GL accounts**
* **Settlement & reconciliation accounts**
* **Fee-distribution accounts — banks and service providers**

## 2. Intra-bank transfers

In intra-bank transfers, funds move between accounts within the same financial institution.

### 2.1 Standard intra-bank transfer

Example: A user transfers **1,000 LYD**, and a total **charge of 10 LYD** is applied.

| **Transaction Type**    | **Description**                 | **Amount (LYD)** | **Debit**       | **Credit**             |
| ----------------------- | ------------------------------- | ---------------: | --------------- | ---------------------- |
| **Payer Account**       | Deducting transfer amount & fee |            1,010 | Payer’s Account | Bank GL                |
| **Bank GL**             | Allocating fee for settlement   |               10 | Bank GL         | Fee Settlement Account |
| **Beneficiary Account** | Crediting the transfer amount   |            1,000 | Bank GL         | Beneficiary’s Account  |

### 2.2 Reversal of intra-bank transfer

If the transaction is reversed using the reference number:

| **Transaction Type**       | **Description**           | **Amount (LYD)** | **Debit**              | **Credit**      |
| -------------------------- | ------------------------- | ---------------: | ---------------------- | --------------- |
| **Beneficiary Account**    | Reversing transfer amount |            1,000 | Beneficiary’s Account  | Bank GL         |
| **Fee Settlement Account** | Reversing charged fees    |               10 | Fee Settlement Account | Bank GL         |
| **Bank GL**                | Crediting original payer  |            1,010 | Bank GL                | Payer’s Account |

### 2.3 Settlement of fees

Fees are distributed among the relevant parties:

| **Transaction Type** | **Description**                   | **Amount (LYD)** | **Debit**      | **Credit**             |
| -------------------- | --------------------------------- | ---------------: | -------------- | ---------------------- |
| **Fee Settlement**   | Allocating bank’s share           |                5 | Fee Settlement | Bank Revenue Account   |
| **Fee Settlement**   | Allocating service-provider share |                5 | Fee Settlement | Payment Switch Account |

## 3. Inter-bank transfers

Inter-bank transfers involve movement of funds between two different financial institutions.

### 3.1 Standard inter-bank transfer

Example: A user at **Bank A** sends **1,000 LYD** to a beneficiary at **Bank B**, with a total **charge of 10 LYD**.

| **Transaction Type** | **Description**                 | **Amount (LYD)** | **Debit**       | **Credit**             |
| -------------------- | ------------------------------- | ---------------: | --------------- | ---------------------- |
| **Payer Account**    | Deducting transfer amount & fee |            1,010 | Payer’s Account | Bank A GL              |
| **Bank A GL**        | Transferring amount to Bank B   |            1,000 | Bank A GL       | Bank B GL              |
| **Bank B GL**        | Crediting beneficiary’s account |            1,000 | Bank B GL       | Beneficiary’s Account  |
| **Bank A GL**        | Allocating fees for settlement  |               10 | Bank A GL       | Fee Settlement Account |

### 3.2 Reversal of inter-bank transfer

If the transaction is reversed:

| **Transaction Type**       | **Description**            | **Amount (LYD)** | **Debit**              | **Credit**      |
| -------------------------- | -------------------------- | ---------------: | ---------------------- | --------------- |
| **Beneficiary Account**    | Reversing credited amount  |            1,000 | Beneficiary’s Account  | Bank B GL       |
| **Fee Settlement Account** | Reversing transaction fees |               10 | Fee Settlement Account | Bank B GL       |
| **Bank B GL**              | Returning funds to Bank A  |            1,010 | Bank B GL              | Bank A GL       |
| **Bank A GL**              | Crediting payer’s account  |            1,010 | Bank A GL              | Payer’s Account |

### 3.3 Inter-bank fee settlement

Fees are allocated among participating entities:

| **Transaction Type** | **Description**                   | **Amount (LYD)** | **Debit**      | **Credit**             |
| -------------------- | --------------------------------- | ---------------: | -------------- | ---------------------- |
| **Fee Settlement**   | Allocating Bank A’s share         |              2.5 | Fee Settlement | Bank A Revenue Account |
| **Fee Settlement**   | Allocating Bank B’s share         |              2.5 | Fee Settlement | Bank B Revenue Account |
| **Fee Settlement**   | Allocating service-provider share |                5 | Fee Settlement | Payment Switch Account |

## 4. Key takeaways

* **Proper ledger entries** support transparent transaction recording.
* **Fee settlement** supports defined revenue distribution between banks and service providers.
* **Reversals** follow structured accounting processes to maintain transaction integrity.
* Participating banks should **regularly reconcile accounting entries** to maintain accuracy.

## Related documentation

* [LYPay Overview](/devportal/lypay/lypay-instant-payment-system.md)
* [Technical Overview](/devportal/lypay/lypay-instant-payment-system-technical-overview.md)
* [API Documentation](/devportal/lypay/api-documentation.md)

## Contributors

This accounting schema was prepared by:

* **Abdulkhalik Alatrash**
* **Esra Endisha**
