Back to Blog
technicalpayments

UPI with PhonePe for Multi-Business Apps: Spring Boot + React Native

Route payments to the right merchant account per business, with secure callbacks and reconciliation.

CloudMyle Team
7/30/2025
1 min read
Reading time: 1 minutes

đź’ˇ What You'll Learn

Route payments to the right merchant account per business, with secure callbacks and reconciliation.

UPI with PhonePe for Multi-Business Apps: Spring Boot + React Native

If your app serves multiple businesses, UPI needs careful routing. Here’s how we wired PhonePe so each business gets paid to its own merchant account.

Data Model

  • Business: PhonePe merchant keys, UPI ID, callback URLs, settlement preferences.
  • Payment: status machine (created → pending → success/failed → reconciled), amount, currency, external reference IDs.
  • Audit: request/response logs (masked), signatures, retries.

Flow

  1. Client requests payment intent with business ID and amount.
  2. Backend signs the request with the business’s merchant key; creates a Payment record.
  3. Client shows QR/Intent; user pays via any UPI app.
  4. PhonePe calls your callback → verify signature → update status.
  5. Nightly reconciliation: cross-check settlements and mark reconciled.

Security & Reliability

  • HMAC signatures on every message; validate timestamps/nonces.
  • Idempotent callbacks (dedupe by transaction reference).
  • Retries with back-off for transient failures.
  • Mask PII; store only what you must (no sensitive PAN-like data).

Client UX

  • Show a countdown on the UPI screen with “I’ve paid” and “Try again” actions.
  • Deep-link to installed UPI apps; fallback to static QR.
  • Clear success/failure screens; auto-dismiss on success callback.

With the right abstractions, you can support thousands of payments across many businesses without mixing funds.

🎯 Key Takeaways

  • Expert insights on technical development
  • Practical implementation strategies
  • Best practices from industry professionals
  • Actionable steps for your next project

📚 Continue Reading

Related Article 1

Discover more insights on technical development...

Related Article 2

Discover more insights on technical development...

Related Article 3

Discover more insights on technical development...

🏷️ Topics Covered

upiphonepespring-bootreact-nativepaymentsqr

📊 Article Stats

Word Count198
Reading LevelIntermediate
Categorytechnical

🚀 Ready to Build Something Amazing?

Transform your ideas into reality with CloudMyle's expert development team. From custom software to mobile apps, we've got you covered.

đź’ť Found this helpful? Share it!