Skip to main content

Script-tag integration — auto-update vs pinned (SRI)

vora.js is the only script you reference: it is code-split internally and loads its own sub-chunks on demand at session-load time. Do not load a payment processor's SDK yourself — the card field is rendered inside vora.js's iframe.

The bundle ships from https://js.vonpay.com/ through two channels:

ChannelURL shapeUpdatesSupply-chain check
Auto-update/v1/vora.jsTracks the latest v1.x.x automaticallyContinuous integrity monitoring by Von Payments
Pinned (SRI)/vX.Y.Z/vora.js + integrity="sha384-…"Byte-exact: stays on the build you testedBrowser-enforced — refuses to execute if the bytes don't match

Auto-update channel (default)​

<script src="https://js.vonpay.com/v1/vora.js" crossorigin="anonymous"></script>

New features, bug fixes and security patches reach your checkout as they ship; Von Payments polls the served bytes against the registry continuously (minutes, not per request). crossorigin="anonymous" is required once you add integrity, so set it now.

Pinned channel (SRI)​

<script
src="https://js.vonpay.com/vX.Y.Z/vora.js"
integrity="sha384-…"
crossorigin="anonymous"></script>

vX.Y.Z is a placeholder. Copy both the current version number and its matching integrity hash from the live registry at https://js.vonpay.com/integrity.json; never transcribe either from this page. You bump both on each release — a stale pin keeps working but misses new features.

A hash read from integrity.json proves the file you load is the one the registry lists. It does not prove who published that entry, because the registry and the file come from the same host. If that matters for your page, pin through the npm loader: there the hash ships inside the package version you install and lock, not from the CDN.

What integrity= covers​

vora.js is a loader. Once it runs it fetches the Elements UI runtime (every session) and one processor adapter chunk from /{version}/adapters/; the full set is artifacts[] in the registry. From vora.js 1.51.1, each of those Von Payments files is checked against the hash its release recorded, before it runs. So pinning vora.js with integrity covers every file in artifacts[] for that version:

  • A file whose bytes differ is not run. The call that needed it fails as if the file could not load (for the processor adapter, frame_binder_load_failed).
  • Chrome 66+ and other Chromium browsers (Edge 79+) and Firefox 115+ check through <link rel="modulepreload" integrity>. Safari and every iPhone and iPad browser check through a module <script integrity>.
  • Older Chrome and Firefox, without modulepreload, load the files without the check.
  • On a page that enforces Trusted Types in Safari, the files are refused rather than loaded unchecked.

Not covered: third-party scripts that vora.js adds to the page, such as Google Pay's pay.js and the optional bot-check provider's script, and the processor's own card frames. A version pinned below 1.51.1 checks only vora.js itself.

On the auto-update channel the same file checks run, but nothing checks vora.js itself in the browser: the checks guard against a changed file next to an unchanged vora.js.

Pinning through the npm loader​

With the @vonpay/vora package, pin from the /pure entry before the first load. It loads https://js.vonpay.com/v<package version>/vora.js with that version's integrity hash, so upgrading the package moves the pin:

import { loadVora } from "@vonpay/vora/pure";

loadVora.setLoadParameters({ pin: true });
const vora = await loadVora({ publishableKey: "vp_pk_live_…" });

A pinned load refuses (VoraLoadError code version_mismatch) if the page already carries another vora.js tag without that hash.

Where the hashes come from​

The registry at https://js.vonpay.com/integrity.json (one version shown; the sha384-… values are placeholders):

{
"versions": {
"vX.Y.Z": {
"builtAt": "2026-06-04T08:35:21.677Z",
"sha384": "sha384-…",
"bytes": 77756,
"artifacts": [
{
"role": "core",
"path": "vora.js",
"sha384": "sha384-…",
"bytes": 77756
}
]
}
}
}
  • sha384 at the top level is the core-bundle hash — the value you pin. artifacts[] carries per-file hashes for the core bundle and its internal sub-chunks.
  • builtAt is the publish timestamp; bytes lets you sanity-check before pinning (a 0-byte entry is the signal the registry is corrupted).
  • The registry is append-only — old entries stay published, so pinned snippets in deployed code keep working.

Automating updates​

Check the version and hash into source control with the snippet. When you move to a version you have tested, your pipeline fetches integrity.json, reads that version's versions.{v} entry, rewrites the <script> tag's src and integrity, and redeploys — at whatever cadence your change control sets.

With the npm loader you skip this step: upgrading the package moves the version and its hash together.

Content Security Policy​

Each version lists the sources its Content Security Policy needs at https://js.vonpay.com/v<version>/csp.json (from 1.39.0), and https://js.vonpay.com/v1/csp.json covers whatever the auto-update channel may serve; Errors → CSP requirements explains how to read it. A pinned version's list never changes, so you can update the policy and the pinned src in the same change.

Pinning does not change the CSP: the browser applies integrity after fetching from the same js.vonpay.com origin.

When to pick which​

PosturePick
Most integrationsAuto-update.
You must show that every script on your payment page is approved and integrity-checked (PCI DSS v4.0 requirement 6.4.3)Pinned, on 1.51.1 or later: the browser runs only the vora.js file you approved, and every Von Payments file it loads afterwards (artifacts[]) is checked against that version's recorded hash. Third-party scripts such as Google Pay's are not (see What integrity= covers). Confirm with your assessor that this meets the requirement for your page.
Change control requires that no code updates without operator action, or byte-exact reproducibility of every checkout renderPinned. Update the version and hash on each release through your normal process.
Your pipeline writes the script tag and can read integrity.jsonPinned with automated update.

What's next​