> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sahelpay.ml/llms.txt
> Use this file to discover all available pages before exploring further.

# Lister, solde et annulation

> Suivre vos demandes de retrait, lire votre solde, annuler une demande

# Lister les retraits

## Endpoints

| Endpoint | Méthode | Description |
| - | - | - |
| `/v1/withdrawals` | `GET` | Liste paginée (`page`, `limit`) |
| `/v1/withdrawals/balance` | `GET` | Solde disponible (source : grand livre) |
| `/v1/withdrawals/quote?amount=` | `GET` | Frais et montant reçu avant confirmation |
| `/v1/withdrawals/stats` | `GET` | Compteurs par statut |
| `/v1/withdrawals/{id}/cancel` | `PATCH` | Annuler une demande encore `PENDING` |

## Lister

```bash theme={null}
curl "https://api.sahelpay.ml/v1/withdrawals?page=1&limit=20" \
  -H "Authorization: Bearer sk_live_xxx"
```

```json theme={null}
{
  "success": true,
  "data": {
    "withdrawals": [
      {
        "id": "0b6c0f3e-...",
        "reference": "WD_1759480000000_A1B2C3D4",
        "amount": 100000,
        "fee": 1000,
        "net_amount": 99000,
        "currency": "XOF",
        "status": "COMPLETED",
        "provider": "ORANGE_MONEY",
        "phone_number": "+22370123456",
        "notes": null,
        "processed_at": "2026-10-03T14:00:00.000Z",
        "transfer_reference": "MP261003.1400.A12345",
        "created_at": "2026-10-03T10:00:00.000Z"
      }
    ],
    "pagination": { "page": 1, "limit": 20, "total": 1, "pages": 1 }
  }
}
```

Statuts : `PENDING`, `PROCESSING`, `COMPLETED`, `REJECTED`, `CANCELLED`.

## Solde

```javascript theme={null}
const balance = await sahelpay.withdrawals.balance();
// available_balance, pending_balance, reserved_balance, total_balance,
// pending_withdrawals, currency, kyc_level, kyc_status, computed_at
```

## Annuler

```javascript theme={null}
await sahelpay.withdrawals.cancel('0b6c0f3e-...');
// { id, reference, status: 'CANCELLED' }
```

Seules les demandes `PENDING` peuvent être annulées ; les fonds réservés sont restitués.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.