> ## 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.

# Événements webhook

> Liste des événements webhook SahelPay

# Événements webhook

SahelPay envoie des webhooks pour vous notifier des événements importants.

## Événements disponibles

| Événement           | Description                   |
| ------------------- | ----------------------------- |
| `payment.success`   | Paiement confirmé avec succès |
| `payment.failed`    | Paiement échoué               |
| `payment.cancelled` | Paiement annulé par le client |
| `payment.expired`   | Délai de paiement expiré      |
| `payout.completed`  | Payout envoyé avec succès     |
| `payout.failed`     | Payout échoué                 |

## Format du payload

```json theme={null}
{
  "event": "payment.success",
  "version": "v1",
  "timestamp": "2025-12-18T16:37:00.000Z",
  "data": {
    "id": "txn_abc123",
    "amount": 5000,
    "currency": "XOF",
    "status": "SUCCESS",
    "provider": "ORANGE_MONEY",
    "provider_ref": "OM123456789",
    "customer_phone": "+22370123456",
    "metadata": {
      "order_id": "order_123"
    },
    "created_at": "2025-12-18T16:35:00.000Z",
    "updated_at": "2025-12-18T16:37:00.000Z"
  }
}
```

## Headers

| Header                 | Description                |
| ---------------------- | -------------------------- |
| `X-SahelPay-Signature` | `t=timestamp,v1=signature` |
| `X-SahelPay-Timestamp` | Timestamp UNIX (secondes)  |
| `X-SahelPay-Event-ID`  | ID unique de l'événement   |
| `Content-Type`         | `application/json`         |

## Retry automatique

| Tentative | Délai     |
| --------- | --------- |
| 1         | Immédiat  |
| 2         | 1 minute  |
| 3         | 2 minutes |
| 4         | 4 minutes |
| 5         | 8 minutes |
