Repository navigation
Uber Pay PSP Reference App Upgrade - #5
Merged
Merged
Conversation
Summary: Intent: - Give PSP engineers a cloneable implementation of the partner-hosted Uber Pay contract instead of the legacy deposit-only client demo. - Keep Node.js, Java, and Go behavior aligned through an independent signed-wire conformance suite. Changes: - Implement all nine partner operations and six callback clients natively in TypeScript/Express, Java/Spring Boot, and Go/net/http. - Add exact E5 codecs, RSA signed ingress, OAuth consent/grants, a durable synthetic PostgreSQL ledger, idempotency, asynchronous jobs, and callback retry/recovery. - Vendor the unchanged API contract with provenance and documented local errata; add fixtures, Docker Compose recipes, per-language CI, and PSP integration/security guides. - Retire the old deposit UI and its obsolete build/dependency stack. Test Plan: - Ran make verify DATABASE_URL=postgresql://uberpay@127.0.0.1:55432/uberpay against a disposable PostgreSQL instance: 53 independent wire scenarios passed per language (159 total), with zero failures or skips. - The shared scenarios exercise signed requests and exact response/callback contracts, eight concurrent copies of one charge with only one ledger effect, capture/cancel races, partial-refund limits, OAuth code reuse, callback transient/permanent errors and retry exhaustion, and pending-work recovery after a forced process kill. - Exact E5 values above the JavaScript safe-integer boundary round-trip through the gateways and PostgreSQL. Migration up/repeated-up/down passed in a rollback-only isolated schema. - Native unit/security checks, Go race/vet checks, Python lint/format, pinned-source hash/reference checks, and git diff --check passed. - Docker Engine was unavailable locally. Container smoke gates are configured in CI but have not been observed running. No real Uber sandbox or live-money call was made. API Changes: - Breaking reference-app replacement: expose the PSP-hosted payment, payout, and wallet-onboarding APIs; remove the old deposit-init demo interface. - Only synthetic local mode is runnable. Real PSP/wallet adapters, external-operation dispatch/reconciliation, and Uber contract/sandbox approval are required before external processing; non-local modes fail closed. Monitoring and Alerts: - No production traffic, service rollout, or live data migration. CI and local conformance reports qualify this reference repository. Revert Plan: Revert this PR to restore the deposit demo. No production database migration is involved; local synthetic PostgreSQL data is disposable.
Replace deposit demo with multi-language PSP reference gateways
Summary: Intent: - Prevent closed settlement windows from being rejected or missing journal entries when the exporter host and PostgreSQL clocks differ. Changes: - Validate database-backed sealing against PostgreSQL time and pass the same closure clock into report rendering. - Obtain settlement acceptance-test cutoffs from the journal database and remove the fragile fixed sleep. - Require a regression that exercises an exporter clock one day ahead and behind, preserves byte-identical replay, and still rejects genuinely future periods. - Clarify settlement clock authority in the adopter guide. Test Plan: - Reproduced the pre-fix open/future-period error with the host-clock-skew regression, then verified the same regression succeeds after the fix without relaxing future-period rejection. - Ran all four settlement scenarios against Node.js, Java and Go from this branch: 12 passes, zero failures/errors/skips. - Full local conformance reports for the identical source tree show 228 tests per runtime (684 total), zero failures/errors/skips, and qualified=true for each runtime. - Ran make test contract lint migration-check, plus an uncached Go race-test run; all completed successfully. API Changes: - No HTTP API, schema or settlement-format change. Database-backed closure uses the same clock as the immutable journal. Monitoring and Alerts: - Local synthetic reference only; no production traffic, rollout or new monitoring. Revert Plan: Revert this PR. No database schema or data migration is required.
…t-clock Use database time for settlement cutoffs
segFault091
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this upgrade, the reference app demonstrated an older deposit flow: it simulated an Uber client, sent a deposit-initiation request to a mock merchant, and called Uber’s sandbox deposit API. That is the opposite side of the integration a PSP needs to build. A PSP must host the partner-facing payment, payout and OAuth endpoints, return contract-compliant responses, and send the required callbacks to Uber. The deposit-only demo did not show a PSP what to implement or how to prove interoperability.
We propose a cloneable reference app with Node.js, Java, and Go implementations of the same Uber Pay contract. A PSP can choose its language, run a fake-money example locally, replace a clearly defined PSP adapter with calls to its own systems, and use a common test suite before sandbox integration. The value is a more self-service, consistent integration path—not a claim that cloning the repository alone grants Uber credentials or production approval. We will measure time to first passing local integration test, time to sandbox qualification, contract-suite pass rate, and integration issues found during onboarding.