Many customers open your site from a link inside Facebook, Messenger or Instagram. Those apps use their own built-in browser. Handle each case like this:
| Customer is on | What to show |
|---|---|
| iPhone or iPad, any browser | The "Continue to RocketRamp" link (Opening the Checkout). |
| Android Chrome, Samsung Internet, Firefox | The modal (Opening the Checkout), plus an "Open it in a new tab" link under it. |
| Android in-app browser (Facebook, Messenger, Instagram, Gmail and others) | An intent:// link that opens your own payment page in the phone's real browser (below). RocketRamp does not run inside Android in-app browsers: it shows an "In-app browser detected" screen, and that screen's "Open in Chrome" button loses the checkout. |
| iPhone in-app browser (Facebook, Messenger, Instagram) | The "Continue to RocketRamp" link, plus a "Copy payment link" button. The checkout works there. If the customer prefers Safari, they use the app's menu, then "Open in browser", or paste the copied link into Safari. |
Detecting an in-app browser
function inAppKind() {
const ua = navigator.userAgent || '';
const app = /(FBAN|FBAV|FB_IAB|Instagram|GSA|Gmail|Line|LinkedInApp|Twitter|Snapchat|TikTok|MicroMessenger|Pinterest|KAKAOTALK)/i.test(ua);
if (/Android/i.test(ua) && (app || /\bwv\b/.test(ua))) return 'android';
if (/iPhone|iPad|iPod/.test(ua) && app) return 'ios';
return '';
}Android in-app: hand off to the real browser
Create a page on your site, for example /rr-pay.html?c=<embed_code>. It reads the code, checks that it is a UUID, and shows the same iframe as the desktop modal; on Safari it goes straight to the checkout address instead. It needs no login, because the embed_code is the checkout. Link to it with an Android intent:
const page = 'https://shop.example.com/rr-pay.html?c=' + embedCode;
link.href = 'intent://' + page.slice('https://'.length) + '#Intent;scheme=https;end';Paying in another browser is fine: the webhook carries the embed_code, so you credit the right customer wherever they paid.
Copy payment link
Copy inside the same tap. Try document.execCommand('copy') on a hidden text box first, then navigator.clipboard.writeText(). If both fail, show the link in a text box so the customer can press and hold to copy it. In-app browsers refuse clipboard access on touch-start, so copy in the click handler.