Rovenue SDKBeta
FunnelsWeb

One-click Upsells

Offer pages after a web funnel's payment that charge the card the buyer just used — what the buyer sees, the consent line, card vs wallet, 3D Secure, declines, the one-hour window, refunds, webhooks, pixels, erasure and rollout.

After a buyer pays on a web funnel, the funnel can show up to five offer pages. One tap on an offer charges the card the buyer just paid with: no card form, no redirect. Accepting or declining moves the buyer to the page you chose, which can be another offer (an up-sell or a down-sell), a thanks page, or the end of the funnel. What they buy reaches the app through the claim they already hold.

One-click upsells ship off. While FUNNEL_UPSELLS_ENABLED is false (the default), publishing a funnel with an offer is refused with UPSELLS_DISABLED, and the upsell routes answer 404 UPSELLS_DISABLED (apps/api/src/lib/env.ts:625-631, apps/api/src/routes/public/funnel-upsell.ts:100-103). With the flag off the runner also draws no consent line and the checkout saves no card for an offer (even on a version published while it was on), the builder hides Add upsell after purchase, and the MCP describe_funnel_schema answer carries no offer recipe. See Turning it on.

What you can sell

An offer is an upsellOffer block. It names one package of the funnel's offering, and has two next pages: acceptedNext and declinedNext (packages/shared/src/funnel/blocks-schema.ts:1180-1190). An empty next page means the next page in order, or the end of the funnel when there is none. The package is either:

  • a one-time product, charged once; or
  • an add-on subscription, a second subscription beside the one just bought. It is charged in full today and never starts a trial, even when its Stripe price has one (apps/api/src/services/funnel/upsell-charge.ts:527-540).

Upgrading or downgrading the plan the buyer just bought is not supported.

The offer's copy and its two buttons are the block's children. The accept button's action is upsell_accept, the decline button's is upsell_decline (packages/shared/src/funnel/actions-schema.ts:114-125). {{product.*}} placeholders on an offer page name the offer's package, not the package chosen at checkout (packages/funnel-core-rs/src/resolve.rs:457-467).

Limits:

  • Web funnels only. A native funnel cannot carry the block or its actions, and converting a web funnel to native drops them (packages/funnel-core-rs/src/capabilities.rs:133-152).
  • At most five offers per funnel, and one per page (packages/funnel-core-rs/src/schema.rs:1994).
  • A price with a fixed amount. A metered price, or one where the customer chooses the amount, cannot be charged in one tap (UPSELL_PRICE_NOT_CARD_SAFE).
  • The checkout's currency. The saved card is charged in the currency of the first payment, so the offer's price must have it (UPSELL_CURRENCY_MISMATCH). A session pinned to a local currency (Settings › Payments › local currency) is charged in that currency, at the price's currency_options amount for it, with the tax computed in it; an add-on subscription is created in it too.

The full list of offer checks, with the code publish refuses or warns with, is on Publishing (the UPSELL_* rows).

Building an offer

On a paying page's Flow tab, Add upsell after purchase inserts a template offer page right after it. The page has a heading, a line of copy, and accept and decline buttons, all inside the offer. The paying page's After purchase page now points at the offer. Wherever the buyer used to go after paying becomes the page for both answers, so adding an offer never changes where a buyer ends up (apps/dashboard/src/components/funnel-builder/vm/funnel-draft.vm.ts:1120-1131). The button is hidden on native funnels and once the funnel has five offers (apps/dashboard/src/components/funnel-builder/vm/funnel-draft.vm.ts:1116-1119).

The offer's inspector has:

  • a package picker, showing each package's price, currency and interval, with a Trial ignored badge on a price that carries a trial;
  • Accepted → page and Declined → page;
  • a read-only Card consent preview (the consent line);
  • Preview states that draw the offer on the canvas as the buyer sees it: Offer, Processing, Declined, Accepted and Wallet. Preview states are never saved (apps/dashboard/src/components/funnel-builder/vm/funnel-draft.vm.ts:110-112).

The flow map draws the edges out of an offer dashed, labeled after payment (apps/dashboard/src/components/funnel-builder/workflow-tab.tsx:129-155). An agent writing the document over MCP gets the same recipe from describe_funnel_schema (apps/api/src/services/mcp/tools.ts:440).

