Update an Invoice Status
PUT https://api.chartmogul.com/v1/data_sources/{data_source_uuid}/invoices/{invoice_external_id}/status
Updates the status of an invoice identified by invoice_external_id under the specified data_source.
curl -X PUT "https://api.chartmogul.com/v1/data_sources/ds_35542640-d9f1-11ed-9c30-7727168c74a5/invoices/inv_0001/status" \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"status": "voided"
}'
{
"message": "Invoice updated"
}
Scope of this action.
This endpoint is meant for updating an invoice status only. To update invoice details such as due_date or currency, use the Update an Invoice endpoint. To update line items and transactions associated with an invoice, use the Update a Line Item and Update a Transaction endpoints.
Path parameters
data_source_uuidstring required- The ChartMogul UUID of the data source for which invoice status needs to be updated.
invoice_external_idstring required- A unique identifier specified by you for the invoice.
Query parameters
handle_as_user_editboolean optional default: false- Valid only for automatic sources (Stripe, Chargebee, Recurly, Braintree, Google Play and App Store Connect); ignored for others.
true— The invoice is updated as a user edit and persist through resyncs and reimports.false— The invoice update is treated as system-generated and may be overwritten or removed during resyncs and reimports.
Body parameters
statusstring required- Updated invoice status. Possible invoice statuses are
written_offorvoided
You can update the status of an invoice to voided or written_off. An invoice can also have one of the following statuses: open, paid or refunded. These statuses are automatically calculated by ChartMogul based on invoice transactions.