post
https://api-sandbox.asaas.com/v3/invoices//cancel
Endpoint used to request the cancellation of an invoice.
The request uses the invoice identifier (id) in the /v3/invoices/{id}/cancel endpoint.
Request parameters
cancelOnlyOnAsaas- When informed, defines whether the cancellation should occur only within Asaas.
How cancellation works
This endpoint should be used when there is a need to reverse an already issued invoice, respecting the municipality rules and cancellation availability.
ImportantThe cancellation result depends on the municipality rules and the current stage of the invoice.
- Not all municipalities allow automatic cancellation through integration.
- Some municipalities have deadline restrictions or limitations for cancellation.
After the request is made, the invoice may go through the following statuses:
PROCESSING_CANCELLATIONCANCELEDCANCELLATION_DENIED
Learn moreThis endpoint is especially relevant in municipalities that support automatic cancellation through integration.
- The result can be monitored through invoice queries or webhooks.
- The invoice status will be updated according to the municipality response.
404Not found
