Skip to main content
Use this page when your webhook pipeline is reliable most of the time but still needs a safe recovery path.

Recovery rules

  • Deduplicate by webhook event ID.
  • Make downstream side effects idempotent.
  • Reconcile with GET when the result of processing is unclear.
  • Prefer replaying your internal job from stored payload plus fresh API state instead of re-running business logic blindly.

Example reconciliation request

curl --request GET \
  --url https://api.pagou.ai/v2/transactions/tr_1001 \
  --header "Authorization: Bearer YOUR_TOKEN"

Example response

{
  "success": true,
  "requestId": "req_2101",
  "data": {
    "id": "tr_1001",
    "status": "paid",
    "updated_at": "2026-03-16T14:03:10.000Z"
  }
}

Common error

{
  "type": "https://api.pagou.ai/problems/not-found",
  "title": "Resource Not Found",
  "status": 404,
  "detail": "The requested transaction does not exist."
}
Fix: verify the resource mapping you stored from the original create response or webhook payload before retrying recovery.

Practical workflow

  1. Persist the raw webhook payload.
  2. Acknowledge quickly.
  3. Process asynchronously.
  4. If processing fails after acknowledgement, retrieve the latest resource state.
  5. Recompute the next safe business transition from that fresh state.