> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reconcile Orders, Payments, Refunds and Settlements

> Match your orders, payments and refunds to the settlements credited to your bank account using the Settlement Recon API and Dashboard reports.

Available in
🇮🇳 India

Reconciliation is matching each order, payment and refund in your records to the settlement that Razorpay credits to your bank account. This page is for developers and finance teams who need to trace a transaction from the order to the bank credit. It shows which ID links which record, how the settled amount is calculated, and how to reconcile with the Settlement Recon API or with Dashboard reports.

## How the IDs link together

Every record carries the ID of the record before it. Store these IDs against your own order records so that you can match each row in a settlement.

| ID | Example | Where you find it | What it links |
| - | - | - | - |
| Order id | `order_DEXrnRiR3SNDHA` | `id` on the order. `order_id` on the payment and on each recon row. | The payment to the order it was made against. |
| Order receipt | Your own value | `receipt` on the order. `order_receipt` on each recon row. | The order to your internal record. It is the receipt number you entered while creating the order. |
| Payment id | `pay_DEXrnipqTmWVGE` | `id` on the payment. `entity_id` on a recon row of type `payment`. `payment_id` on a recon row of type `refund` or `transfer`. | A refund or a transfer to the payment it belongs to. On recon rows, `payment_id` is `null` for payments. |
| Refund id | `rfnd_DGRcGzZSLyEdg1` | `id` on the refund. `entity_id` on a recon row of type `refund`. | The refund to its payment, through `payment_id`. |
| Settlement id | `setl_DGlQ1Rj8os78Ec` | `id` on the settlement. `settlement_id` on each recon row. **Settlement ID** in reports. | Each transaction to the settlement it was settled in. |
| UTR | `1568176960vxp0rj` | `utr` on the settlement and in the `settlement.processed` webhook payload. `settlement_utr` on each recon row. | The settlement to the credit in your bank account. Use the UTR to reconcile the funds received against your bank statement. |

Recon rows can also be of type `transfer` or `adjustment`, and each row has a `dispute_id` field for the dispute, if any, on that transaction.

## From order to settlement

