Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
<.focus_box>
<div class="text-lg mb-6 font-bold dark:text-gray-100">
[Test Mode] Subscribe to plan {@plan_id}
</div>
<div class="block text-gray-500 dark:text-gray-200 text-sm">
To make subscriptions easier to handle on localhost, there's no integration with Paddle and everything works in-house instead.<br /><br />
Normally when proceeding to upgrade to a plan from<b><code>/billing/choose-plan</code></b> you would go through a Paddle checkout flow:
<br /><br />
<ul>
<li>1. Providing payment details</li>
<li>2. Paddle processing the information and trying to charge the card</li>
<li>3. Receiving a webhook from Paddle (<b><code>subscription_created</code></b>)</li>
<li>4. We create the subscription</li>
</ul>
<br />
This local implementation skips steps 1-3, creating the subscription immediately and redirecting you straight to <b><code>/settings</code></b>.
<br /><br />
Read more about dev and staging subscriptions in the <a
class="text-indigo-600"
href="https://kb.plausible.io/engineering/how-to/dev-and-staging-subscriptions"
>knowledge base</a>.
</div>
<div class="flex items-center justify-between mt-10">
<a
href={@back_link}
type="button"
class="inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-500 text-sm leading-5 font-medium rounded-md text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:text-gray-500 dark:hover:text-gray-200 focus:outline-none focus:border-blue-300 focus:ring active:text-gray-800 dark:active:text-gray-200 active:bg-gray-50 transition ease-in-out duration-150"
>
Back
</a>
<.button_link
href={~p"/dev/billing/create-subscription/#{@plan_id}"}
method="post"
>
Subscribe to plan
</.button_link>
</div>
</.focus_box>