WFL-217 | Add support for workflows endpoints#913
Merged
RosieWatson merged 26 commits intoJun 12, 2026
Merged
Conversation
# Conflicts: # package.json # pnpm-lock.yaml
vegaro
reviewed
Jun 11, 2026
…t-2' of github.com:RevenueCat/purchases-js into rosie/wfl-217-purchases-js-add-workflow-endpoint-support-2
vegaro
approved these changes
Jun 12, 2026
vegaro
left a comment
Member
There was a problem hiding this comment.
thanks for making the changes!
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2376ba9. Configure here.
RCGitBot
added a commit
that referenced
this pull request
Jun 16, 2026
**This is an automatic release.** ## RevenueCat SDK ### ✨ New Features * Add Slovenian support for paywalls (#932) via Monika Mateska (@MonikaMateska) * [WEB-4279] Discount line items in native wallets (#905) via James O'Donnell (@james-od) ## RevenueCatUI SDK ### ✨ New Features * WFL-217 | Add support for workflows endpoints (#913) via Rosie Watson (@RosieWatson) ### 🔄 Other Changes * [AUTOMATIC] Update generated error codes (#931) via RevenueCat Git Bot (@RCGitBot) * Danger: block manual edits to generated error codes (#930) via Álvaro Brey (@AlvaroBrey) * Add update-error-codes workflow (#926) via Álvaro Brey (@AlvaroBrey) * test(e2e): add full Paddle E2E coverage to webbilling-demo (WST-564) (#925) via Roger Solé (@rogersole) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Version and changelog-only changes with no runtime logic modified in this PR. > > **Overview** > **Automatic release** that publishes **1.43.0** by aligning version metadata everywhere it is duplicated: `.version`, `package.json`, `src/helpers/constants.ts`, and the docs redirect in `scripts/docs/index.html` (1.42.4 → 1.43.0). > > `CHANGELOG.md` and `CHANGELOG.latest.md` are updated to document what ships in this release (already merged elsewhere): **Slovenian paywall locale**, **discount line items in native wallets**, **RevenueCatUI workflows endpoints**, regenerated error codes plus CI/Danger guardrails, and expanded Paddle E2E coverage in webbilling-demo. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ef5e9f3. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation / Description
Add support for workflow endpoints to be used
Here's the flow for both paths in
presentPaywall:Standard Paywall
offering(from param orgetOfferings().current)workflowsEndpointEnabledisfalse→ skip workflow fetchoffering.paywallComponentsandoffering.uiConfigexistPaywallcomponent with the offering's paywall dataWorkflow
offering(same as above)workflowsEndpointEnabledistrue→ callgetWorkflows(appUserId)to get a list of all published workflowsoffering_idmatchesoffering.identifiergetWorkflowById(appUserId, workflowId)to fetch the full workflow data (handles inline or CDN redirect responses)workflowDataToNavDataWorkflowcomponent instead ofPaywallKey differences
getWorkflows+getWorkflowById) vs none for standard paywallsworkflowsEndpointEnabled: trueinFlagsConfig(internal, defaultsfalse)offeringis still required for both paths — workflows useoffering.identifierto find the right workflow, andoffering.availablePackagesfor the purchase flowselectedLocale(raw from params/browser), paywall usesfinalLocale(calculated fromoffering.paywallComponentslocalisations)Note
Medium Risk
Changes core paywall presentation and purchase locale paths when the flag is on, plus extra network/CDN fetches; default-off flag limits exposure but fallback logic affects error behavior for workflow-only offerings.
Overview
Adds workflow-backed paywalls behind the internal flag
workflowsEndpointEnabled(defaultfalse). When enabled,presentPaywallloads paywall workflows from new subscriber APIs, picks one whoseoffering_idmatches the offering, fetches full workflow payload (inline or CDN), and mounts theWorkflowUI instead ofPaywall, with warn-and-fallback to the classic paywall when fetch or nav conversion fails.Introduces
getWorkflowsandgetWorkflowByIdon the backend (includinguse_cdnfollow-up fetches), response types, and MSW coverage. Paywall validation and locale handling are adjusted so workflow-only offerings can work withoutpaywallComponentsuntil fallback is required; purchase from workflows usesselectedLocalefor checkout. Paywall event tests nowwaitFormount because presentation can be async before the UI is mounted.Reviewed by Cursor Bugbot for commit 2376ba9. Bugbot is set up for automated code reviews on this repo. Configure here.