Payments & Commercevendor:stripeEmail OTPUnwrapped Magic LinkCarrier SMS DIDCloud KMS TOTP
Automate Stripe 2FA SMS & Email Login in Playwright, Stagehand & Browser Use
Automate Stripe Dashboard SMS 2FA, hyphenated 123-456 email codes, login magic links, and KMS TOTP without mixing up payout or receipt emails.
1. 60-Second Gmail & Outlook Auto-Forwarding Filter
Don't want to change your existing account email on Stripe? Keep your corporate inbox on Stripe and forward only verification emails to <identity-slug>@in.sentryrelay.com. Sentry Relay's Stage 2 unwrapper preserves the original Stripe sender header automatically (full setup guide).
# Paste into Gmail -> Settings -> Filters -> Create a new filter ("Has the words")
from:(stripe.com) ("verification code" OR "security code" OR "confirm your email" OR "sign in to Stripe")
# Action: Forward it to -> <your-identity-slug>@in.sentryrelay.com2. Copy-Paste Stripe 2FA Automation Snippets
Choose your browser automation stack below. All snippets resolve codes in <200ms with Upstash Redis 15-second lookback protection so arrived-before-wait race conditions never fail a run.
import { test, expect } from '@playwright/test';
import { SentryRelay } from '@sentryrelay/sdk';
const relay = new SentryRelay({ apiKey: process.env.SENTRY_RELAY_API_KEY! });
test('Automate Stripe Dashboard 2FA login via SMS or Email OTP', async ({ page }) => {
await page.goto('https://dashboard.stripe.com/login');
await page.fill('input[name="email"]', process.env.STRIPE_EMAIL!);
await page.fill('input[name="password"]', process.env.STRIPE_PASSWORD!);
await page.click('button[type="submit"]');
// Wait for Stripe SMS or forwarded Email 2FA code (collapses 123-456 -> 123456)
const auth = await relay.wait('stripe-finance-bot', {
sender: 'stripe.com',
timeout: 35,
});
if (auth.event?.otpCode) {
await page.fill('input[autocomplete="one-time-code"], input[name="code"]', auth.event.otpCode);
await page.click('button[type="submit"]');
} else if (auth.event?.magicLink) {
await page.goto(auth.event.magicLink);
}
await expect(page).toHaveURL(/dashboard\.stripe\.com/);
});3. Stripe Production Gotchas
Hyphenated Stripe Codes (`482-910`)
Stripe often formats 6-digit email codes with a hyphen (`482-910`). Sentry Relay automatically collapses hyphens to `482910` so single-field or segmented inputs never drop a digit.
Receipt & Payout Emails Never Contaminate Auth
If you forward a finance inbox that also receives Stripe payment receipts or payout notifications, Stage 4 disqualifies `Receipt from`, `Invoice #`, and `payout of $` messages automatically.
Non-OTP Fraud Alerts Forwarded Safely
With The Human-Fallback Safety Bridge™ enabled, any non-OTP security text sent to your Stripe DID is routed straight to your founder email or Slack channel instead of disappearing into an API log.