Skip to content

Bug: Paywall shows previous package's price in Stripe checkout after switching selection #800

Description

@rafaelmaroxa

Description

When using presentPaywall() with multiple packages, if the user selects package A (e.g. $4.99), the Stripe checkout loads
with $4.99. If the user closes the Stripe checkout, returns to the paywall, and then selects package B (e.g. $19.99), the
Stripe checkout loads again with the previous price ($4.99) instead of $19.99.

Selecting the same package B a second time loads the correct price. Opening a fresh paywall and going straight to package B
($19.99) also loads the correct price — the issue only occurs when switching selection within the same paywall session.

Steps to reproduce

  1. Call presentPaywall() with an offering containing 3+ packages at different price points
  2. Click package A ($4.99) → Stripe checkout opens with $4.99 ✅
  3. Close the Stripe checkout (back to paywall)
  4. Click package B ($19.99) → Stripe checkout opens with $4.99
  5. Close the Stripe checkout again
  6. Click package B ($19.99) → Stripe checkout opens with $19.99 ✅

Note: If you dismiss the paywall entirely and re-open it, then go straight to package B ($19.99), the correct price
shows immediately. This suggests the Stripe checkout price is cached from the first selection within a single paywall
session.

Expected behavior

Stripe checkout should always reflect the price of the currently selected package.

Actual behavior

After switching package selection, the first Stripe checkout load shows the previously selected package's price. It only
corrects on the second attempt.

Environment

  • @revenuecat/purchases-js version: 1.26.0
  • Browser: Chrome (macOS)
  • Framework: React (Vite)
  • Using presentPaywall() with htmlTarget and offering params

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions