> For the complete documentation index, see [llms.txt](https://docs.digitalriver.com/commerce-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalriver.com/commerce-api/events/event-types/post-order-event-types/invoice-created-event.md).

# Invoice created event

Understand the invoice created event.

When an order's invoice is generated, the `order.invoice.created` event is triggered. This event is crucial in tracking and managing order invoices and ensuring that financial records are accurate and up-to-date. This notification provides essential invoice details, such as the unique invoice identifier, the associated file ID for invoice access, the order and customer IDs, the purpose of the invoice, and a downloadable URL for the invoice itself.

Integrating this event into your system via our API streamlines financial documentation and enhances the overall order management process. To fully use this functionality, ensure the API service is activated on your site's key. Your Digital River Customer Success Manager (CSM) can support you if you require any assistance or have questions regarding the setup.

{% code title="Webhook response" %}

```json
{
    "id": "db375d32-52c0-4188-a05c-552933d254c5",
    "type": "order.invoice.created",
    "data": {
        "object": {
            "id": "9e00869b-e2f5-4663-aacb-e33687466020",
            "fileId": "9e00869b-e2f5-4663-aacb-e33687466020",
            "orderId": "851511800082",
            "customerId": "503451273389",
            "purpose": "customer_invoice",
            "invoiceURL": "https://api.digitalriver.com/files/9e00869b-e2f5-4663-aacb-e33687466020/content"
        }
    },
    "liveMode": false,
    "createdTime": "2020-10-14T09:03:33.988Z"
}
```

{% endcode %}

This event is crucial for monitoring and handling invoice processing within your system, ensuring the seller and the customer can access financial documents related to their transactions.

See the [Creating a webhook](/commerce-api/events/webhooks/creating-a-webhook.md) section for instructions on creating the webhook and the [Downloading the invoice PDF via a webhook notification](/commerce-api/admin-apis/order-management/downloading-the-invoice.md#downloading-the-invoice-pdf-via-a-webhook-notification) section for instructions on downloading the invoice PDF file. These instructions include information on [getting the file identifier for the invoice](/commerce-api/admin-apis/order-management/downloading-the-invoice.md#step-1-getting-the-file-identifier-for-the-invoice).