1. **Order:** You create an order. The `receipt` you pass is the receipt number that corresponds to the order in your system. Know more about [order states](https://razorpay.com/docs/payments/orders#order-states).
2. **Payment:** The customer pays against the order, and the payment carries the `order_id`. After the payment is captured successfully, the order moves to the `paid` state. A `captured` payment is settled to your account as per the settlement schedule. Know more about the [payment life cycle](https://razorpay.com/docs/payments/payments#payment-life-cycle).
3. **Refund:** If you refund a payment, the refund carries the `payment_id` of the payment for which it was initiated. Refunds you issue to your customers are deducted from the settlement. The order continues to be in the `paid` state even if the payment is refunded.
4. **Settlement:** Razorpay automatically settles your captured payments on your settlement cycle. There is no "create settlement" call. Each settlement generated has a unique settlement id and the amount settled, and its status is `created`, `processed` or `failed`.
5. **Bank credit:** The settlement has a Unique Transaction Reference (UTR) number, which you can use to track that settlement in your bank account.

This page does not cover when a settlement is credited to your bank account. For the settlement cycle and what each settlement state means, see [About Settlements](https://razorpay.com/docs/payments/settlements#settlement-states).

## How the settled amount is calculated

A settlement is the net amount credited to your bank account, not the gross payment you collected.

**Amount settled = Payment ± Adjustment - Refunds - Fee - Tax - Transfer**

* **Payment:** the gross payment amount being settled, before deductions.
* **Adjustment:** adjustments to transactions, which can be a credit or a debit.
* **Refunds:** refunds you have issued to your customers, deducted from the settlement.
* **Fee:** Razorpay's fee for the transactions, excluding GST.
* **Tax:** GST charged on the Razorpay fee.
* **Transfer:** transfers (payouts) made to your linked accounts, if any.

The Dashboard shows the break-up for each settlement. For example:

| Transaction detail | Amount (₹) |
| - | - |
| Payment | 1,000.00 |
| Refunds | -100.00 |
| Fee | -20.00 |
| Tax (GST on the fee) | -3.60 |
| **Total settled to your account** | **876.40** |

To see this break-up for a settlement, check the [settlements break-up](https://razorpay.com/docs/payments/settlements/dashboard.md#settlements-break-up-description) on the Dashboard.

## Reconcile with the Settlement Recon API

The [Settlement Recon API](https://razorpay.com/docs/api/settlements/fetch-recon.md) returns a list of all transactions, such as payments, refunds, transfers and adjustments, settled to your account on a particular day or month.

1. Subscribe to the `settlement.processed` webhook and verify the webhook signature on every event before acting on it. Know how to [validate webhooks](https://razorpay.com/docs/webhooks/validate-test.md#validate-webhooks).

2. Fetch your settlements periodically with [Fetch All Settlements](https://razorpay.com/docs/api/settlements/fetch-all.md). Only successful settlements fire a webhook. A `failed` settlement sends no event, so this is how you detect settlements that did not reach `processed`.

3. Call the recon API for the date you want to reconcile. `year` and `month` are required. `day` is optional; omit it to reconcile the whole month.

   ```
   GET /v1/settlements/recon/combined?year=&month=&day=
   ```

   The following sample from the API reference fetches the recon details for a particular day:

   ```bash Curl theme={null}
   curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
   -X GET \
   https://api.razorpay.com/v1/settlements/recon/combined?year=2022&month=06&day=11 \
   ```

4. Page through the response with `count` and `skip` to avoid missing rows when there are many transactions. `count` accepts values from `1` to `1000`.

5. Match each row to your records. The response returns one row per transaction, each carrying the `settlement_id` and the settlement UTR. Reconcile by `settlement_id` and date against your records.

6. Fetch the settlement with [Fetch Settlement With ID](https://razorpay.com/docs/api/settlements/fetch-with-id.md) to get its `amount`, `status`, `fees`, `tax` and `utr`.

Use these fields on each recon row:

| Field | What it tells you |
| - | - |
| `entity_id` | The unique identifier of the transaction that has been settled. |
| `type` | The type of transaction: `payment`, `refund`, `transfer` or `adjustment`. |
| `debit` | The amount, in currency subunits, that has been debited from your account. |
| `credit` | The amount, in currency subunits, that has been credited to your account. |
| `amount` | The total amount, in currency subunits, debited or credited from your account. |
| `fee` | The fees, in currency subunits, charged to process the transaction. |
| `tax` | The tax on the fee, in currency subunits, charged to process the transaction. |
| `settled` | Whether the transaction has been settled. |
| `settled_at` | Unix timestamp when the transaction was settled. |
| `settlement_id` | The unique identifier of the settlement transaction. |
| `settlement_utr` | The unique reference number linked to the settlement. |
| `payment_id` | The payment linked to a `refund` or `transfer` row. It is `null` for payments. |
| `order_id` | The order id linked to the payment made by the customer that has been settled. |
| `order_receipt` | The receipt number entered while creating the order. |
| `dispute_id` | The unique identifier of the dispute, if any, for this transaction. |

Recon rows appear as soon as the settlement is `created`, so the UTR can be empty until the settlement is `processed`. Amounts are in the smallest currency unit (paise).

For the full response and the error list, see the [Settlement Recon API reference](https://razorpay.com/docs/api/settlements/fetch-recon.md).

## Reconcile with Dashboard reports

If you do not use the API, download reports from the Dashboard. These reports can be used for accounting and reconciliation purposes.

| Report | What it contains |
| - | - |
| Settlement Recon | A detailed list of all transactions (payments, refunds, and adjustments) against every settlement in the selected time range. |
| Settlements | A list of the settlements in the selected time range. You can download it to view the UTR of each settlement. |
| Combined Report | All transactions (payments, refunds, adjustments and transfers) and settlements made in the selected time range. |

To download a report:

1. Log in to the Dashboard and click **Reports**.
2. Click **Download Report**.
3. Click **What report is this?** to select the report type and format.
4. To select the time frame of the report, click **What will you receive in this report?**.
5. Click **Yes** on the **Do you want this report in an email?** section to add the email recipients with whom you want to share the report and click **Start Download**.
6. Track the status and download the report in the **Downloads** section.

The Settlement Recon report contains transactions and the corresponding settlement ids.

If your account has segregated balances, settlement reports also include **Channel Type** and **Balance Account id**. You can filter reports by channel type to reconcile settlements for each balance separately.

Sample files for each report are on the [list of reports](https://razorpay.com/docs/payments/dashboard/reports/list-of-reports.md#payment-gateway) page. You can also [schedule reports](https://razorpay.com/docs/payments/dashboard/reports.md#schedule-reports) to receive them by email.

## Common mistakes to avoid

| Mistake | What goes wrong | What to do |
| - | - | - |
| Hardcoding the UTR format | Reconciliation breaks when the UTR format differs from what you expect. | Reconcile by `settlement_id` and date, not by UTR shape. |
| Relying only on the webhook to know the outcome | A `failed` settlement fires no event, so a settlement that did not process looks like nothing happened. | Fetch `GET /v1/settlements/` to detect settlements that did not reach `processed`. |
| Reading an empty UTR as a failure | Recon rows appear as soon as a settlement is `created`, before it is `processed`, so the UTR can be empty. | Reconcile once the settlement is `processed` to get the UTR, and page through the response with `count` and `skip`. |

## Related Information

* [About Settlements](https://razorpay.com/docs/payments/settlements)
* [Settlements - Dashboard Actions](https://razorpay.com/docs/payments/settlements/dashboard.md)
* [Settlements APIs](https://razorpay.com/docs/payments/settlements/apis.md)
* [Settlement Recon API reference](https://razorpay.com/docs/api/settlements/fetch-recon.md)
* [Settlements Webhook Events](https://razorpay.com/docs/webhooks/settlements.md)
* [Settlements: How to Integrate](https://razorpay.com/docs/payments/payment-gateway/s2s-integration/settlements/how-to-integrate.md)
* [Reports](https://razorpay.com/docs/payments/dashboard/reports.md)
* [Settlement FAQs](https://razorpay.com/docs/payments/settlements/faqs.md)
