Skip to main content
Cancel only when the transfer is still in a cancelable state in your own operator workflow.

Endpoint

POST /v2/transfers/{id}/cancel

Example request

curl --request POST \
  --url https://api.pagou.ai/v2/transfers/po_1001/cancel \
  --header "Authorization: Bearer YOUR_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "reason": "wrong recipient"
  }'

Example response

{
  "success": true,
  "requestId": "req_2002",
  "data": {
    "id": "po_1001",
    "status": "cancelled"
  }
}

Common error

Status 409
{
  "type": "https://api.pagou.ai/problems/conflict",
  "title": "Conflict",
  "status": 409,
  "detail": "The transfer cannot be cancelled in its current state."
}
Fix: show the cancel action only from states your operators can still stop safely. If the state is unclear, retrieve the transfer first.

Rules

  • Confirm current transfer state before showing a cancel button.
  • Reconcile after any uncertain cancellation attempt.
  • Update operator UI only after webhook delivery or successful GET confirmation.