Skip to main content

Cancel an operation

POST 

/v1/operations/:operation_id/cancel

Ask the platform to cancel an operation your bank initiated.

Required scope: connector:operations:cancel.

The cancellation is itself an operation. This call returns 202 Accepted with a new operation (operation_type OPERATION_CANCEL, resource_family operations) whose relationships.resource points at the target. Poll that new operation to learn the result:

Cancellation operation ends inMeaning
SUCCEEDEDThe target was cancelled; it is now CANCELLED and any open reviews on it are closed.
REJECTED with result_code CANCEL_NOT_ALLOWEDThe target could not be cancelled: it is already in a final state (or MANUAL_REVIEW), a ledger transaction for it was already submitted, or another cancellation was already requested. The target is unchanged.

An operation can be cancelled only while it is ACCEPTED, PROCESSING, PENDING_REVIEW, PENDING_COMMITS or AWAITING_SCREENING and none of its ledger transactions has been submitted yet. Once the first ledger transaction is submitted, the operation can no longer be cancelled and completes under normal processing. A transfer reaches PENDING_REVIEW only after its first ledger transaction has been submitted, so a transfer waiting for review cannot be cancelled; a reviewer can reject it instead (it then ends REJECTED with result_code CHECKER_REJECTED).

These problems are reported directly by this call instead of through a cancellation operation:

  • 400 Bad Request if operation_id is not a UUID, an attribute is blank, or expected_target_state does not match the target's current state;
  • 404 Not Found if the target operation does not exist;
  • 401 Unauthorized if the target operation belongs to another bank.

Send an Idempotency-Key. Because the key is compared on the request body only, use a new key for each target operation.

Request​

Responses​

Cancellation accepted for processing. data.id is the id of the new cancellation operation, not of the target. Poll it with GET /v1/operations/{operation_id}. Replaying the same Idempotency-Key with the same body returns this document again.