Payment Intents
Un PaymentIntent représente un flux de paiement. Il suit le cycle de vie depuis la création jusqu’à la finalisation.
Famille de routes actuellement implémentée : payment_intents
Objet PaymentIntent
{
"id": "pi_1a2b3c4d5e",
"object": "payment_intent",
"amount": 10000,
"currency": "xof",
"status": "requires_payment_method",
"payment_method_types": ["mobile_money", "card"],
"description": "Order #1234",
"metadata": {},
"created": 1708300800
}
Créer un PaymentIntent
POST /payment_intents
| Paramètre | Type | Requis | Description |
|---|---|---|---|
amount | integer | ✅ | Montant dans la plus petite unité monétaire |
currency | string | ✅ | Code devise ISO à trois lettres |
payment_method_types | string[] | Méthodes de paiement autorisées | |
description | string | Description du paiement | |
metadata | object | Métadonnées clé-valeur | |
confirm | boolean | Confirme immédiatement si vrai | |
customer | string | Identifiant client | |
payment_method | string | Identifiant de méthode de paiement |
Récupérer un PaymentIntent
GET /payment_intents/{id}
Mettre à jour un PaymentIntent
PATCH /payment_intents/{id}
Confirmer un PaymentIntent
POST /payment_intents/{id}/confirm
| Paramètre | Type | Requis | Description |
|---|---|---|---|
payment_method | string | Identifiant de méthode de paiement | |
payment_method_data | object | Données inline de méthode de paiement |
Annuler un PaymentIntent
POST /payment_intents/{id}/cancel
Lister les PaymentIntents
GET /payment_intents
| Paramètre | Type | Description |
|---|---|---|
limit | integer | Nombre de résultats demandés |