{"openapi":"3.0.3","info":{"title":"GATESEND Open Gateway API & Webhooks Ecosystem","version":"1.0.0","description":"Passerelle d'intégration fintech ouverte de dépôts, retraits et webhooks automatisés pour opérateurs et marchands.","contact":{"name":"GATESEND Developer Support","url":"https://gatesend.app"}},"servers":[{"url":"https://gatesend.app/api/v1","description":"Serveur de Production Principal"},{"url":"http://localhost:3000/api/v1","description":"Environnement Local / Sandbox"}],"security":[{"BearerAuth":[],"ApiKeyAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key (sk_live_... / sk_test_...)"},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"Financials":{"type":"object","description":"Détail financier transparent de la transaction et des commissions appliquées","properties":{"grossAmount":{"type":"number","example":10000,"description":"Montant brut payé par le client (FCFA)"},"feeRatePercent":{"type":"number","example":0.8,"description":"Taux de commission appliqué en % (configurable)"},"feeAmount":{"type":"number","example":80,"description":"Frais prélevés (FCFA)"},"netMerchantAmount":{"type":"number","example":9920,"description":"Montant net crédité au marchand (FCFA)"},"feeBearer":{"type":"string","enum":["MERCHANT","CUSTOMER"],"example":"MERCHANT","description":"0 FCFA de frais pour l'acheteur"},"currency":{"type":"string","example":"FCFA"}}},"DepositRequest":{"type":"object","required":["provider","accountId","amount","operator","senderPhone"],"properties":{"provider":{"type":"string","example":"ECOMMERCE"},"accountId":{"type":"string","example":"CMD-9841"},"amount":{"type":"number","example":10000},"operator":{"type":"string","enum":["ORANGE_BF","MOOV_BF","TELECEL_BF","WAVE"],"example":"ORANGE_BF"},"senderPhone":{"type":"string","example":"76112233"},"tenantSlug":{"type":"string","example":"gatesend"}}},"WithdrawalRequest":{"type":"object","required":["provider","accountId","operator","recipientPhone"],"properties":{"provider":{"type":"string","example":"ECOMMERCE"},"accountId":{"type":"string","example":"CMD-9841"},"amount":{"type":"number","example":10000},"withdrawalCode":{"type":"string","example":"WD-48912"},"operator":{"type":"string","enum":["ORANGE_BF","MOOV_BF","TELECEL_BF","WAVE"],"example":"ORANGE_BF"},"recipientPhone":{"type":"string","example":"76112233"}}},"WebhookPayload":{"type":"object","properties":{"id":{"type":"string","example":"evt_1725036800_abc123"},"event":{"type":"string","enum":["deposit.created","transaction.completed","transaction.failed","withdrawal.completed","withdrawal.failed","wallet.bound"],"example":"transaction.completed"},"timestamp":{"type":"integer","example":1725036800},"tenantId":{"type":"string","example":"gatesend"},"data":{"type":"object","properties":{"id":{"type":"string","example":"tx_1725036800"},"reference":{"type":"string","example":"GSIN_LPJ4TFOH"},"amount":{"type":"number","example":10000},"financials":{"$ref":"#/components/schemas/Financials"},"mobileTransactionId":{"type":"string","example":"MP260828.1051.95797942"}}}}}}},"paths":{"/deposit":{"post":{"summary":"Initier un dépôt client","description":"Génère la syntaxe USSD et initialise la transaction avec vérification anti-triangulation.","responses":{"200":{"description":"Dépôt créé avec succès et code USSD prêt"},"403":{"description":"Blocage anti-triangulation ou règles de conformité"}}}},"/withdrawals":{"post":{"summary":"Demander un retrait Mobile Money","description":"Déclenche le débit bookmaker et le virement Mobile Money vers le portefeuille lié.","responses":{"200":{"description":"Retrait exécuté avec succès"},"403":{"description":"Numéro récepteur non conforme au portefeuille lié"}}}},"/transactions/{id}":{"get":{"summary":"Consulter le statut d'une transaction","responses":{"200":{"description":"Détails complets et triple référence"}}}}},"webhooks":{"gatesend.event":{"post":{"summary":"Événement push sortant GATESEND","headers":{"X-Gatesend-Signature":{"description":"Signature cryptographique HMAC-SHA256 (t=timestamp,v1=signature)","schema":{"type":"string"}},"X-Gatesend-Event":{"description":"Nom de l'événement survenu","schema":{"type":"string"}}}}}}}