{
    "name": "Otantik Pay API",
    "description": "Fapshi payment API. Test with Postman.",
    "endpoints": {
        "POST initiate-pay.php": {
            "description": "Create a deposit (payment) link",
            "body": {
                "amount": "(required) integer, min 100 XAF",
                "reason": "(optional) string, reason for payment",
                "userId": "(optional) string, your internal user id",
                "externalId": "(optional) string, order/transaction id for reconciliation",
                "redirectUrl": "(optional) string, URL after payment",
                "email": "(optional) string, pre-fill email on checkout"
            },
            "response": "link, transId, message, dateInitiated"
        },
        "GET payment/return.php": {
            "description": "Return URL for Fapshi redirect; also returns JSON with status when called with Accept: application/json",
            "query": "transId, status (from Fapshi)"
        },
        "POST webhook.php": {
            "description": "Fapshi webhook (configure in dashboard). Receives payment status updates."
        },
        "GET health.php": {
            "description": "Health check"
        }
    },
    "example_deposit": {
        "POST": "http://desktop-a1bhprb.tailb49cb9.ts.net/otantik_pay/initiate-pay.php",
        "Content-Type": "application/json",
        "body": {
            "amount": 500,
            "reason": "Deposit for order #123",
            "userId": "user-456",
            "externalId": "order-123",
            "redirectUrl": "http://desktop-a1bhprb.tailb49cb9.ts.net/otantik_pay/payment/return.php",
            "email": "customer@example.com"
        }
    }
}