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 chaîne : centimes USD ou francs entiers CDF (voir guide Mobile Money)
currencystringOuiCode devise ISO 4217
titlestringOuiTitre affiché au payeur
descriptionstringNonDescription optionnelle (détail complémentaire)
merchantIdstringNonOptionnel avec clé API (doit correspondre au marchand de la clé)
successUrlstringNonRedirection après succès
cancelUrlstringNonRedirection après annulation
allowedMethodsstring[]NonRestreindre les méthodes (WALLET, MOBILE_MONEY, CARD, etc.)
expiresInSecondsnumberNonTTL session (défaut 1800, max 86400)
metadataobjectNonMé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_...)
urlstringNonURL checkout hébergée (réponse create uniquement)
titlestringOuiTitre affiché au payeur
descriptionstring | nullNonDescription optionnelle
statusstringOuiOPEN, PROCESSING, SUCCEEDED, etc.
amountstringOuiMontant en unités mineures
currencystringOuiDevise ISO 4217
expiresAtstring | nullNonExpiration 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": "[email protected]",
    "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",
    "sessionToken": "a1b2c3d4e5f6789012345678abcdef0123456789abcdef0123456789ab",
    "url": "https://checkout.example/session/cs_38b62a204d2da0bcdd312c59"
  },
  "error": null
}

Exemples

bash
curl -X POST https://api.izzi-finance.com/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
pagenumberNonPage (défaut 1)
limitnumberNonTaille page (défaut 25)
statusstringNonFiltrer par statut

Réponse (data)

NomTypeRequisDescription
objectstringOuiToujours checkout.session
idstringOuisessionId (cs_...)
urlstringNonURL checkout hébergée (réponse create uniquement)
titlestringOuiTitre affiché au payeur
descriptionstring | nullNonDescription optionnelle
statusstringOuiOPEN, PROCESSING, SUCCEEDED, etc.
amountstringOuiMontant en unités mineures
currencystringOuiDevise ISO 4217
expiresAtstring | nullNonExpiration 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": "[email protected]",
      "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.izzi-finance.com/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_...)
urlstringNonURL checkout hébergée (réponse create uniquement)
titlestringOuiTitre affiché au payeur
descriptionstring | nullNonDescription optionnelle
statusstringOuiOPEN, PROCESSING, SUCCEEDED, etc.
amountstringOuiMontant en unités mineures
currencystringOuiDevise ISO 4217
expiresAtstring | nullNonExpiration 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": "[email protected]",
    "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.izzi-finance.com/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_...)
urlstringNonURL checkout hébergée (réponse create uniquement)
titlestringOuiTitre affiché au payeur
descriptionstring | nullNonDescription optionnelle
statusstringOuiOPEN, PROCESSING, SUCCEEDED, etc.
amountstringOuiMontant en unités mineures
currencystringOuiDevise ISO 4217
expiresAtstring | nullNonExpiration 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": "[email protected]",
    "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.izzi-finance.com/api/v1/checkout/sessions/:id/cancel \
  -H "Authorization: Bearer izzi_mk_sandbox_…" \
  -H "Content-Type: application/json"