<?php
$pageTitle = "Is FamGateway Secure? — API Security Architecture";
$blogKicker = "Developer Guide";
include 'includes/blog-header.php';
?>
<p>When dealing with payments, security is the top priority. Traditional gateways require extensive KYC because they take custody of your money before settling it to your bank days later. FamGateway flips this model entirely.</p>
      
      <h2>Zero Custody of Funds</h2>
      <p>The most important security feature of FamGateway is that <strong>we never touch your money</strong>. When a user scans the dynamic UPI QR code, the funds are transferred directly from their bank account to your FamPay UPI ID via the NPCI (National Payments Corporation of India) network.</p>
      
      <div class="highlight">
        Because the transaction happens entirely on the UPI network between the payer and you, FamGateway has zero ability to intercept, delay, or hold your payments. Settlement is instant.
      </div>

      <h2>Read-Only IMAP Parsing</h2>
      <p>To verify that a payment was successful, FamGateway asks you to connect a Gmail account (via an App Password). We use the IMAP protocol in a strictly <strong>read-only</strong> manner.</p>
      
      <h3>1. App Passwords instead of Main Passwords</h3>
      <p>We mandate the use of Google App Passwords. This means you never give us your actual Gmail password. Furthermore, an App Password can be instantly revoked by you at any time from your Google Dashboard, immediately cutting off our access.</p>

      <h3>2. Scoped Email Searching</h3>
      <p>Our background daemon does not download your entire inbox. It runs specific IMAP search queries to only fetch unread emails sent by <code>alerts@fampay.in</code> with the subject line matching payment receipts. We do not process, store, or log any other personal emails.</p>

      <h2>Protection Against Fake Payments</h2>
      <p>Because FamGateway relies on cryptographic notifications from FamPay's official email servers, users cannot "fake" a payment by showing a screenshot or spoofing a client-side network request. The API only marks an order as <code>success</code> if the server-side IMAP client securely fetches a valid, cryptographically signed email receipt directly from FamPay and perfectly matches the <strong>cryptographic Order ID</strong> embedded in the receipt's purpose note.</p>
      
      <p><a href="../index.php" style="color: #2563eb; font-weight:600;">Back to Homepage →</a></p>

      <!-- Founder & Author Bio Block -->

<?php include 'includes/blog-footer.php'; ?>
