Passer au contenu principal

Endpoint

GET https://pay.sandbox.yabetoopay.com/v1/payment-intents/{id}   # Sandbox
GET https://pay.api.yabetoopay.com/v1/payment-intents/{id}       # Production

Authentification

Utilisez votre clé secrète dans l’en-tête Authorization :
Authorization: Bearer YOUR_SECRET_KEY

Paramètres de chemin

ParamètreTypeDescription
idstringL’ID de l’intention de paiement

Exemple de requête

curl https://pay.sandbox.yabetoopay.com/v1/payment-intents/pi_XdLeavDjiiaEx2y5nRz0 \
  -H "Authorization: Bearer YOUR_SECRET_KEY"

Réponse

200 OK

{
  "amount": 2000,
  "currency": "xaf",
  "label": "payment_intent",
  "id": "pi_XdLeavDjiiaEx2y5nRz0",
  "status": "succeeded",
  "client_secret": ""
}

Statuts de l’intention de paiement

StatutDescription
requires_payment_methodEn attente de méthode de paiement
requires_confirmationEn attente de confirmation
processingPaiement en cours de traitement
succeededPaiement réussi
failedPaiement échoué
canceledPaiement annulé

404 Not Found

{
  "message": "Payment intent not found"
}

401 Unauthorized

{
  "error": "Unauthorized"
}