subscription-dashboard Example

To start the widget

  1. Open the widget using a “startWidget” call; widgetType = 'subscription-dashboard', and include all relevant Key Values.
    startWidget ({"widgetType":"subscription-dashboard"})

  2. Following this call, a pre-defined WebView should be opened by the bank, and the widget’s render should be injected to it.

  3. Following this call, a pre-defined WebView should be opened by the bank, and the widget’s render should be injected to it.

  4. In some cases, the startWidget may include additional payload parameters. In that case, the startWidget would include an additional “params” parameter:
    startWidget ({"widgetType":"subscription-dashboard", "params”: {…}})

  5. To display subscription data, the widget sends and API request to the server. The API name is getUserSubscriptions and it should include protocol version. The bank must decide between either options:

    • The request can be sent by the widget, after the “startWidget” initialization, through the delegate function of the widget:
      Personetics Subscription-Dashboard Widget --> Delegate: sendRequestToEnrichServer (requestHeaders, postParam, requestId)
    • by the bank application before the “startWidget” and provided as additional payload once “startWidget” is called:
      Delegate --> PServer API: handleServerResponse (data, requestId)
  6. Following this call, a pre-defined WebView should be opened by the bank, and the widget’s render should be injected to it.