Download Strategy

Monetize digital assets with payment-gated downloads

Charge per file while keeping delivery under your own controlled endpoint.

Best for reports, audio, templates, datasets, and media packs sold as one-time purchases.

Developer Kit

Minimal download 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" data-gvm-currency="PLN">
  <!-- 3) Declare payment template (modal) -->
  <template data-gvm-template="payment" data-gvm-template-inject-to="body">
    <dialog open>
      <span data-gvm-bind-qr></span>
      <button data-gvm-bind-send-sms>Open SMS</button>
      <button data-gvm-bind-cancel>Cancel</button>
    </dialog>
  </template>

  <!-- 4) Declare payment item (download) -->
  <kbd data-gvm-reference="asset-001" data-gvm-price="1.15"
       data-gvm-template-name="payment"
       data-gvm-http-download="/download/item.data">Download</kbd>
</body>

The gvm.js download strategy turns any existing link into a paid delivery action. On page load, the SDK binds declared data-gvm-* attributes and opens payment only when the reader requests the file.

  • Editorial Briefing Audio (4m33s)   Download
  • Subscriber Bonus Track (2m22s)   Download

This pattern is ideal when your pricing is item based and your file URLs should stay private until payment is confirmed.

Returning users are handled automatically. If a matching payment already exists, gvm resolves it as a duplicate commitment and allows access without charging twice.