> 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: Standalone Invoice Payment Lifecycle

## Article: Standalone Invoice Payment Lifecycle

## Article Link: https://dev.wix.com/docs/api-reference/business-management/get-paid/invoices/standalone-invoice-payment-lifecycle.md

## Article Content:

# Standalone Invoice Lifecycle

This article describes the lifecycle of `STANDALONE` type invoices—invoices you create independently, as opposed to order invoices, which are created automatically by Wix eCommerce for existing orders. When the first payment is made, a Wix eCommerce order is created automatically and stored in `reference.standaloneReference.orderId` to process all payments for the invoice.

Invoices move linearly from `DRAFT` through publication to `PAID`. At any point after publishing, an invoice can also be voided.

## Statuses

| Status | Description |
|--------|-------------|
| `DRAFT` | Initial state. The invoice can be updated before an invoice number is allocated. |
| `PUBLISHING` | The invoice is being assigned a number. The invoice can't be updated. |
| `PUBLISHED` | The invoice is finalized with an allocated number and is ready for payment. The invoice can be updated. |
| `PARTIALLY_PAID` | At least 1 payment has been received but the invoice isn't fully paid. The invoice can be updated. |
| `PAID` | The invoice is fully paid. The invoice can't be updated. |
| `VOIDED` | The invoice is canceled and is no longer valid. Any payments made before voiding are preserved for the audit trail. |

## Available actions

Available actions are determined by the invoice's current status.

| Invoice status   | Available actions                                                                                     | Restrictions                                                          |
|------------------|-------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|
| `DRAFT`          | `DELETE`, `UPDATE`, `PUBLISH`, `GENERATE_PDF_DOCUMENT`                                                | Can't be archived. To remove a draft invoice, delete it.              |
| `PUBLISHING`     | `ARCHIVE`, `GENERATE_PDF_DOCUMENT`, `MARK_AS_SENT`, `MARK_AS_VIEWED`                                  | Invoice content can't be updated.                                                                                                 |
| `PUBLISHED`      | `UPDATE`, `PAY`, `SEND`, `VOID`, `ARCHIVE`, `GENERATE_PDF_DOCUMENT`, `MARK_AS_SENT`, `MARK_AS_VIEWED` | Invoice content can be fully updated except `presetProperties.presetId`.                                                          |
| `PARTIALLY_PAID` | `UPDATE`, `PAY`, `SEND`, `VOID`, `ARCHIVE`, `GENERATE_PDF_DOCUMENT`, `MARK_AS_SENT`, `MARK_AS_VIEWED` | Invoice content can be fully updated except `customerInfo`, `shippingInfo`, `businessDetails`, `regionalProperties`, `deposit`, `presetProperties.presetId`. |
| `PAID`           | `SEND`, `VOID`, `ARCHIVE`, `GENERATE_PDF_DOCUMENT`, `MARK_AS_SENT`, `MARK_AS_VIEWED`                  | Invoice content can't be updated.                                                                                                 |
| `VOIDED`         | `SEND`, `ARCHIVE`, `GENERATE_PDF_DOCUMENT`, `MARK_AS_SENT`, `MARK_AS_VIEWED`                          | Invoice content can't be updated but the invoice can be archived.                                                                 |

`ARCHIVE` is available for all statuses except `DRAFT`, but only when the invoice isn't already archived. Once archived, `UNARCHIVE` becomes available instead.

## Changes after first payment

When a customer makes the first payment on a standalone invoice, the following changes occur automatically:

- **Wix eCommerce order creation**: A Wix eCommerce order is created to process the transaction. The order ID is stored in `reference.standaloneReference.orderId` and is used to manage all subsequent payments for the invoice.
- **Status transition**: The invoice status transitions from `PUBLISHED` to either `PARTIALLY_PAID` or `PAID`, depending on the payment amount.
- **Information lock**: The invoice's `customerInfo`, `shippingInfo`, `regionalProperties`, `businessDetails`, and `deposit` become locked and can't be updated.
- **Payment request management**: If a payment request was generated using [Initiate Payment](https://dev.wix.com/docs/api-reference/business-management/get-paid/invoices/invoices/initiate-payment.md), it's automatically voided after a successful payment to prevent duplicate transactions. A new payment request must be initiated for any remaining balance.