Keep both buttons inside the offer. Only buttons inside it wait for the price, lock while the card is charged, and become the Apple Pay / Google Pay button. A button beside the offer is the UPSELL_ACTION_OUTSIDE_OFFER blocker. An offer page needs a decline button (UPSELL_NO_DECLINE), and must be reached only through a payment: a paying page's After purchase page, or another offer's next page (UPSELL_NOT_AFTER_PAYMENT, UPSELL_OFFER_UNREACHABLE).

Saving the card

The card is saved for offers only when both of these are true:

  1. the published version the buyer's session is pinned to carries an offer;
  2. the runner showed the consent line under the pay button, and reported its current wording version.

Then the first payment saves the card. Without either, the payment is the same as on a funnel with no offer, and every offer is skipped. How each checkout path saves the card is in Checkout.

On a funnel that carries an offer, the runner shows one line under every pay button: the card form, the checkout step and the inline wallet buttons (apps/dashboard/src/runner/card-checkout-host.tsx:229, apps/dashboard/src/runner/payment-step.tsx:667, apps/dashboard/src/runner/express-host.tsx:373). In English:

By paying, you allow {merchant} to save this card and charge it for any extra offer you accept on the next pages, and for renewals of any subscription you accept.

(apps/dashboard/src/runner/locales/en.json:73). {merchant} is the project's site name from page identity, else the page title, else the host name (apps/dashboard/src/runner/upsell-host.tsx:281-285). The line is translated into every runner language: English, Turkish, German, Spanish, French, Portuguese, Italian, Japanese, Korean and Chinese (apps/dashboard/src/runner/locales/chrome-packs.ts:17-321). You cannot edit it.

The server stores the wording's version and the time it was shown on the purchase. That is the record that the buyer agreed to have the card stored (apps/api/src/routes/public/funnel-payment.ts:1392-1400). The version is UPSELL_CONSENT_TEXT_VERSION, and it changes with every change to the wording. A runner that reports an older version saves no card (packages/shared/src/funnel/upsell.ts:41-47).

What the buyer sees

On an offer page, the runner first asks the server for a quote. While it waits, the offer is dimmed under a spinner. After 4 seconds without an answer, the offer is skipped (apps/dashboard/src/runner/upsell-host.tsx:502-523, packages/shared/src/funnel/upsell.ts:40).

When the offer can be charged, the buyer sees your copy and a Due today line: the amount charged now, tax included (apps/dashboard/src/runner/upsell-host.tsx:784-786). What happens on accept depends on what paid the first time.

A card: one tap

The server charges the saved card while the buyer is on the page. Both buttons are locked from the tap until there is an answer. On success the offer shows Added to your order for 600 ms, then moves on to the accepted page (apps/dashboard/src/runner/upsell-host.tsx:106, apps/dashboard/src/runner/upsell-host.tsx:544-552). The success state is drawn only after the server reports the charge paid. When Stripe is still processing, the runner keeps asking (apps/dashboard/src/runner/upsell-host.tsx:527-568).

The charge is a customer-initiated payment: the server never marks it off_session, because the buyer is present and pressing the button (apps/api/src/services/funnel/upsell-charge.ts:503-516). The card can therefore ask for 3D Secure.

3D Secure

When the bank asks for authentication, the offer shows Confirm the payment with your bank… and the challenge opens on the page. When it closes, the runner asks the server for the result. It does not assume the challenge succeeded (apps/dashboard/src/runner/upsell-host.tsx:582-591). A failed challenge shows Your bank couldn't verify this payment. with Use another card (apps/dashboard/src/runner/upsell-host.tsx:440-444).

A challenge the buyer walks away from stays open until the window sweep closes it.

Apple Pay or Google Pay: one tap in the wallet sheet

A card saved from Apple Pay or Google Pay is never charged by the server alone. The accept button becomes the wallet button for the same wallet, and the buyer confirms once in the wallet sheet (apps/api/src/services/funnel/upsell-charge.ts:635-637, apps/dashboard/src/runner/upsell-host.tsx:992-993). If the wallet is not available on this device, for example after a reload, the offer says Your wallet isn't available on this device. You can pay with a card instead. and offers Use another card beside your decline button (apps/dashboard/src/runner/upsell-host.tsx:779-808).

