Sessions checkout

Création et gestion des sessions checkout (auth API key).

POST/api/v1/checkout/sessionsClé API

Créer une session checkout

Crée une session checkout. Retourne sessionId et url (hébergé) ; le sessionId sert aussi à l'intégration API custom.

Corps de requête

NomTypeRequisDescription
amountstringOuiMontant en unités mineures
currencystringOuiCode devise ISO 4217
titlestringOuiTitre affiché au payeur
descriptionstringDescription optionnelle (détail complémentaire)
merchantIdstringOptionnel avec clé API (doit correspondre au marchand de la clé)
successUrlstringRedirection après succès
cancelUrlstringRedirection après annulation
allowedMethodsstring[]Restreindre les méthodes (WALLET, MOBILE_MONEY, CARD, etc.)
expiresInSecondsnumberTTL session (défaut 1800, max 86400)
metadataobjectMétadonnées libres

Exemple requête

json
{
  "amount": "2500",
  "currency": "USD",
  "title": "Commande #1234",
  "description": "Achat boutique en ligne",
  "successUrl": "https://merchant.example/success",
  "cancelUrl": "https://merchant.example/cancel",
  "allowedMethods": [
    "MOBILE_MONEY",
    "CARD"
  ]
}

Réponse (data)

NomTypeRequisDescription
objectstringOuiToujours checkout.session
idstringOuisessionId (cs_...)
urlstringURL checkout hébergée (réponse create uniquement)
titlestringOuiTitre affiché au payeur
descriptionstring | nullDescription optionnelle
statusstringOuiOPEN, PROCESSING, SUCCEEDED, etc.
amountstringOuiMontant en unités mineures
currencystringOuiDevise ISO 4217
expiresAtstring | nullExpiration ISO 8601
createdAtstringOuiDate de création ISO 8601

Exemple réponse

json
{
  "success": true,
  "data": {
    "object": "checkout.session",
    "id": "cs_38b62a204d2da0bcdd312c59",
    "tenantId": "tenant-1",
    "merchantId": "mch-1",
    "status": "OPEN",
    "amount": "2500",
    "currency": "USD",
    "title": "Commande #1234",
    "description": "Achat boutique en ligne",
    "customerEmail": "customer@example.com",
    "successUrl": "https://merchant.example/success",
    "cancelUrl": "https://merchant.example/cancel",
    "expiresAt": "2026-08-28T12:00:00.000Z",
    "completedAt": null,
    "createdAt": "2026-08-28T09:00:00.000Z",
    "updatedAt": "2026-08-28T09:00:00.000Z",
    "url": "https://checkout.example/session/cs_38b62a204d2da0bcdd312c59"
  },
  "error": null
}

Exemples

bash
curl -X POST https://api.dev.izzi-finance.com/api/v1/api/v1/checkout/sessions \
  -H "Authorization: Bearer izzi_mk_sandbox_…" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": "2500",
  "currency": "USD",
  "title": "Commande #1234",
  "description": "Achat boutique en ligne",
  "successUrl": "https://merchant.example/success",
  "cancelUrl": "https://merchant.example/cancel",
  "allowedMethods": [
    "MOBILE_MONEY",
    "CARD"
  ]
}'
GET/api/v1/checkout/sessionsClé API

Lister les sessions checkout

Liste paginée des sessions du tenant.

Paramètres de requête

NomTypeRequisDescription
pagenumberPage (défaut 1)
limitnumberTaille page (défaut 25)
statusstringFiltrer par statut

Réponse (data)

NomTypeRequisDescription
objectstringOuiToujours checkout.session
idstringOuisessionId (cs_...)
urlstringURL checkout hébergée (réponse create uniquement)
titlestringOuiTitre affiché au payeur
descriptionstring | nullDescription optionnelle
statusstringOuiOPEN, PROCESSING, SUCCEEDED, etc.
amountstringOuiMontant en unités mineures
currencystringOuiDevise ISO 4217
expiresAtstring | nullExpiration ISO 8601
createdAtstringOuiDate de création ISO 8601

Exemple réponse

