Story 3: Online Payment Integration
Overview​
| Field | Value |
|---|---|
| Story ID | NGE-14-3 |
| Story Points | 21 |
| Sprint | Sprint 12 |
| Language | Go (Gin) |
User Story​
As a Parent
I want to pay fees online using UPI, cards, or netbanking
So that I can pay conveniently without visiting school
Why Go?​
| Requirement | Go Advantage |
|---|---|
| Reliability | Payment processing must never fail |
| Concurrency | Handle multiple payments simultaneously |
| Transaction Safety | Proper rollback on failures |
Supported Gateways​
- Razorpay - Primary gateway
- Cashfree - Backup gateway
Payment Methods​
- UPI (Google Pay, PhonePe, Paytm)
- Credit/Debit Cards
- Net Banking
- Wallets
Payment Flow​
API Endpoints (Go)​
| Method | Endpoint | Description |
|---|---|---|
| POST | /payments/orders | Create order |
| POST | /payments/verify | Verify payment |
| POST | /webhooks/razorpay | Razorpay webhook |
| POST | /webhooks/cashfree | Cashfree webhook |
| GET | /payments/:id/status | Check status |
Security​
- HMAC-SHA256 signature verification
- Idempotent payment processing
- PCI-DSS compliance via gateway
Tasks​
| Task | Title | Estimate |
|---|---|---|
| T1 | Go service setup | 4h |
| T2 | Razorpay integration | 8h |
| T3 | Cashfree integration | 6h |
| T4 | Webhook handlers | 6h |
| T5 | Receipt generation | 4h |
| T6 | Payment UI | 8h |
| T7 | End-to-end testing | 6h |