Skip to content

fix(checkout): P0 — no checkout.link_expired handler → overlay frozen at 'Processing 00:00' #4435

Description

@koala73

Summary

When a Dodo checkout session/payment-link expires mid-flow, the SDK emits checkout.link_expired and does not self-close the iframe. Our overlay event handler has no case for it, so the customer is stranded on a frozen "Processing… / Payment Link Expires in 00:00" overlay with no recovery — the literal symptom in the incident screenshots.

Evidence

  • SDK 1.8.0 (node_modules/dodopayments-checkout/dist/index.esm.js) emits checkout.link_expired and only self-removes the iframe when the iframe itself posts checkout.closed.
  • Our handler (src/services/checkout.ts:331-411) switches on checkout.opened, checkout.status, checkout.closed, checkout.redirect_requested, checkout.errorno checkout.link_expired branch.
  • The "Expires in 00:00" countdown is Dodo's showTimer UI bound to the session's server-side expires_at. We do not set confirm=true, so sessions use Dodo's 24h default — these frozen overlays are abandoned-then-reopened expired links with no client-side escape.

Fix direction (small)

Add a case 'checkout.link_expired' that: (a) safeCloseOverlay() to clear the frozen iframe, (b) surfaces an actionable "payment link expired — retry" surface (reuse the existing failed-return banner/error taxonomy), and (c) preserves retry context so the user can re-initiate without hunting.

Test first

Drive the lifecycle stub to emit checkout.link_expired and assert the overlay is closed + a retry surface is shown (revert-check: removing the case leaves the overlay open).


Part of the DodoPayments 3DS stuck-payments incident.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Critical, blocks release or core functionalityUX/UIUser interface and experiencebugSomething isn't workingcriticalCritical issue requiring immediate attention

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions