Skip to content

Payments: enable Razorpay checkout for 1:1 consultations behind FeatureFlags.payments #113

Description

@teetangh

Context

The schema-sync MVP ships read-first: booking requests are created without payment (bookingSource: REQUEST_SUBMITTED), consultants approve to APPROVED_PENDING_PAYMENT, and payment completes on the web. All checkout/payment surfaces are gated behind FeatureFlags.payments (false), with backend featureGate middleware returning 403 feature_disabled on checkout/, payments/, invoices/, webhooks/.

App Store compliance

  • 1:1 person-to-person services (consultations, 1:1 subscriptions) may use purchase methods other than IAP per App Review Guideline 3.1.3(d) → Razorpay in-app is allowed for these.
  • One-to-few/one-to-many (webinars, classes) must use IAP — tracked separately.
  • Keep approved-pending-payment copy neutral for group programs (already handled in lib/domain/entities/booking/booking.dart).

Scope (priority order: Razorpay → Stripe → Dodo)

  1. Re-enable direct checkout path in lib/features/booking/screens/booking_screen.dart (FeatureFlags.payments branch already preserves it)
  2. Update checkout_repository.dart + webhook_handlers.dart for the synced schema: Payment BigInt paise amounts, PaymentLeg rows (CARD leg at minimum), clientIdempotencyKey, Refund/Dispute.amountPaise
  3. Decide webhook ownership — see refactor(payments): Swiggy-style architecture - Web-only webhook processing with mobile read-only access #15 (web-only webhook processing) and Critical: Race condition risks when mobile and web backends run simultaneously #19 (race conditions when both backends run)
  4. Pay-now button re-enable (booking_action_buttons.dart, my_bookings_screen.dart — already flag-gated)
  5. Flip FeatureFlags.payments in lib/core/config/feature_flags.dart + backend/lib/config/feature_flags.dart together

Related: #15, #19, #20, #44, #45, #57

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions