Add customVariables support to purchases-capacitor-ui#734
Merged
Conversation
Adds the ability to pass custom variables for paywall text substitution
using the `{{ custom.variable_name }}` syntax. Implements the full bridge
across TypeScript, iOS, and Android native layers, leveraging existing
support in purchases-hybrid-common.
Also adds a CustomVariablesEditor component to the sample app (inspired
by the Flutter purchase_tester) for testing variable substitution.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The editor previously only supported string variables. Now uses a two-step flow (action sheet type picker → input alert) to allow adding and editing variables of all three types supported by the customVariables API. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
Reject empty string in parseValue for number type instead of silently converting to 0. Also regenerate the API Extractor report to include customVariables in PresentPaywallOptions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
vegaro
approved these changes
Mar 19, 2026
facumenzella
pushed a commit
that referenced
this pull request
Mar 19, 2026
**This is an automatic release.** ## RevenueCat SDK ### ✨ New Features * Add platform-specific PaywallPresentationConfiguration to purchases-capacitor-ui (#730) via Jeffrey Bunn (@Jethro87) * Add trackCustomPaywallImpression API with offeringId override (#725) via Rick (@rickvdl) ### 📦 Dependency Updates * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.52.0 (#732) via RevenueCat Git Bot (@RCGitBot) * [Android 9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1) * [Android 9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0) * [iOS 5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0) * [iOS 5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0) * Updates purchases-hybrid-common to 17.51.1 (#729) via RevenueCat Git Bot (@RCGitBot) * [Android 9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1) * [Android 9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0) * [iOS 5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0) * [iOS 5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0) * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.49.0 (#724) via RevenueCat Git Bot (@RCGitBot) * [Android 9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1) * [Android 9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0) * [iOS 5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0) * [iOS 5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0) * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.48.0 (#722) via RevenueCat Git Bot (@RCGitBot) * [Android 9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1) * [Android 9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0) * [iOS 5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0) * [iOS 5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0) ## RevenueCatUI SDK ### Paywallv2 #### ✨ New Features * Add customVariables support to purchases-capacitor-ui (#734) via Facundo Menzella (@facumenzella) ### 🔄 Other Changes * Add docs for new Paywall presentation APIs (#733) via Toni Rico (@tonidero) * Bump fastlane-plugin-revenuecat_internal from `3e8c384` to `9a6911b` (#731) via dependabot[bot] (@dependabot[bot]) * Add api-extractor for public API surface tracking (#723) via Rick (@rickvdl) * Bump fastlane-plugin-revenuecat_internal from `e146447` to `3e8c384` (#726) via dependabot[bot] (@dependabot[bot]) * Add Galaxy to the README (#721) via Will Taylor (@fire-at-will)
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.
Summary
customVariables?: Record<string, string | number | boolean>toPresentPaywallOptionsfor paywall text substitution ({{ custom.variable_name }}syntax)CustomVariablesEditorcomponent to the sample app (inspired by the Flutterpurchase_tester) for testing variable substitution, supporting string, number, and boolean variable typesTest plan
npx tsc --noEmitinpurchases-capacitor-ui){{ custom.* }}substitutions correctly🤖 Generated with Claude Code