<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AppContinuity</title>
    <description>The latest articles on DEV Community by AppContinuity (@appcontinuity).</description>
    <link>https://dev.to/appcontinuity</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4265678%2Ff4e6eb92-d89f-44ce-b764-d97dc819b46d.png</url>
      <title>DEV Community: AppContinuity</title>
      <link>https://dev.to/appcontinuity</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/appcontinuity"/>
    <language>en</language>
    <item>
      <title>Why a Stripe subscriber hits a paywall in your Capacitor iPhone app</title>
      <dc:creator>AppContinuity</dc:creator>
      <pubDate>Thu, 26 Nov 2026 05:29:28 +0000</pubDate>
      <link>https://dev.to/appcontinuity/why-a-stripe-subscriber-hits-a-paywall-in-your-capacitor-iphone-app-oak</link>
      <guid>https://dev.to/appcontinuity/why-a-stripe-subscriber-hits-a-paywall-in-your-capacitor-iphone-app-oak</guid>
      <description>&lt;p&gt;This article was first published on &lt;a href="https://appcontinuity.com/articles/why-a-stripe-subscriber-hits-a-paywall/" rel="noopener noreferrer"&gt;AppContinuity&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The most common continuity failure we see in this stack is also the one founders describe first: someone pays on the web, opens the iPhone app, and meets a paywall. The web app is sure they are subscribed. The store, RevenueCat, and your Supabase session each have a different idea of who “they” are.&lt;/p&gt;

&lt;p&gt;This piece is about that mismatch in a React app wrapped with Capacitor, signed in through Supabase Auth, and billed on the web through Stripe — and what we learned wiring the same entitlement through RevenueCat, including a sandbox purchase run end to end on an iPad.&lt;/p&gt;

&lt;p&gt;For the identity wiring itself — &lt;code&gt;logIn&lt;/code&gt; with Supabase &lt;code&gt;user.id&lt;/code&gt;, &lt;code&gt;logOut&lt;/code&gt; on sign-out, and alias rules — see &lt;a href="https://appcontinuity.com/articles/mapping-supabase-auth-to-revenuecat/" rel="noopener noreferrer"&gt;mapping Supabase Auth user IDs to RevenueCat&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three answers to “is this person paid?”
&lt;/h2&gt;

&lt;p&gt;On the web, paid access usually means “this Supabase user has an active Stripe subscription.” In the Capacitor app, paid access often starts as “RevenueCat says this &lt;code&gt;appUserID&lt;/code&gt; has an active entitlement,” and that ID may have been created before anyone signed in.&lt;/p&gt;

&lt;p&gt;RevenueCat will happily create an anonymous app user the first time the SDK is configured without an ID. Purchases made in that anonymous state belong to that anonymous ID. Your Supabase user is a different identifier. Stripe’s customer is a third. Until those three are attached to one RevenueCat customer, each platform is answering the question on its own.&lt;/p&gt;

&lt;p&gt;That is why a perfectly valid Stripe subscription does not unlock an iPhone paywall by itself. The App Store never saw that payment, and RevenueCat has not been told that the signed-in Supabase user is the same person who paid on the web.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A printable &lt;a href="https://appcontinuity.com/checklist/" rel="noopener noreferrer"&gt;Capacitor + RevenueCat + Stripe entitlement checklist&lt;/a&gt; covers the cases in this article, as a free PDF.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Identify the Supabase user before you trust entitlements
&lt;/h2&gt;