Limits of what has been tested:

  • Google Pay end to end (the first payment made with Google Pay, then the offer answered with the wallet sheet and paid with one tap) needs a browser profile signed in to Google Pay's test environment. Until that run has been done, the wallet path is proven up to the point where the wallet button replaces the accept button. The card path is proven end to end.
  • Apple Pay on the web only works over HTTPS, on a domain registered as a payment method domain in Stripe, in Safari with a card in Wallet. It is checked by hand on an iPhone, not by an automated test.

Declines

A declined card keeps the buyer on the offer page with the reason (Your bank declined this payment.), Use another card, and your decline button (apps/dashboard/src/runner/upsell-host.tsx:593-602). Use another card opens a card form for this one charge. The new card is not saved for later offers: they still charge the card from the first payment. An add-on subscription paid with the new card renews on it (apps/dashboard/src/runner/upsell-host.tsx:652-664, apps/api/src/services/funnel/upsell-charge.ts:511, apps/api/src/services/funnel/upsell-charge.ts:682-683).

If the amount changed between the quote and the tap (tax, for example), nothing is charged. The offer shows the new total and waits for a second tap (apps/dashboard/src/runner/upsell-host.tsx:618-624).

Skipped offers

The buyer never sees an offer that cannot be charged. The runner moves on to the declined page without a word when any of these is true (packages/shared/src/funnel/upsell.ts:150-166, apps/api/src/services/funnel/upsell-charge.ts:221-310):

  • the first payment is not paid, or saved no card (no consent line, a trial whose card is not on file yet);
  • the first payment was not a card or Link: SEPA, iDEAL and other methods cannot be charged again (a Link payment is charged again on its saved Link method; Apple Pay and Google Pay open the wallet sheet instead);
  • the offer's price is archived, in another currency, or on another Stripe account or mode than the first payment;
  • the buyer already has everything the package grants;
  • the offer has expired (see below), upsells are turned off, or the per-card or per-session limit is reached;
  • the quote did not answer in 4 seconds.

An offer that was already bought in this session (a second tab, a replay) moves on to the accepted page instead.

Each skip is recorded as a funnel.upsell.skipped event with its reason.

The one-hour window

A new charge is allowed only within 60 minutes of the first payment. After that the server answers 410 UPSELL_EXPIRED and the runner skips the offer (apps/api/src/services/funnel/upsell-charge.ts:229-232, packages/shared/src/funnel/upsell.ts:31-32). Finishing a charge that already started is never refused by the window: a 3D Secure challenge started at minute 59 and completed at minute 61 still settles, and so do Stripe's webhooks.

A worker sweeps every 5 minutes for charge attempts that never finished: an abandoned 3D Secure challenge, a wallet or card sheet never confirmed, an add-on subscription whose first invoice was never paid. It takes each attempt that is more than 60 minutes old, counted from the attempt's own start. It asks Stripe first: if the money was taken, the purchase is completed. Otherwise the payment, or the incomplete subscription, is canceled, and a funnel.upsell.failed event is emitted (apps/api/src/workers/upsell-window-sweep.ts:1-40, apps/api/src/workers/upsell-window-sweep.ts:66-75).

Limits on charges

  • 5 new charge attempts per card per hour, per connected Stripe account and mode.
  • 10 new charge attempts per session per hour (packages/shared/src/funnel/upsell.ts:33-36).

A retry of the same attempt does not count. Neither does a second tap while an attempt is still running: both return that attempt's state instead of charging again. A Use another card attempt counts against the session only (apps/api/src/services/funnel/upsell-charge.ts:625-668).

Who can charge the card

The right to charge is an upsell token. The server issues it only to the browser that paid. That browser proves it by sending the first payment's Stripe client secret to /confirm. The token is bound to the page's origin, and every upsell call must come from that origin (apps/api/src/routes/public/funnel-payment.ts:304-350, apps/api/src/services/funnel/upsell-token.ts:102-112). How the browser keeps it depends on where the funnel runs:

Runner hostWhere the token livesAfter a reload
The dashboard host (cloud /f/…), same site as the APIAn HttpOnly, Secure, SameSite=Strict cookie, scoped to the session's API path. Page scripts cannot read itOffers still charge by card. A wallet offer shows Use another card
A custom domain, or any host on another site than the APIMemory only, inside the runner's code: never window, web storage, a cookie or a URLThe token is gone. Remaining offers are skipped

