Retiros

Aprobar, rechazar, cancelar, fallar o devolver un retiro

Actúa sobre un retiro. Un retiro recién creado queda `PENDING` y no avanza solo: `approve` es el paso que lo mueve. El `id` del cuerpo es el identificador del retiro — el `withdrawal_id` de `/process/` o el `id` de `/withdrawals/`; el equivocado responde `404 Withdrawal not found: 'Item'`.

POST
/withdrawals/perform_action/

Autorización

Authorization
Authorization<token>

Your public API key, with the word Token and a space in front of it. Example: Token 6534bc0a7e1f4d2b9c8e3a5f7b1d2c4e6f8a9b0c — that whole value is the header. Sending the key alone returns 401 'Authentication credentials were not provided'. In this playground you may paste just the key; the prefix is added for you.

In: header

Cuerpo de la petición

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Cuerpo de la respuesta

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/withdrawals/perform_action/" \  -H "Content-Type: application/json" \  -d '{    "id": "ad3069ed-598e-4a1b-82e0-2279d5af292d",    "action": "approve"  }'
{
  "id": "ad3069ed-598e-4a1b-82e0-2279d5af292d",
  "business_id": "69",
  "status": "PROCESSING",
  "amount": 20,
  "currency": "MXN",
  "transfer_method": "SPEI",
  "status_changes": [
    {
      "from_status": "PENDING",
      "to_status": "PROCESSING",
      "timestamp": "2026-10-01T17:35:02.118402",
      "reason": null
    }
  ],
  "created_at": "2026-10-01T17:33:41.364685Z",
  "modified_at": "2026-10-01T17:35:02.201173Z",
  "paid_at": null
}
{
  "error": "Invalid action"
}
{
  "detail": "Invalid token."
}
{
  "error": "Withdrawal not found: 'Item'"
}
{
  "detail": "Cannot modify withdrawal in terminal state"
}
¿Te resultó útil esta página?