Skip to content

Payments 7/7: End-to-End Payment Orchestration, Observability & Production-Readiness Demo #1576

Description

@yusuftomilola

Problem / Context

Issues #1570#1575 build the individual engineering pieces — domain model, confirmation pipeline, failure handling/reconciliation, wallets, on-chain rail, micropayment ledger — but a coworking-space member needs one coherent journey, and the team needs confidence the whole system is operable in production, not just individually correct.

This is issue 7 of 7 in the payment track — the capstone that ties everything together.

Objective

Wire every prior piece into one demonstrable end-to-end payment flow (fiat or Stellar/Soroban, real-time confirmation, booking activation, credit funding and revenue split where relevant), plus the observability and admin tooling needed to run it in production.

Technical approach

Detailed scope

  • PaymentOrchestrator consolidating rail selection and a single confirmation/status contract for calling code.
  • Admin payment timeline (per-payment event log) and a metrics dashboard.
  • Alerting wired to the thresholds above.
  • Runbook document.
  • Automated E2E test or scripted demo covering both rails plus one induced-failure recovery path.

Important edge cases and failure scenarios

  • A booking's payment succeeds on-chain but the booking-activation step itself fails (app bug, DB hiccup) — the orchestrator must not silently strand a paid-but-unactivated booking; needs a compensating retry and an alert, never a lost state.
  • A user abandons the fiat rail mid-flow and retries with a wallet — the orchestrator must guarantee only one Payment can end up CONFIRMED per booking, reusing Payments 1/7: Payment Domain Model, Initiation Flow & Idempotent Transaction Lifecycle #1570's per-booking uniqueness guarantee.
  • The dashboard/metrics pipeline itself fails or lags — it must visibly degrade to "no data," never present stale numbers as current.
  • A runbook action is invoked against a payment already resolved by the time an admin acts — actions must be safe/no-op against already-terminal payments, reusing every prior issue's idempotency guarantees.

Dependencies

Depends on #1570, #1571, #1572, #1573, #1574, #1575. This is the integration/capstone issue and cannot meaningfully start before #1574 and #1575 exist, since it demonstrates both rails and the ledger/split path.

Acceptance criteria

  • The scripted demo completes successfully end-to-end for both rails in staging, with real-time UI confirmation observed for each.
  • The induced-failure scenario (webhook loss) is shown recovering via reconciliation without manual admin action.
  • The admin dashboard shows accurate, live counts for at least: payments by status, by rail, and manual-review queue depth.
  • The runbook is reviewed and usable by someone other than the implementer (a cold-read check).

Definition of done

The orchestrator is merged and used by the real booking checkout path, not just the demo script; dashboard and alerts are live; the runbook is published in the repo/wiki; the scripted E2E demo passes in CI or is documented as a repeatable manual QA procedure; a walkthrough (recording or live) shows the full journey for both rails.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions