/api/v1/merchant/merchants/:merchantId/webhook-endpointsPermission · merchant.webhooks.manageCréer un endpoint webhook
Enregistre une URL HTTPS (HTTP localhost autorisé en dev) et les événements souscrits.
Paramètres de chemin
| Nom | Type | Requis | Description |
|---|---|---|---|
| merchantId | string | Oui | UUID marchand |
Corps de requête
| Nom | Type | Requis | Description |
|---|---|---|---|
| url | string | Oui | URL de réception HTTPS |
| events | string[] | — | Liste d'événements ou * pour tous |
| status | string | — | ACTIVE ou DISABLED |
Exemple requête
{
"url": "https://api.merchant.example/webhooks/izzi",
"events": [
"payment.succeeded",
"checkout.session.completed"
]
}Réponse (data)
| Nom | Type | Requis | Description |
|---|---|---|---|
| id | string | Oui | endpointId |
| secret | string | — | Secret affiché une seule fois (whsec_…) |
Exemple réponse
{
"success": true,
"data": {
"id": "we_abc123",
"url": "https://api.merchant.example/webhooks/izzi",
"secret": "whsec_…",
"events": [
"payment.succeeded"
]
}
}Exemples
curl -X POST https://api.dev.izzi-finance.com/api/v1/api/v1/merchant/merchants/:merchantId/webhook-endpoints \
-H "Authorization: Bearer izzi_mk_sandbox_…" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.merchant.example/webhooks/izzi",
"events": [
"payment.succeeded",
"checkout.session.completed"
]
}'