# Invoices

Use invoices to bill for the goods or services that you provide.
If your invoice includes subscription items, it also includes the corresponding service periods and prices.

## Retrieve invoices

 - [GET /invoices](https://www.rebilly.com/docs/dev-docs/api/invoices/getinvoicecollection.md): Retrieves a list of invoices.

## Create an invoice

 - [POST /invoices](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoice.md): Creates an invoice.

## Retrieve an invoice

 - [GET /invoices/{id}](https://www.rebilly.com/docs/dev-docs/api/invoices/getinvoice.md): Retrieves an invoice with a specified ID.

## Upsert an invoice

 - [PUT /invoices/{id}](https://www.rebilly.com/docs/dev-docs/api/invoices/putinvoice.md): Creates or updates (upserts) an invoice with a specified ID.

## Retrieve invoice items

 - [GET /invoices/{id}/items](https://www.rebilly.com/docs/dev-docs/api/invoices/getinvoiceitemcollection.md): Retrieves invoice items with a specified invoice ID.

## Create an invoice item

 - [POST /invoices/{id}/items](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoiceitem.md): Creates an invoice item.

## Retrieve an invoice item

 - [GET /invoices/{id}/items/{itemId}](https://www.rebilly.com/docs/dev-docs/api/invoices/getinvoiceitem.md): Retrieves an invoice item.

## Update an invoice item

 - [PUT /invoices/{id}/items/{itemId}](https://www.rebilly.com/docs/dev-docs/api/invoices/putinvoiceitem.md): Updates an invoice item.

## Delete an invoice item

 - [DELETE /invoices/{id}/items/{itemId}](https://www.rebilly.com/docs/dev-docs/api/invoices/deleteinvoiceitem.md): Deletes an invoice item.

## Issue an invoice

 - [POST /invoices/{id}/issue](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoiceissuance.md): Issues an invoice with a specified ID.
The invoice must be in draft status.

## Abandon an invoice

 - [POST /invoices/{id}/abandon](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoiceabandonment.md): Abandons an invoice with a specified ID.

## Void an invoice

 - [POST /invoices/{id}/void](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoicevoid.md): Voids an invoice with a specified ID.

## Recalculate an invoice

 - [POST /invoices/{id}/recalculate](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoicerecalculation.md): Recalculates shipping rates, taxes, and discounts on an invoice with a specified ID.

One use case for this operation to apply a revoked coupon,
or coupon that is redeemed by a customer after the invoice is issued.

## Reissue an invoice

 - [POST /invoices/{id}/reissue](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoicereissuance.md): Reissues an invoice with a specified ID.
The status of the invoice must be unpaid, partially paid, past due or abandoned.

## Retrieve transaction amounts allocations

 - [GET /invoices/{id}/transaction-allocations](https://www.rebilly.com/docs/dev-docs/api/invoices/getinvoicetransactionallocationcollection.md): Retrieves amounts from a transaction that are allocated as invoice payments.

## Allocate customer credit balance to an invoice

 - [POST /invoices/{id}/allocate-credit-balance](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoiceallocatecreditbalance.md): Allocates existing allocatable credit memos related to the invoice customer.
Specific credit memos cannot be provided in the request and are selected automatically.
Allocation can be capped with amount.
Credit memos are applied automatically in the specified allocation order.
If no order is specified, oldest-first is used.

## Apply a transaction to an invoice

 - [POST /invoices/{id}/transaction](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoicetransaction.md): Applies a transaction to an invoice.
The invoice status must be unpaid, and the transaction must have a non-zero unused amount.

## Invoice tax calculation failed

 - [POST invoice-tax-calculation-failed](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-tax-calculation-failed.md)

## Invoice abandoned

 - [POST invoice-abandoned](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-abandoned.md)

## Invoice created

 - [POST invoice-created](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-created.md)

## Invoice issued

 - [POST invoice-issued](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-issued.md)

## Invoice modified

 - [POST invoice-modified](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-modified.md)

## Invoice paid

 - [POST invoice-paid](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-paid.md)

## Invoice partially paid

 - [POST invoice-partially-paid](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-partially-paid.md)

## Invoice refunded

 - [POST invoice-refunded](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-refunded.md)

## Invoice partially refunded

 - [POST invoice-partially-refunded](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-partially-refunded.md)

## Invoice past due

 - [POST invoice-past-due](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-past-due.md)

## Invoice past due reminder

 - [POST invoice-past-due-reminder](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-past-due-reminder.md)

## Invoice reissued

 - [POST invoice-reissued](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-reissued.md)

## Invoice voided

 - [POST invoice-voided](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-voided.md)

## Renewal invoice payment canceled

 - [POST renewal-invoice-payment-canceled](https://www.rebilly.com/docs/dev-docs/api/invoices/renewal-invoice-payment-canceled.md)

## Renewal invoice payment declined

 - [POST renewal-invoice-payment-declined](https://www.rebilly.com/docs/dev-docs/api/invoices/renewal-invoice-payment-declined.md)

