Skip to main content

Invoke Web Component

Open via Script Inclusion

The VIP Connect web component is rendered via an HTML tag and script inclusion. The following script must be included on the operator's payment page, preferably at the end of the body:

<script src="https://igaming-cdn.globalpay.com/vip-preferred.min.js"></script>

Below are two examples of invoking the VIP Connect web component using HTML. One example has the session ID attribute value and the other example has the api-url attribute value.

<vip-preferred session-id="ce562970-c306-40b4-81b1-22cb95a7d2b2" width="150px" mode="deposit"/>

or

<vip-preferred api-url="/api/sessionid" width="150px" mode="deposit"/>

The following attributes are available for specification when invoking the VIP Connect web component:

AttributeExample ValueRequired?Note
api-url/api/sessionidYes, if no session IDExample HTML shown above.
session-idce562970-c306-40b4-81b1-22cb95a7d2b2Yes, if no api-urlExample HTML shown above. End user able to perform one transaction per session. End user/operator must start a new session to make another transaction.
width150pxYes
modedeposit or withdrawYesMode must be set to deposit or withdraw. End user will be able to perform only the respective action during that session. For example, if mode is set to deposit, end user will not see option to withdraw.
plaidRedirectUrlhttps://operatorredirectsite.comNoRequired only when operator chooses to handle Plaid redirection for native iOS mobile app.
viewcashierNoIf provided, the web component will open in the cashier page version

Open via URL

The VIP Connect web component can be rendered by referring the url in the html element as below -

Cert Environment

window.open("https://cert.api-gaming.paviliononline.io/sdk?mode=deposit#session-id")

Prod Environment

window.open("https://api-gaming.paviliononline.io/sdk?mode=deposit#session-id")

The following attributes are available for specification when invoking the VIP Connect web component:

AttributeExample ValueRequired?Note
session-idce562970-c306-40b4-81b1-22cb95a7d2b2YesEnd user able to perform one transaction per session. End user/operator must start a new session to make another transaction.
modedeposit or withdrawYesMode must be set to deposit or withdraw. End user will be able to perform only the respective action during that session. For example, if mode is set to deposit, end user will not see option to withdraw.
plaidRedirectUrlhttps://operatorredirectsite.comNoRequired only when operator chooses to handle Plaid redirection for native iOS mobile app.
viewcashierNoIf provided, the web component will open in the cashier page version

Closing the Web Component

The VIP Connect Web Component can be launched as new window/tab, in an iFrame from parent window, Web View or Tab on Mobile/Native Apps. The Web Component can be closed/navigated back to Parent Site from multiple screens of the component, some of the screens include -

  • Clicking Cancel Deposit/Withdrawal or Cancel Account SignUp and 'Yes' option will close the Web Component.
  • 'Back to Operator Website button
  • LogOff -> Close VIP Preferred link

No action required on Operator's website if VIP Connect is launched as new tab or window to close the Web Component. If the Web Component is invoked in an iFrame/Web View, the Web Component will send message to the Parent Site as window postMessage with message data = 'close'. In order to handle closing the Web Component, the parent web site/page has to attach a listener to capture the message sent by the VIP Connect Web Component.

For example -

window.addEventListener('message', function(e)=>{
if(e.data==='close')
{
// Close Web Component
}
})
note

To ensure the Web Component functions properly, 'Block third-party cookies' browser setting must be disabled or the option must be unchecked in the browser settings