(apps/api/src/services/funnel/upsell-token.ts:154-170, apps/api/src/services/funnel/upsell-token.ts:245-252, apps/dashboard/src/runner/upsell-host.tsx:168-185). On a self-hosted deployment, the cookie is used only when the dashboard and the API share a registrable domain. Third-party scripts on the page, pixels and tag managers included, never see the token.

After the charge

Access. The purchase goes to the buyer who made the first payment. If the claim has already merged that buyer into the app's user, it goes to that user (apps/api/src/services/funnel/complete-upsell.ts:215). The claim covers offers bought before or after it is redeemed. Settling is done once, whether the runner or Stripe's webhook gets there first. If the tab closes after the charge, the webhook completes it (apps/api/src/services/stripe/stripe-webhook.ts:469-495).

Tax. When the project uses Stripe Tax, it runs on an offer as it does on the first payment, and the Due today amount includes it (apps/api/src/services/funnel/upsell-charge.ts:503-538).

Refunds. An offer is its own Stripe payment or subscription. Refunding it takes back that offer's access and credits only, and refunding the first payment leaves the offer untouched. There is no cascade in either direction (apps/api/src/services/stripe/stripe-webhook.ts:2304-2362). An offer's REFUND revenue row is positive, like every refund.

Revenue analytics. An offer's revenue carries the funnel session of the first payment, so it counts toward that session, and its experiment arm, in Revenue Analytics (apps/api/src/services/funnel/complete-upsell.ts:95-108).

Events and webhooks

Every offer emits one event family (packages/shared/src/funnel/upsell.ts:220-227):

EventWhenSent to webhooks
funnel.upsell.shownThe first quote that can be charged, once per session and offerno
funnel.upsell.skippedThe offer was skipped, once per reasonno
funnel.upsell.acceptedA charge attempt startedno
funnel.upsell.declinedThe buyer pressed decline, once per session and offeryes
funnel.upsell.chargedThe charge settledyes
funnel.upsell.failedAn attempt was declined, failed authentication, or was canceledyes

All six reach ClickHouse (raw_funnel_events, with offerKey and upsellPurchaseId). The three public ones go to outbound webhooks without an amount: the money arrives as its own revenue.* event.

Pixels

An offer's charge is its own conversion, upsell_purchase, with its own event id. The id is derived from upsell:<attempt id> and never equals the first purchase's (packages/shared/src/funnel/upsell.ts:308-311, packages/shared/src/pixels/events.ts:74-76). The browser pixel fires only when the server reports the charge paid. The server owns the decision of whether the server or the browser sends it, once per vendor (apps/api/src/routes/public/funnel-upsell.ts:191-200, apps/api/src/services/funnel/upsell-pixel.ts:1-50).

Erasure and export

A subscriber export (DSAR) includes every offer attempt of the subscriber's funnel sessions: what was offered, the amounts, the Stripe objects, and how each attempt ended. It never includes the token (apps/api/src/services/gdpr/export-subscriber.ts:166, apps/api/src/services/gdpr/export-subscriber.ts:575). Erasing a subscriber removes the saved card's id, fingerprint and wallet, and the upsell token, so nothing can charge the card any more. Any attempt still open is then checked with Stripe and either completed or canceled (apps/api/src/services/gdpr/anonymize-subscriber.ts:286, apps/api/src/services/gdpr/anonymize-subscriber.ts:336-350). Retention does not delete a session while one of its attempts is still open (packages/shared/src/retention/policies.ts:71-106).

Turning it on

Offers depend on webhook code that tells an offer's Stripe objects apart from the first payment's. That code has to be on every process before the first offer charges (.env.example:434-440):

  1. Deploy the release with FUNNEL_UPSELLS_ENABLED=false. That is the default in .env.example, the Coolify files and the Helm chart (deploy/helm/rovenue/values.yaml).
  2. Wait until every API and worker process runs it.
  3. Run the ClickHouse migrations (0050_funnel_upsell_events).
  4. Set FUNNEL_UPSELLS_ENABLED=true on every API and worker process, and restart them.

The window sweep runs whether or not the flag is on.

On this page