> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-management/capital/remittance-invoices/introduction.md

## Article Content:

# About the Remittance Invoices API

Wix Capital is a merchant cash advance product: a merchant receives a lump sum upfront in exchange for a share of their future sales. A remittance invoice is the daily record of how much of a merchant's sales goes towards repaying that advance.

With the Remittance Invoices API, you can:

- Retrieve a single remittance invoice by ID.
- Query remittance invoices, filtered by cash advance agreement, sales day, creation date, amount, and more.
- Break each remittance down into the portion applied to the advanced amount and the portion applied to the fee.
- Track which remittances have been collected and which are still outstanding.

## How remittance invoices work

A cash advance agreement sets a remittance rate: the percentage of each day's sales that goes towards repaying the advance. The rate is fixed for the life of the agreement and is stored on the agreement itself.

A remittance invoice is calculated at the beginning of each day, covering the previous day's sales in the agreement's timezone. A day without sales produces no invoice, so gaps in the sequence are expected.

An invoice records an amount that's due to be collected, not money that has already moved. When the funds are collected, the invoice is linked to a financial operation and `financialOperationId` is populated. An invoice with no `financialOperationId` has been calculated but not yet collected.

The `last` field marks the final invoice issued for an agreement. It doesn't indicate that the remittance has been collected.

## Amount breakdown

Every remittance invoice splits its `amount` into 2 portions that always add up to it:

- `cashAdvanceAmountPortion`: the part applied to the principal that was advanced.
- `cashAdvanceFeePortion`: the part applied to the agreement's fee.

None of these values is negative, and a portion can be zero once the principal or the fee it applies to has been fully repaid.

## Before you begin

It's important to note the following points before starting to code:

- Remittance invoices are read-only. They're issued automatically as part of the cash advance repayment cycle.
- A remittance invoice belongs to a single site. Invoices belonging to other sites can't be retrieved or queried.
- Don't infer the agreement's remittance rate from the ratio of `amount` to `salesAmount`. The rate is fixed on the cash advance agreement, and the final invoice for an agreement can be capped by the amount still outstanding.

## Use cases

- [Show a merchant their remittance history](https://dev.wix.com/docs/api-reference/business-management/capital/remittance-invoices/sample-flows.md#show-a-merchant-their-remittance-history)
- [Reconcile a collection with the remittances it covers](https://dev.wix.com/docs/api-reference/business-management/capital/remittance-invoices/sample-flows.md#reconcile-a-collection-with-the-remittances-it-covers)

## Terminology

- **Merchant cash advance**: A lump sum paid to a merchant upfront in exchange for a share of their future sales. It isn't a loan, and it has no fixed repayment schedule.
- **Cash advance agreement**: The agreement covering a single advance. It holds the remittance rate and the amount still outstanding.
- **Remittance**: The share of a day's sales that goes towards repaying an advance.
- **Remittance rate**: The percentage of each day's sales collected as a remittance. Fixed for the life of an agreement.
- **Remittance invoice**: The daily record of a remittance that's due to be collected for a given sales day.
- **Sales day**: The day whose sales a remittance invoice covers, in the cash advance agreement's timezone.
- **Financial operation**: A movement of money between Wix Capital and the merchant. A remittance invoice is linked to a financial operation once the remittance is collected.

@sdk_package_setup