Skip to main content

Story 3: Online Payment Integration

Overview​

FieldValue
Story IDNGE-14-3
Story Points21
SprintSprint 12
LanguageGo (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?​

RequirementGo Advantage
ReliabilityPayment processing must never fail
ConcurrencyHandle multiple payments simultaneously
Transaction SafetyProper 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)​

MethodEndpointDescription
POST/payments/ordersCreate order
POST/payments/verifyVerify payment
POST/webhooks/razorpayRazorpay webhook
POST/webhooks/cashfreeCashfree webhook
GET/payments/:id/statusCheck status

Security​

  • HMAC-SHA256 signature verification
  • Idempotent payment processing
  • PCI-DSS compliance via gateway

Tasks​

TaskTitleEstimate
T1Go service setup4h
T2Razorpay integration8h
T3Cashfree integration6h
T4Webhook handlers6h
T5Receipt generation4h
T6Payment UI8h
T7End-to-end testing6h