Skip to main content

Overview

The Bank Link SDK V3 introduces a modern, modular architecture with improved entity management, enhanced branding controls, and a simplified API surface. This guide walks you through the changes required to upgrade your existing integration to V3.

Key Improvements

  • Modular API (GrailPay.BankLink)
  • Built-in entity lifecycle management
  • Simplified configuration (removed redundant parameters)
  • Improved callback structure
  • ES Module + UMD support
  • OAuth redirect handling support
  • Productionhttps://banklink.grailpay.com/grailpay-banklink.js
  • Sandboxhttps://banklink-sandbox.grailpay.com/grailpay-banklink.js

Breaking Changes

The following changes in V3 are not backward compatible with previous versions. Review these carefully before beginning your migration.
  • window.grailpay has been replaced with GrailPay.BankLink — all method calls must be updated
  • init() now automatically opens the widget — the separate open() method has been removed
  • userId has been replaced with entity_uuid, which represents an existing Person or Business entity
  • role has been renamed to entity_type (same accepted values: person, business)
  • vendorId is no longer required and has been removed
  • timeout is no longer required and has been removed
  • The theme object has been replaced with a new branding object — UI text customization via theme.screens is no longer supported
  • The onUserCreated callback has been renamed to onEntityCreated
  • Response payloads for onBankConnected, onLinkExit, and onError have changed — see Callback Changes below

Initialization

In previous versions, the SDK was initialized via window.grailpay.init() and required a separate open() call to display the widget. In V3, GrailPay.BankLink.init() handles both initialization and opening the widget in a single call. Previous
V3

Parameter Mapping

Use the table below to map your existing parameters to their V3 equivalents.

Branding Changes

The theme object has been replaced with a simplified branding object. UI text customization via theme.screens is no longer supported. Previous
V3

Callback Changes


Closing the Widget

The method to programmatically close the widget has been updated to use the new module path. Previous
V3

Entity vs. User Model

Previous versions used a “user” model where users could be implicitly created during the Bank Link flow. V3 introduces an explicit “entity” model that gives you more control over lifecycle management.

Migration Checklist

This checklist covers the full set of changes required to complete your migration. We recommend working through these items in order and testing the full Bank Link flow end-to-end in Sandbox before deploying to production.
  • Replace the SDK script tag with the V3 script tag
  • Update all SDK method calls from window.grailpay to GrailPay.BankLink
  • Update initialization to use GrailPay.BankLink.init() with the new configuration structure
  • Rename userId to entity_uuid
  • Rename role to entity_type
  • Remove deprecated parameters: vendorId, timeout
  • Replace the theme object with the new branding object
  • Rename the onUserCreated callback to onEntityCreated
  • Update all callback handlers to handle the new response payloads
  • Remove any calls to open()init() now opens the widget automatically
  • Update close() calls to use GrailPay.BankLink.close()
  • Test the full Bank Link flow end-to-end in Sandbox

Questions?

If you encounter any issues during your upgrade, please reach out to [email protected].