Cancel a boleto batch
Cancels the cancelable items of one boleto batch of the X-Organization-Id organization. Returns one result per item, by ascending position.
How it works
- Only an item in
CREATEDthat is registered at the provider is canceled. It goes through the same cancellation asPOST /v1/boletos/{id}/cancel, with the request’sreason. - Each canceled item sends one
BOLETO_CANCELEDnotification. - Any other item returns
NOT_CANCELABLEwithPBP-0103and is not touched. Its status says why. - An item whose cancellation is refused or fails returns
CANCEL_FAILEDwith that code and message. The other items are still canceled. - An item whose provider is not installed returns
CANCEL_FAILEDwithPBP-0704. - An item the provider will confirm later returns
CANCELLATION_PENDING, inCREATED, with itscancellationId. A new request returns it the same, without a new attempt. - Canceling only part of a batch is not an error: a batch that exists returns
200. - A retry under the same
Idempotency-Keyreturns the stored answer and runs nothing. After the record expires, the same key is answered from the items’ current state: an item the first call canceled comes backNOT_CANCELABLEwith statusCANCELED. - To cancel one boleto of a batch, use
POST /v1/boletos/{id}/cancel.
Cabeçalhos
Parâmetros de caminho
Corpo
Reason for the cancellation, recorded on every item canceled as its cancellationReason. Required: absent, blank once trimmed or longer than 500 characters is refused with 400 PBP-0001, with the same messages as POST /v1/boletos/{id}/cancel.
"Cobrança emitida em duplicidade"
Resposta
OK. One result per item: CANCELED, CANCELLATION_PENDING, NOT_CANCELABLE (PBP-0103) or CANCEL_FAILED (for example PBP-0704), with the boleto status after the attempt. Canceling only part of a batch is not an error.