&lt;p&gt;RevenueCat’s Capacitor SDK is configured once, early in the app lifecycle, with the public SDK key. If you do not yet have a signed-in user, you configure without an app user ID. After Supabase Auth has a session, you log that user’s ID in. The method names below are from RevenueCat’s identifying-customers guide (&lt;a href="https://www.revenuecat.com/docs/customers/identifying-customers" rel="noopener noreferrer"&gt;https://www.revenuecat.com/docs/customers/identifying-customers&lt;/a&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;Purchases&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@revenuecat/purchases-capacitor'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nc"&gt;Purchases&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;publicSdkKey&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;supabase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nc"&gt;Purchases&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;logIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;appUserID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the stable Supabase user id, not an email address. Emails change; the user id does not. Do not hard-code an app user ID into &lt;code&gt;configure&lt;/code&gt; — RevenueCat’s docs warn that every install then looks like the same customer and shares purchases.&lt;/p&gt;

&lt;p&gt;Two details that bite Capacitor apps in particular:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Configure once. Calling &lt;code&gt;configure&lt;/code&gt; again when the user signs in is the wrong move. Switch identities with &lt;code&gt;logIn&lt;/code&gt;. RevenueCat’s own guidance is that you do not need to &lt;code&gt;logOut&lt;/code&gt; first when moving from one custom ID to another; call &lt;code&gt;logIn&lt;/code&gt; with the new id.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Log out of RevenueCat when the Supabase session ends. If you only sign out of Supabase and leave the SDK identified, the next person on the phone can inherit the previous entitlement. Account switching is one of the sandbox cases we run for exactly this reason.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When an anonymous ID is later logged in to a custom ID, webhook payloads can show both: &lt;code&gt;original_app_user_id&lt;/code&gt; as the anonymous id and &lt;code&gt;app_user_id&lt;/code&gt; as the custom id. If your backend keys entitlements only on one of those fields and ignores the other, restores and transfers look like missing subscribers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stripe on the web is not an App Store purchase
&lt;/h2&gt;

&lt;p&gt;Connecting Stripe web subscriptions to RevenueCat is a separate step from wiring StoreKit or Play Billing. A checkout on your website does not create an App Store transaction. RevenueCat can still grant the same entitlement to the same app user — but only after the Stripe subscription is attached to that user in RevenueCat.&lt;/p&gt;

&lt;p&gt;Until that attachment exists, this sequence is normal and confusing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The customer pays in your web app, signed in with Supabase.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stripe shows an active subscription for that customer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Capacitor app opens, perhaps still on an anonymous RevenueCat ID, and &lt;code&gt;CustomerInfo&lt;/code&gt; has no active entitlement.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Your paywall appears. Support hears about it before you do.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fix is not “also check Stripe from the iPhone app.” It is: map the Supabase user to a RevenueCat customer, attach the Stripe subscription to that customer, and let one entitlement decide access on web, iPhone, and Android. That is the entitlement-sync deliverable, not an extra SDK call on the paywall screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do not let the client award access
&lt;/h2&gt;

&lt;p&gt;Early in our own build we used a sandbox proof whose whole point was that access is decided on the server. The client could send a local “premium” flag along with a request. The server ignored it. Switching identities cleared the previous identity’s premium note immediately. That fixture did not talk to RevenueCat, Apple, Google, or a hosted Supabase project — it was there to make the rule visible: a flag stored on the device cannot be the source of truth.&lt;/p&gt;

&lt;p&gt;The same rule applies once the stores are real. Cached &lt;code&gt;CustomerInfo&lt;/code&gt; is useful for showing the right UI quickly. It is not a substitute for a server decision keyed to the signed-in Supabase user. If the app can flip a boolean and unlock features, account switching and refunds will drift, and you will not be able to say which dashboard is right.&lt;/p&gt;

&lt;p&gt;We later ran a sandbox purchase end to end on an iPad, through the real store sandbox and RevenueCat, so the purchase, the identified user, and the entitlement could be checked together rather than simulated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Refunds, transfers, and the webhook you actually handle
&lt;/h2&gt;

&lt;p&gt;Purchase is only the first event. Refunds, billing-portal cancellations, store transfers, and account switches each update a different record if you treat them as optional cleanup. The follow-up article is &lt;a href="https://appcontinuity.com/articles/refunds-transfers-and-which-webhook-updates-access/" rel="noopener noreferrer"&gt;refunds, transfers, and which webhook actually updates access&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A webhook that only handles the initial purchase will leave a web cancellation or an App Store refund sitting in Stripe or App Store Connect while your Supabase user remains marked premium. A webhook that updates “the latest event’s user” without checking a transfer can move access the wrong way when RevenueCat aliases an anonymous ID onto a custom ID.&lt;/p&gt;

&lt;p&gt;The reconciliation work is unglamorous and necessary: for each event, identify the RevenueCat app user, map that to the Supabase user, write the entitlement that event implies, and make the write idempotent so a retry does not grant twice or revoke the wrong person. We treated refunds, transfers, and replayed webhooks as part of the same problem, not as follow-up tickets.&lt;/p&gt;

&lt;p&gt;That write path also has to survive a crash. If a worker dies after seeing a webhook and before committing the entitlement, the next attempt should finish the same logical event rather than skip it or apply it twice. We exercised abandoned-lease recovery with separate Postgres sessions so one session could take over a lease another session had left behind. We did not independently verify recovery by killing a live OS process, so that remaining case should not be claimed as proven.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to run in sandbox before you trust it
&lt;/h2&gt;

&lt;p&gt;A single successful purchase is not an acceptance suite. The cases we write down and run with a founder in sandbox are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Purchase on iPhone or iPad sandbox, then confirm the same entitlement on web.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Subscribe on the web through Stripe, then confirm the Capacitor app unlocks for that signed-in user.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Renewal and cancellation, from the store sandbox and from the Stripe side.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Refund, and the access revocation that should follow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Restore purchases on a new install of the same account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sign out and sign in as a different Supabase user, and confirm premium does not leak.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those are also the cases that catch the paywall bug this article started with. If you only test “I tapped Subscribe in the iOS sandbox while already logged in,” you will ship the web-to-app hole.&lt;/p&gt;

&lt;h2&gt;
  
  
  A short checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Configure RevenueCat once, with the public SDK key, when the Capacitor app is ready.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After Supabase Auth has a user, call &lt;code&gt;Purchases.logIn&lt;/code&gt; with &lt;code&gt;user.id&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Call &lt;code&gt;Purchases.logOut&lt;/code&gt; when the Supabase session ends.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Attach Stripe web subscriptions to that same RevenueCat customer; do not expect the App Store to know about a website payment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Decide access on the server from the entitlement, not from a client-side premium flag.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Handle purchase, renewal, cancellation, refund, restore, and transfer in one reconciliation path, and make that path safe to retry.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the sandbox suite on a real device — we used an iPad for the purchase path — not only in a simulated fixture.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If paid access already drifts between your web app and your Capacitor app, start with the free &lt;a href="https://appcontinuity.com/checklist/" rel="noopener noreferrer"&gt;entitlement checklist&lt;/a&gt;, or use the fit check on &lt;a href="https://appcontinuity.com/" rel="noopener noreferrer"&gt;https://appcontinuity.com&lt;/a&gt; to describe where it shows up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;RevenueCat, Identifying Customers: &lt;a href="https://www.revenuecat.com/docs/customers/identifying-customers" rel="noopener noreferrer"&gt;https://www.revenuecat.com/docs/customers/identifying-customers&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;RevenueCat, Configuring the SDK: &lt;a href="https://www.revenuecat.com/docs/getting-started/configuring-sdk" rel="noopener noreferrer"&gt;https://www.revenuecat.com/docs/getting-started/configuring-sdk&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;RevenueCat, Capacitor installation: &lt;a href="https://www.revenuecat.com/docs/getting-started/installation/capacitor" rel="noopener noreferrer"&gt;https://www.revenuecat.com/docs/getting-started/installation/capacitor&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are wiring this stack yourself, the free &lt;a href="https://appcontinuity.com/checklist/" rel="noopener noreferrer"&gt;Capacitor + RevenueCat + Stripe entitlement checklist&lt;/a&gt; is a printable PDF of the cases above. The canonical version of this article lives at &lt;a href="https://appcontinuity.com/articles/why-a-stripe-subscriber-hits-a-paywall/" rel="noopener noreferrer"&gt;https://appcontinuity.com/articles/why-a-stripe-subscriber-hits-a-paywall/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>capacitor</category>
      <category>revenuecat</category>
      <category>stripe</category>
      <category>supabase</category>
    </item>
  </channel>
</rss>
