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

# Invoices

> How does the invoicing flow in Propaga work?

# Using Propaga API to create an invoice for an order

If an invoice is required for the transaction, you simply need to include this additional information in the delivered order notification request.

```jsx theme={null}
curl --request PUT \
  --url https://staging-api.propaga.io/v1/transaction/{transactionId} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "status": "delivery",
  "transactionAmount": 3500,
  "invoice": {
    "products": [
    {
        "quantity": 1,
        "product": {
          "description": "Product-Name",
          "productKey": "60131324",
          "sku": "ABCD123",
          "price": 1750,
          "unitKey": "LTR",
          "taxes": [
            {
              "type": "IVA",
              "rate": 0.16
            }
          ]
        }
      }
    ]
  }
}'
```

<Card title="Keys in invoice object" icon="lightbulb" iconType="duotone" color="#ca8b04">
  The values of `unitKey`, `productKey` and the tax types are included in the catalog of the tax authority (SAT).

  For additional information, please refer to this [link](http://pys.sat.gob.mx/PyS/catUnidades.aspx).
</Card>

This call will update the order status to 'delivered' and create the invoice with the data provided.

Once the client pays for the order, we will generate a complement for the invoice, incorporating the payment method.

The files generated for the invoices are accessible through the following endpoint

```jsx theme={null}
curl --request GET \
  --url https://staging-api.propaga.io/v1/invoice/{transactionId}/documents \
  --header 'Authorization: <authorization>'
```
