Clés API

Gestion des clés d'intégration serveur.

POST/api/v1/merchant/merchants/:merchantId/api-keysPermission · merchant.api_keys.manage

Créer une clé API

Génère une clé secrète izzi_mk_sandbox_… ou izzi_mk_live_…. Le secret n'est retourné qu'une fois.

Paramètres de chemin

NomTypeRequisDescription
merchantIdstringOuiUUID marchand

Corps de requête

NomTypeRequisDescription
labelstringOuiNom affiché de la clé
environmentSANDBOX | PRODUCTIONSANDBOX ou PRODUCTION
scopesstring[]Permissions (défaut: *)

Exemple requête

json
{
  "label": "Backend production",
  "environment": "SANDBOX"
}

Réponse (data)

NomTypeRequisDescription
secretstringSecret complet (une seule fois)
keyPrefixstringOuiPréfixe affiché ensuite

Exemple réponse

json
{
  "success": true,
  "data": {
    "id": "mk_abc123",
    "keyPrefix": "izzi_mk_sandbox_ab",
    "environment": "SANDBOX",
    "secret": "izzi_mk_sandbox_…"
  }
}

Exemples

bash
curl -X POST https://api.dev.izzi-finance.com/api/v1/api/v1/merchant/merchants/:merchantId/api-keys \
  -H "Authorization: Bearer izzi_mk_sandbox_…" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "Backend production",
  "environment": "SANDBOX"
}'
GET/api/v1/merchant/merchants/:merchantId/api-keysPermission · merchant.api_keys.manage

Lister les clés API

Liste des clés (sans secret) pour un marchand.

Paramètres de chemin

NomTypeRequisDescription
merchantIdstringOuiUUID marchand

Réponse (data)

NomTypeRequisDescription
keyPrefixstringOuiPréfixe masqué
statusstringOuiACTIVE ou REVOKED

Exemple réponse

json
{
  "success": true,
  "data": [
    {
      "id": "mk_abc123",
      "label": "Backend sandbox",
      "keyPrefix": "izzi_mk_sandbox_ab",
      "status": "ACTIVE"
    }
  ]
}

Exemples

bash
curl -X GET https://api.dev.izzi-finance.com/api/v1/api/v1/merchant/merchants/:merchantId/api-keys \
  -H "Authorization: Bearer izzi_mk_sandbox_…" \
  -H "Content-Type: application/json"
POST/api/v1/merchant/merchants/:merchantId/api-keys/:keyId/revokePermission · merchant.api_keys.manage

Révoquer une clé API

Invalide immédiatement une clé active.

Paramètres de chemin

NomTypeRequisDescription
merchantIdstringOuiUUID marchand
keyIdstringOuiIdentifiant clé

Réponse (data)

NomTypeRequisDescription
statusstringOuiREVOKED

Exemple réponse

json
{
  "success": true,
  "data": {
    "id": "mk_abc123",
    "status": "REVOKED"
  }
}

Exemples

bash
curl -X POST https://api.dev.izzi-finance.com/api/v1/api/v1/merchant/merchants/:merchantId/api-keys/:keyId/revoke \
  -H "Authorization: Bearer izzi_mk_sandbox_…" \
  -H "Content-Type: application/json"