Metadata-Version: 2.4
Name: fampaygateway
Version: 1.0.0
Summary: Official Python SDK for SR King FamPay Gateway — free automated UPI payment links, order verification, and HMAC-SHA256 webhook verification.
Author-email: SR King <contact@srking5306.dev>
License: MIT
Project-URL: Homepage, https://fampaygateway.lovable.app
Project-URL: Documentation, https://fampaygateway.lovable.app/integration
Project-URL: Repository, https://github.com/SRKing5306/fampay-gateway-python
Keywords: fampay,upi,payment-gateway,telegram-bot,india,webhook
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# fampay-gateway (Python SDK)

Official zero-dependency Python SDK for **[SR King FamPay Gateway](https://fampaygateway.lovable.app)** — a free, zero-fee FamPay UPI payment gateway for Indian Telegram bots, apps, and websites.

- **0% transaction fee** — payments go directly to your own FamPay UPI ID
- **Zero external dependencies** — uses Python standard library only
- **Signed HMAC-SHA256 webhook verifier** included

## Quick Start

```python
from fampay_gateway import FamPayGateway, verify_webhook_signature

gw = FamPayGateway("YOUR_GATEWAY_CODE")

# 1. Create a locked 31-day payment link
pay_url = gw.create_link(
    amount=199,
    order_id="ORD1001",
    redirect_url="https://t.me/YourBot?start=paid_ORD1001",
)
print("Send to customer:", pay_url)

# 2. Confirm payment server-side before delivering
if gw.is_paid("ORD1001", expected_amount=199):
    print("Verified! Deliver product.")
```

## Verify Signed Webhooks

```python
is_valid = verify_webhook_signature(
    raw_body=request.body,
    timestamp=request.headers["X-SRKing-Timestamp"],
    signature=request.headers["X-SRKing-Signature"],
    secret="whsec_your_secret_from_dashboard",
)
```

## Links
- Dashboard & Setup: [https://fampaygateway.lovable.app/dashboard](https://fampaygateway.lovable.app/dashboard)
- Free UPI QR & Link Generator: [https://fampaygateway.lovable.app/tools](https://fampaygateway.lovable.app/tools)
- Full Integration Docs: [https://fampaygateway.lovable.app/integration](https://fampaygateway.lovable.app/integration)
- Support: [Telegram @SRKING5306](https://t.me/SRKING5306)
