Cancel a recurring series
Stops the series at the payer’s request and, with it, the occurrences already materialized for it that are still PENDING. It is the right call when the payer wants the standing payment to end; to drop a single date and keep the series running, cancel that occurrence through POST /v1/scheduled-payments//cancel instead. Nothing is released — nothing was held. WHAT IT DOES NOT STOP. It moves only PENDING occurrences to CANCELLED. It does not change an occurrence in any other status (EXECUTING, DISPATCHED_OUTCOME_UNKNOWN, AWAITING_RETRY, SETTLED, FAILED or CANCELLED), and skippedOccurrences counts those. READING THE RESPONSE. cancelledOccurrences and skippedOccurrences PARTITION the occurrences the series had: every one of them is in exactly one count, which is what lets a client reconcile the figures against the pending occurrences it was displaying a moment earlier. They describe THIS request and are not properties of the series — re-reading the series afterwards does not report them again. CANCELLING TWICE. The second request meets a series that is already CANCELLED and is refused with PIX-0765, whether or not the replay cache is reachable. The occurrences the first request stopped do not return to PENDING, so a repeat can never undo it. A COMPLETED SERIES CAN STILL BE CANCELLED. completed means every occurrence the series will ever have has been created — not that they have been paid. A short series reaches that state while every one of its payments is still in the future, so this route accepts it and stops the pending occurrences. A series that really has finished paying is accepted too and truthfully reports zero cancelled.
Autorizações
JWT bearer token issued by the identity provider.
Cabeçalhos
REQUIRED. Client-supplied replay key, at most 64 bytes. A request without it is refused with PIX-0030 @ 400 before the handler runs. Replaying the same key with a divergent method, URL or body is PIX-0031 @ 412.
1 - 64Parâmetros de caminho
Series identifier.
"01a0d8fb-1a8b-7a10-b3c4-d5e6f7a8b9c0"
Resposta
OK
How many occurrences this request moved to CANCELLED. It counts ONLY the ones that were still PENDING, and it is the row count of the write itself rather than a census taken beforehand.
5
The series that was stopped.
"01a0d8fb-1a8b-7a10-b3c4-d5e6f7a8b9c0"
How many materialized occurrences this request did not change, because they were not PENDING. Together with cancelledOccurrences it accounts for every occurrence the series had.
1
The series' status after the operation. Always CANCELLED on a 200 -- a series that could not be stopped answers PIX-0765 instead of reporting an unchanged status.
ACTIVE, COMPLETED, CANCELLED "CANCELLED"

