[
    {
        "category": "General",
        "name": "Health Check",
        "method": "GET",
        "url": "http://localhost/api/v1/health",
        "headers": {
            "Accept": "application/json",
            "X-API-KEY": "pk_dev_...",
            "X-API-SECRET": "sk_..."
        },
        "body": null,
        "example_response": {
            "status": "ok",
            "version": "v1",
            "message": "API is healthy"
        }
    },
    {
        "category": "Paiements (Mobile Money)",
        "name": "Lister les opérateurs",
        "method": "GET",
        "url": "http://localhost/api/v1/payments/mobile-money/operators",
        "headers": {
            "Accept": "application/json",
            "X-API-KEY": "pk_dev_...",
            "X-API-SECRET": "sk_..."
        },
        "body": null,
        "example_response": {
            "success": true,
            "message": "Opérateurs récupérés avec succès.",
            "data": {
                "operators": [
                    {
                        "code": "orange_money",
                        "name": "Orange Money",
                        "countries": [
                            "CM"
                        ]
                    },
                    {
                        "code": "mtn_money",
                        "name": "MTN Mobile Money",
                        "countries": [
                            "CM"
                        ]
                    },
                    {
                        "code": "global_network",
                        "name": "Tout Pays (Carte/Mobile)",
                        "countries": [
                            "*"
                        ],
                        "description": "Paiement international (Redirection)",
                        "is_redirect": true
                    }
                ],
                "default_country": "CM"
            }
        }
    },
    {
        "category": "Paiements (Mobile Money)",
        "name": "Initier un paiement",
        "method": "POST",
        "url": "http://localhost/api/v1/payments/mobile-money",
        "headers": {
            "Content-Type": "application/json",
            "Accept": "application/json",
            "X-API-KEY": "pk_dev_...",
            "X-API-SECRET": "sk_..."
        },
        "body": {
            "amount": 500,
            "currency": "XOF",
            "operator": "orange_money",
            "phone": "237699000000",
            "description": "Achat test #123",
            "success_url": "https://monsite.com/success",
            "cancel_url": "https://monsite.com/cancel"
        },
        "example_response": {
            "success": true,
            "message": "Paiement initié.",
            "data": {
                "transaction": {
                    "user_id": 1,
                    "wallet_id": 1,
                    "transaction_code": "TXN202602032333315041",
                    "amount": "500.00",
                    "currency": "XAF",
                    "status": "pending",
                    "type": "deposit",
                    "method": "mobile_money",
                    "sub_method": "orange_money",
                    "payer_phone": "237676676120",
                    "receiver_phone": "676676120",
                    "fees": "25.00",
                    "net_amount": "475.00",
                    "details": {
                        "description": "Achat test #123",
                        "operator": "orange_money",
                        "success_url": "https://monsite.com/success",
                        "cancel_url": "https://monsite.com/cancel",
                        "failure_url": null
                    },
                    "updated_at": "2026-02-03T22:33:34.000000Z",
                    "created_at": "2026-02-03T22:33:31.000000Z",
                    "id": 454,
                    "reference_id": "74fba2db-f2b4-4c3f-b9a1-ba68910c3402",
                    "metadata": {
                        "api_response": {
                            "success": true,
                            "reference": "74fba2db-f2b4-4c3f-b9a1-ba68910c3402",
                            "gateway_reference": "REQ2602032233UDZO7SY",
                            "transaction_id": "REQ2602032233UDZO7SY",
                            "message": "Le paiement est en attente de validation",
                            "status": "PAYMENT_IN_PROGRESS",
                            "requires_user_action": true
                        },
                        "gateway_reference": "REQ2602032233UDZO7SY",
                        "initiated_at": "2026-02-03 23:33:34"
                    }
                },
                "status": "pending",
                "message": "Veuillez confirmer la transaction sur votre mobile.",
                "gateway_reference": "REQ2602032233UDZO7SY",
                "payment_url": null,
                "is_redirect": false
            }
        }
    },
    {
        "category": "Paiements (Mobile Money)",
        "name": "Vérifier statut paiement",
        "method": "GET",
        "url": "http://localhost/api/v1/payments/mobile-money/{REFERENCE_ID}",
        "headers": {
            "Accept": "application/json",
            "X-API-KEY": "pk_dev_...",
            "X-API-SECRET": "sk_..."
        },
        "body": null,
        "note": "Remplacer {REFERENCE_ID} par le transaction_code ou la référence (ex: TXN202602032333315041)",
        "example_response": {
            "success": true,
            "message": "Statut récupéré avec succès.",
            "data": {
                "transaction": {
                    "id": 454,
                    "transaction_code": "TXN202602032333315041",
                    "amount": "500.00",
                    "currency": "XAF",
                    "status": "pending",
                    "method": "mobile_money",
                    "metadata": {
                        "api_response": {
                            "status": "PAYMENT_IN_PROGRESS",
                            "message": "Le paiement est en attente de validation"
                        }
                    }
                },
                "operator_status": "PAYMENT_IN_PROGRESS",
                "is_completed": false,
                "is_failed": false,
                "is_pending": true,
                "last_checked": "2026-02-03 23:35:40"
            }
        }
    },
    {
        "category": "Paiements (Mobile Money)",
        "name": "Calculer les frais",
        "method": "POST",
        "url": "http://localhost/api/v1/payments/fees",
        "headers": {
            "Content-Type": "application/json",
            "Accept": "application/json",
            "X-API-KEY": "pk_dev_...",
            "X-API-SECRET": "sk_..."
        },
        "body": {
            "amount": 1000,
            "currency": "XAF",
            "operator": "orange_money",
            "type": "transaction"
        },
        "example_response": {
            "success": true,
            "data": {
                "amount": 1000,
                "fees": 50,
                "total": 1050,
                "currency": "XAF"
            }
        }
    },
    {
        "category": "Transferts",
        "name": "Transfert Interne (Wallet à Wallet)",
        "method": "POST",
        "url": "http://localhost/api/v1/transfers/internal",
        "headers": {
            "Content-Type": "application/json",
            "Accept": "application/json",
            "X-API-KEY": "pk_dev_...",
            "X-API-SECRET": "sk_..."
        },
        "body": {
            "sender_wallet_id": 1,
            "receiver_identifier": "client@example.com",
            "amount": 1000,
            "currency": "XAF",
            "description": "Cadeau",
            "pin": "0000"
        },
        "example_response": {
            "success": true,
            "message": "Transfert effectué avec succès.",
            "data": {
                "transaction": {
                    "id": 455,
                    "transaction_code": "TRF202602032342394363",
                    "amount": "1000.00",
                    "currency": "XAF",
                    "status": "completed",
                    "type": "transfer"
                },
                "receiver": {
                    "id": 8,
                    "name": "Nelson Nexky",
                    "email": "nelsonsiebi@gmail.com",
                    "wallet_number": "WAL00000008"
                },
                "fees_applied": 10,
                "timestamp": "2026-02-03 23:42:41"
            }
        }
    },
    {
        "category": "Données",
        "name": "Mes Transactions",
        "method": "GET",
        "url": "http://localhost/api/v1/transactions",
        "headers": {
            "Accept": "application/json",
            "X-API-KEY": "pk_dev_...",
            "X-API-SECRET": "sk_..."
        },
        "body": null,
        "example_response": {
            "success": true,
            "message": "Transactions récupérées avec succès.",
            "data": {
                "current_page": 1,
                "data": [
                    {
                        "id": 455,
                        "transaction_code": "TRF202602032342394363",
                        "amount": "1000.00",
                        "currency": "XAF",
                        "status": "completed",
                        "type": "transfer"
                    },
                    {
                        "id": 454,
                        "transaction_code": "TXN202602032333315041",
                        "amount": "500.00",
                        "currency": "XAF",
                        "status": "failed",
                        "type": "deposit"
                    }
                ],
                "total": 9
            }
        }
    },
    {
        "category": "Retraits",
        "name": "Lister les Retraits",
        "method": "GET",
        "url": "http://localhost/api/v1/withdrawals",
        "headers": {
            "Accept": "application/json",
            "X-API-KEY": "pk_dev_...",
            "X-API-SECRET": "sk_..."
        },
        "body": null,
        "example_response": {
            "success": true,
            "data": {
                "current_page": 1,
                "data": [
                    {
                        "id": 17,
                        "amount": "5000.00",
                        "currency": "XAF",
                        "status": "cancelled",
                        "method": "mobile_money",
                        "withdrawal_reference": "WTH17692563328izKCP"
                    },
                    {
                        "id": 10,
                        "amount": "500.00",
                        "currency": "XAF",
                        "status": "completed",
                        "method": "mobile_money",
                        "withdrawal_reference": "WTH1768006502Msmo5Q"
                    }
                ],
                "total": 9
            }
        }
    }
]