Integration
Loading the Script
Load the Revup Unified Paywall SDK script in your payment page. Place the script tag ideally inside the head element:
<script
type="text/javascript"
charset="utf-8"
src="https://hosted.revuppayments.com/payments-widget/sdk/1/0/loader.js"
crossorigin="anonymous"
integrity="sha512-...">
</script>
Test environment URL:
<script
type="text/javascript"
charset="utf-8"
src="https://test.hosted.revuppayments.com/payments-widget/sdk/1/0/loader.js"
crossorigin="anonymous"
integrity="sha512-...">
</script>
Waiting for SDK Ready
Listen for the SDK load event before creating an instance:
window.addEventListener('onRevupSDKLoaded', () => {
// SDK is ready - create Revup instance here
});
Dynamic Load (e.g., React)
const script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'utf-8';
script.src = REVUP_SDK_URL; // Environment-specific URL
script.crossOrigin = 'anonymous';
if (INTEGRITY_HASH) script.integrity = INTEGRITY_HASH;
document.head.appendChild(script);