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.

Curated Stage 4 Extractor Profile (vendor:stripe)

Collapses Stripe's hyphenated or spaced 6-digit codes (`482-910` -> `482910`), extracts `dashboard.stripe.com` verification/magic links, and ignores Stripe invoices, receipts, and payout alerts.

Matched Sender Domains
stripe.com
Login URL example: https://dashboard.stripe.com/login
Filtered Non-Auth Noise
  • Receipt from Stripe / payment of $...
  • Invoice # & payout settlement notices
  • Monthly statement notifications

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.com

2. 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

Frequently Asked Questions

Can I keep our finance@company.com address on Stripe and still automate 2FA?
Yes. Add a 60-second Gmail or Outlook filter forwarding Stripe verification emails to your Identity. Stage 2 unwraps the forwarding headers so sender="stripe.com" still matches cleanly.
Does Stripe accept Sentry Relay US SMS numbers?
Yes. Paid plans provision dedicated local US carrier DIDs through Telnyx that accept standard Stripe SMS 2FA messages.
Are raw Stripe emails or OTP codes persisted in a database?
No. Message payloads stay strictly in volatile Upstash Redis memory for 60s–600s and are atomically deleted when burnAfterRead is enabled.
Provision an Isolated Identity for Stripe

Start free in 3 minutes with @in.sentryrelay.com email + Simulated SMS, or attach a dedicated US carrier Telnyx SMS DID starting on Builder ($29/mo) and Growth/Pro ($79/mo).