json
{
  "success": true,
  "data": [
    {
      "object": "checkout.session",
      "id": "cs_38b62a204d2da0bcdd312c59",
      "tenantId": "tenant-1",
      "merchantId": "mch-1",
      "status": "OPEN",
      "amount": "2500",
      "currency": "USD",
      "title": "Commande #1234",
      "description": "Achat boutique en ligne",
      "customerEmail": "customer@example.com",
      "successUrl": "https://merchant.example/success",
      "cancelUrl": "https://merchant.example/cancel",
      "expiresAt": "2026-08-28T12:00:00.000Z",
      "completedAt": null,
      "createdAt": "2026-08-28T09:00:00.000Z",
      "updatedAt": "2026-08-28T09:00:00.000Z"
    }
  ],
  "error": null,
  "meta": {
    "page": 1,
    "pageSize": 25,
    "total": 1,
    "totalPages": 1
  }
}

Exemples

bash
curl -X GET https://api.dev.izzi-finance.com/api/v1/api/v1/checkout/sessions \
  -H "Authorization: Bearer izzi_mk_sandbox_…" \
  -H "Content-Type: application/json"
GET/api/v1/checkout/sessions/:idClé API

Détail d'une session checkout

Récupère une session par identifiant (auth marchand).

Paramètres de chemin

NomTypeRequisDescription
idstringOuisessionId

Réponse (data)

NomTypeRequisDescription
objectstringOuiToujours checkout.session
idstringOuisessionId (cs_...)
urlstringURL checkout hébergée (réponse create uniquement)
titlestringOuiTitre affiché au payeur
descriptionstring | nullDescription optionnelle
statusstringOuiOPEN, PROCESSING, SUCCEEDED, etc.
amountstringOuiMontant en unités mineures
currencystringOuiDevise ISO 4217
expiresAtstring | nullExpiration ISO 8601
createdAtstringOuiDate de création ISO 8601

Exemple réponse

json
{
  "success": true,
  "data": {
    "object": "checkout.session",
    "id": "cs_38b62a204d2da0bcdd312c59",
    "tenantId": "tenant-1",
    "merchantId": "mch-1",
    "status": "OPEN",
    "amount": "2500",
    "currency": "USD",
    "title": "Commande #1234",
    "description": "Achat boutique en ligne",
    "customerEmail": "customer@example.com",
    "successUrl": "https://merchant.example/success",
    "cancelUrl": "https://merchant.example/cancel",
    "expiresAt": "2026-08-28T12:00:00.000Z",
    "completedAt": null,
    "createdAt": "2026-08-28T09:00:00.000Z",
    "updatedAt": "2026-08-28T09:00:00.000Z"
  },
  "error": null
}

Exemples

bash
curl -X GET https://api.dev.izzi-finance.com/api/v1/api/v1/checkout/sessions/:id \
  -H "Authorization: Bearer izzi_mk_sandbox_…" \
  -H "Content-Type: application/json"
POST/api/v1/checkout/sessions/:id/cancelClé API

Annuler une session checkout

Passe une session OPEN à CANCELLED.

Paramètres de chemin

NomTypeRequisDescription
idstringOuisessionId

Réponse (data)

NomTypeRequisDescription
objectstringOuiToujours checkout.session
idstringOuisessionId (cs_...)
urlstringURL checkout hébergée (réponse create uniquement)
titlestringOuiTitre affiché au payeur
descriptionstring | nullDescription optionnelle
statusstringOuiOPEN, PROCESSING, SUCCEEDED, etc.
amountstringOuiMontant en unités mineures
currencystringOuiDevise ISO 4217
expiresAtstring | nullExpiration ISO 8601
createdAtstringOuiDate de création ISO 8601

Exemple réponse

json
{
  "success": true,
  "data": {
    "object": "checkout.session",
    "id": "cs_38b62a204d2da0bcdd312c59",
    "tenantId": "tenant-1",
    "merchantId": "mch-1",
    "status": "CANCELLED",
    "amount": "2500",
    "currency": "USD",
    "title": "Commande #1234",
    "description": "Achat boutique en ligne",
    "customerEmail": "customer@example.com",
    "successUrl": "https://merchant.example/success",
    "cancelUrl": "https://merchant.example/cancel",
    "expiresAt": "2026-08-28T12:00:00.000Z",
    "completedAt": null,
    "createdAt": "2026-08-28T09:00:00.000Z",
    "updatedAt": "2026-08-28T09:00:00.000Z"
  },
  "error": null
}

Exemples

bash
curl -X POST https://api.dev.izzi-finance.com/api/v1/api/v1/checkout/sessions/:id/cancel \
  -H "Authorization: Bearer izzi_mk_sandbox_…" \
  -H "Content-Type: application/json"