Skip to content

Open Venmo app from Pay with Venmo on Chrome and in-app browsers - #177

Merged
Arsh-S merged 3 commits into
mainfrom
fix/venmo-chrome-deeplink
Oct 27, 2026
Merged

Arsh-S merged 3 commits into
mainfrom
fix/venmo-chrome-deeplink

Conversation

@eicyer

@eicyer eicyer commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Pay with Venmo now opens the Venmo app, with the amount and order ID prefilled, on Chrome (iOS and Android) and in in-app browsers, not just in Safari.

Description / overview

  • Problem: in Chrome and in-app browsers (Instagram, GroupMe), the https://venmo.com/... link stayed in the browser instead of opening the app. Buyers had to retype the note and amount, which broke automatic payment matching.

  • New VenmoPayButton (frontend/src/components/custom/VenmoPayButton.tsx) picks the link by platform:

    Platform Link
    Desktop, iOS/iPadOS Safari https://venmo.com/{user}?txn=pay&note=…&amount=… (unchanged; Safari opens it in the app as a universal link)
    iOS Chrome, Firefox, Edge, in-app browsers venmo://paycharge?txn=pay&recipients=…&amount=…&note=…
    Android (Chrome and WebViews) intent://paycharge?…#Intent;scheme=venmo;package=com.venmo;S.browser_fallback_url=…;end
  • Fallback when Venmo isn't installed: if the page is still in the foreground 2s after the tap, it goes to the venmo.com link. blur, pagehide or the page becoming hidden cancels this.

  • URL building, platform detection and the fallback are in frontend/src/lib/venmo.ts. The order page no longer builds Venmo URLs inline. Copy Link still copies the https link, because it works wherever it's pasted.

  • Tests: Vitest added to the frontend (pnpm test) and run in CI.

  • Docs: docs/venmo-payment-links.md covers usage, behavior per platform, edge cases and the implementation.

How you tested

Automated

  • cd frontend && pnpm test runs 21 tests in src/lib/venmo.test.ts:
    • each URL format and the encoding of & # = and spaces
    • platform detection for 10 real user agents
    • the fallback with fake timers: it fires after 2s, blur, pagehide and hidden cancel it, and listeners are cleaned up
  • CI passes: build, typecheck, lint, backend and frontend tests.

Manual

  • Desktop Chrome (local dev, pending Venmo order): Pay with Venmo opens venmo.com in a new tab with the amount and order ID prefilled.
  • Real phone: I tapped the button links from a phone. Venmo opened with the amount and note prefilled.

To reproduce on a phone

  1. Open this PR's Vercel preview on your phone (you need Vercel team access), sign in, and open a pending Venmo order: /buyer/order/{id}.
  2. Tap Pay with Venmo in Chrome, Safari and an in-app browser (DM yourself the link in Instagram or GroupMe). Venmo should open with the amount and order ID prefilled. Close it without paying.
  3. Delete the Venmo app (or use a device without it) and tap again. You should land on venmo.com with the same fields within about 2s.

Dependencies

None.

Appendix / notes

  • Lines of code: 968 of the ~1,350 added lines are pnpm-lock.yaml entries for the new vitest devDependency. The rest is about 135 lines of tests, 99 of docs, and about 135 of source.
  • No breaking changes: desktop and iOS Safari behave exactly as before, and no API or schema changes.
  • New frontend devDependency: vitest, plus a Test frontend step in .github/workflows/ci.yml.
  • iOS "Open in Venmo?" prompt: this blurs the page, so a slow tap on the prompt doesn't trigger the fallback. If the buyer dismisses the prompt, the page stays put and the existing "Link not working?" manual details still apply.

Chrome (iOS and Android) and in-app browsers don't hand venmo.com links off
to the app the way Safari does, so buyers had to switch apps and retype the
note and amount, breaking payment matching.

- iOS browsers other than Safari use the venmo://paycharge deep link
- Android uses an intent:// URL with package=com.venmo and a browser fallback
- both fall back to the venmo.com link if the page is still visible after 2s
- iOS Safari and desktop keep the existing venmo.com link
@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
curaise Ready Ready Preview Oct 26, 2026 2:47am UTC

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Emir icyer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: a4e6a7fa-24b1-4802-8944-a00c1b2dc792

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Emir icyer added 2 commits October 25, 2026 22:46
- Move the app-open fallback into lib/venmo.ts so it can be tested
- Add Vitest to the frontend with tests for the URL builders, platform
  detection and every fallback path
- Run frontend tests in CI
@Arsh-S
Arsh-S merged commit e8f62c3 into main Oct 27, 2026
5 checks passed
@Arsh-S
Arsh-S deleted the fix/venmo-chrome-deeplink branch October 27, 2026 15:21

This branch was successfully deployed

1 active deployment
Preview — 9aca973a Deployed Oct 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants