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"
}
Behavior with different types of sources. For automatic sources like Stripe, Chargebee, Recurly and Braintree (the latest version of the integration), we now permanently store all records added, edited or disabled using the API. Such edits are preserved after customer re-syncs and automatic updates.
For these sources, use the include_edit_histories
query parameter when retrieving or listing invoices to fetch both the original values imported from the billing system and the edited values. The with_disabled
query parameter allows you to include disabled records in the response.
For other automatic sources, edits done via the API may be overwritten during customer re-syncs or automatic updates.
For custom sources, edits are not stored separately from the original data.
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_uuid
string required- The ChartMogul UUID of the data source for which invoice status needs to be updated.
invoice_external_id
string required- A unique identifier specified by you for the invoice.
Body parameters
status
string required- Updated invoice status. Possible invoice statuses are
written_off
orvoided
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.