API et intégration
API JSON sous /api/v1/…. Les routes actuelles figurent dans OpenAPI sur votre déploiement. Dans les exemples, remplacez YOUR_HOST par votre hôte.
Documentation
- Interactive : /docs (si activée).
- Schéma :
GET /api/v1/openapi.json. - Statut :
GET /health,GET /readiness,GET /api/v1/status.
Conventions
- HTTPS en production.
Content-Type: application/json(sauf téléversements de fichiers de litige).- Après
POST /api/v1/auth/login— cookie et/ouAuthorization: Bearer …. - Rafraîchissement :
POST /api/v1/auth/refresh. - Les opérations sensibles peuvent utiliser
Idempotency-Key— voir OpenAPI.
Groupes principaux
- Auth et sessions : register, login, refresh, logout, MFA.
- Profil et portefeuille :
/api/v1/me,/api/v1/wallet/balances,/api/v1/wallet/activity. - Séquestre (escrow) : create, list, fund, release, dispute.
- Helpdesk : tickets.
- Liste complète — dans OpenAPI.
Support d’intégration
Questions sur l’accès et les scénarios : aide ou support@evopay.biz. Les clients connectés peuvent créer des tickets via POST /api/v1/helpdesk/tickets.
Exemples
json · corps de la requête
{
"email": "user@example.com",
"password": "YourStrongPassw0rd!",
"display_name": "Demo User"
}
bash · inscription
curl -sS -X POST "https://YOUR_HOST/api/v1/auth/register" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "YourStrongPassw0rd!",
"display_name": "Demo User"
}'
bash · connexion
curl -sS -X POST "https://YOUR_HOST/api/v1/auth/login" \
-H "Content-Type: application/json" \
-c cookies.txt \
-d '{
"email": "user@example.com",
"password": "YourStrongPassw0rd!"
}'
bash · profil et portefeuille
curl -sS "https://YOUR_HOST/api/v1/me" -b cookies.txt
curl -sS "https://YOUR_HOST/api/v1/wallet/balances" -b cookies.txt
curl -sS "https://YOUR_HOST/api/v1/wallet/activity?limit=20" -b cookies.txt
bash · créer un séquestre
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow" \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"title": "Livraison d’équipement",
"description": "Équipement serveur selon spécification",
"amount": "8000.00",
"currency": "USD"
}'
Puis substituez ESCROW_ID :
bash · cycle de vie du séquestre
curl -sS "https://YOUR_HOST/api/v1/escrow/contracts/ESCROW_ID" -b cookies.txt
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow/ESCROW_ID/fund" \
-H "Content-Type: application/json" -b cookies.txt -d '{}'
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow/ESCROW_ID/release" \
-H "Content-Type: application/json" -b cookies.txt -d '{}'
bash · statut
curl -sS "https://YOUR_HOST/api/v1/status"
curl -sS "https://YOUR_HOST/readiness"