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

# Invoices

An invoice is a billing document generated for a customer against a payment or billing event. It provides a record of the amount charged, applicable taxes, discounts, and the final amount payable.

## How Invoices Work

The invoice is generated based on the payment or billing information provided by the merchant.

The typical invoice flow is:

```mermaid theme={null}
flowchart LR

A["Create Payment"] --> B["Payment Processed"]
B --> C["Invoice Generated"]
C --> D["Invoice Available"]
D --> E["Customer Receives Invoice"]
```

***

## Invoice Information

An invoice can contain billing information such as:

| Field                | Description                                                |
| -------------------- | ---------------------------------------------------------- |
| **Invoice ID**       | Unique identifier of the invoice.                          |
| **Customer Details** | Information associated with the customer.                  |
| **Amount**           | Amount associated with the transaction.                    |
| **Discount**         | Discount applied to the payment, if applicable.            |
| **Tax**              | Applicable tax amount.                                     |
| **Total Amount**     | Final amount payable after applicable discounts and taxes. |
| **Invoice Status**   | Current status of the invoice.                             |
| **Invoice Date**     | Date on which the invoice was generated.                   |

***

## Invoice Calculation

The invoice amount can be represented as:

```text theme={null}
Subtotal
- Discount
+ Tax
= Total Amount
```

For example, if the payment amount is ₹2,000 and a fixed discount of ₹100 is applied:

```text theme={null}
Original Amount = ₹2,000
Discount        = ₹100
Tax             = Applicable tax
Total Amount    = Amount after discount + applicable tax
```

***

## Different available Invoices for one time payments

Invoices are created automatically once the payment is successful for one-time payments. Merchants can retrieve individual invoices, retrieve multiple invoices, process refunds, and email invoices to customers. Created invoices can be fetched using below API's:

### 1. Get Invoice

Use the [**Get Invoice** API](https://docs.transactbridge.com/#4f9b7a56-2989-4fd9-b99c-fb5a825c95df) to retrieve the details of a specific invoice.

This can be used when the merchant needs to:

* Retrieve invoice details.
* Check the invoice status.
* View invoice amount and currency.
* Retrieve customer and billing information.
* Check payment or transaction details associated with the invoice.

### 2. Get All Invoice

Use the [**Get All Invoice** API](https://docs.transactbridge.com/#46ff3912-41ef-4be8-ac89-ca1ce5da3a82) to retrieve invoices associated with the merchant.

This can be used when the merchant needs to:

* Display invoices in an internal dashboard.
* Retrieve multiple invoices.
* Track invoice statuses.
* Search or manage invoice records.

### 3. Refund Invoice

Use the [**Refund Invoice** API](https://docs.transactbridge.com/#ed7480f6-f60d-43f7-a01d-f99b37bcee05) when the merchant needs to refund a payment associated with an invoice.

**Typical Use Cases**

* Customer requests a refund.
* Order or service is cancelled.
* Duplicate payment.
* Incorrect amount charged.
* Merchant decides to provide a full or applicable partial refund.

### 4. Email Invoice

Use the [**Email Invoice** API](https://docs.transactbridge.com/#8fcf1aed-340d-44e8-97fe-8006e488154c) to send an invoice to the customer through email.

This can be used when the merchant wants to:

* Send an invoice to the customer's registered email address.
* Resend an invoice.
* Provide the customer with invoice details after payment.
* Share an invoice for record-keeping purposes.
