Skip to main content

Integration Flow Summary

  1. Load Script – Inject the SDK script and wait for onRevupSDKLoaded
  2. Wait for SDK + orderId – Only run renderForm() when sdkLoaded && orderId (and optionally form options).
  3. Single listenerdocument.addEventListener('onRevupMessage', onRevupMessageHandler) to capture all events (and e.g. store them in state).
  4. Config – Build config from environment (env), apiKeys, and current orderId; set merchantDomain from window.location.host (or override for local/dev).
  5. Create and initrevup = new Revup(config) then await revup.init({ containerId: 'revup-container', form: { ...formOptions } }).
  6. Optional – Call revup.getApmsAvailable() after init and use the result as needed.
  7. Cleanup – On unmount or before re-init, abort the event listener and clear the container inner HTML.