Redirect Strategy

Redirect readers to protected premium destinations

Designed for flows where access must be verified server-side before showing full content.

A strong fit for premium article mirrors, member-only routes, partner portals, and private dashboards.

Developer Kit

Minimal redirect snippet
<!-- 1) Inject gvm.js SDK -->
<script src="https://esm.sh/@wdft/gvm-sdk@latest/gvm.js" type="module"></script>

<!-- 2) Initialize gvm on body -->
<body data-gvm data-gvm-tenant="your_tenant" data-gvm-env="qa">
  <!-- 3) Declare payment template (modal) -->
  <template data-gvm-template="payment" data-gvm-template-redirect-to="body">
    <dialog open>
      <div class="qr-gate gvm-terms-blocked"><span data-gvm-bind-qr></span></div>
      <!-- Mandatory (regulamin 23.10.2026): price/terms info + UNCHECKED consent checkbox -->
      <p>Dostęp do tej Treści jest odpłatny: <strong><span data-gvm-bind-price></span>&nbsp;<span data-gvm-bind-currency></span></strong>
        zostanie doliczone do zbiorczego rozliczenia Twojej Sesji. Sublicencja do Treści wygasa z chwilą Płatności.
        Szczegóły w <a href="https://getviamsg.com/terms" target="_blank" rel="noopener">Regulaminie</a>.</p>
      <label>
        <input type="checkbox" data-gvm-accept-terms=".qr-gate, [data-gvm-bind-send-sms]"
               data-gvm-accept-terms-version="pl-2026-10-23" />
        <span>Żądam rozpoczęcia świadczenia przed upływem terminu do odstąpienia od umowy i przyjmuję do wiadomości, że z chwilą udostępnienia Treści tracę prawo odstąpienia od umowy.</span>
      </label>
      <button data-gvm-bind-send-sms>Open SMS</button>
      <button data-gvm-bind-cancel>Cancel</button>
    </dialog>
  </template>

  <!-- 4) Declare payment item (redirect target) -->
  <kbd data-gvm-reference="redirect-001" data-gvm-price="0.66"
       data-gvm-template-name="payment"
       data-gvm-http-redirect-to="/redirect/non_public.html">Open premium page</kbd>
</body>

The gvm.js redirect strategy lets you monetize access while keeping sensitive resources off public URLs. Payment is resolved first, then the user is sent to a protected destination.

  • Open the full premium article experience Open premium page

Use this when your backend already controls access logic and you want a clean paid entry point from public pages.

Duplicate commitments are handled automatically for the same number and reference, reducing repeat payment friction for returning users.