4. Créer une application
Une application = une intégration distincte (site, application mobile, terminal). Chacune a ses clés, son webhook, son solde et ses liens de paiement. Son identifiant se passe dans X-Application-ID.
Créer une application
POST/applicationsJeton de session
Corps de la requête
{
"name": "Boutique en ligne",
"webhook_url": "https://mon-site.cm/webhooks/kratospay",
"country_id": 1
}Réponse 201
{
"success": true,
"data": {
"application": {
"id": 12,
"name": "Boutique en ligne",
"webhook_url": "https://mon-site.cm/webhooks/kratospay",
"has_webhook": true,
"is_active": true,
"created_at": "2026-11-02T08:00:00Z"
},
"webhook_secret": "whsec_<secret>"
},
"meta": {
"request_id": "...",
"timestamp": "..."
}
}| Code | Quand |
|---|---|
| 401 | Jeton expiré. |
| 422 | Nom manquant ou URL de webhook invalide. |
webhook_secretn'est affiché qu'une fois, même sanswebhook_url. Le régénérer :POST /applications/{id}/webhook/rotate-secret.- Gérer :
GET /applications,GET /applications/{id},PATCH /applications/{id}(name,webhook_url,is_active),DELETE /applications/{id}. Pays ayant transigé :GET /applications/{id}/countries.