Order invoice notification
This request is used for invoicing an order. Entering the order's invoice means it was successfully completed, and the order status can be changed to invoiced in the order flow. Once an order is invoiced, its status cannot be changed.
After the insertion of the invoice, the order's total value will be updated, even in partial invoice scenarios.
❗ To avoid rounding errors, we recommend always sending the object of items being invoiced.
Partial invoices
After adding a partial invoice, the order's value will be updated, corresponding to a partial settled value in the VTEX payment gateway.
Partially invoiced orders cannot be canceled, and cancellation attempts will result in a 400 status code error. If the customer wants to replace or remove items, it is possible to change the order.
The partial invoices feature is available for all VTEX stores. The partial settlement in the gateway is in Beta, and requires a connector with the Payment Provider Protocol.
Returning items
Besides using this endpoint for generating invoices for sold items, you can use it for generating invoices for returned items. You determine this in the request body type field by choosing one of the following values:
-
Output: selling order invoice.
-
Input: returning items invoice.
Be aware of generating return invoices only after the full order amount was invoiced, otherwise, no refund will occur.
⚠️ Generating a return (type: Input) invoice with this endpoint will automatically create a refund without the need of additional API requests.
Changing the receipt code
Every time this endpoint is called using the same invoiceNumber, a new receipt code is generated, and it overrides the previous one. By doing this, you cannot change other information, only the receipt code.
Integration with marketplaces
The invoice should be pushed to the fulfillment account, not to the marketplace account. Once the order is invoiced, the seller should use this request to send the invoice information to the marketplace.
This endpoint is also used by the seller to send the order tracking information. However, this only should be done after the seller has the tracking information.
Permissions
Any user or API key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code 403 error. These are the applicable resources for this endpoint:
| Product | Category | Resource |
|---|---|---|
| OMS | OMS access | Notify invoice |
| OMS | OMS access | Notify refund |
You can create a custom role with that resource or use one of the following predefined roles:
| Role | Resource |
|---|---|
| OMS - Full access | Cancel order |
| IntegrationProfile - Fulfillment Oms | Cancel order |
❗ Assigning a predefined role to users or application keys usually grants permission to multiple License Manager resources. If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see Best practices for using application keys.
To learn more about machine authentication at VTEX, see Authentication overview.
Path parameters
Unique code that identifies the order whose invoice is being sent.
Headers
HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.
Describes the type of the content being sent.
Request body
Response
OK