Moneyhub-hosted affordability widget

📘

This page is for specific guidance for the Affordabilty widget, for general implementation guidance, please see Surfacing widgets to end users

Parameters

The following data items are optional but can be included in the widget to allow the reconciliation of individual affordability reports to your systems or a better journey experience.

  • name: The end-user/applicant's name.
  • email: The end-user/applicant's email.
  • externalUserId: An identifier from your system that uniquely identifies this report request/case/application/etc..
  • state: The state value that will be returned at the end of the journey for reconciliation.

The parameters can all be passed as query parameters if desired. However, we highly recommend using the version of the widget URL that includes the external-user-ID in the URL path (as in the example below) instead of the query parameter and using that value to hold your unique identifying reference number or ID for the user or application.

🚧

Query params and external user ID

We recommend to url encode the values of the query params and external user ID (if set separately in the URL path) so they can be saved and forwarded correctly

Implement

This is an example URL (for widget 831b0bce-130e-478c-a064-d685bd8a3cfc) using the recommended URL format that includes the external user ID and passing additional parameters to inclusion in the report:

https://identity.moneyhub.co.uk/widget-pages/831b0bce-130e-478c-a064-d685bd8a3cfc/external-user-id/external-user-id-value?name=name-value&email=email-value&state=state-value

Note that the external user ID in the example above is part of the URL path rather than the query parameters - this is highly recommended over using the query parameter.

If you do not need to cross-reference the affordability reports with your unique reference, then you can use the shorter format of the URL as per this example:

https://identity.moneyhub.co.uk/widget-pages/831b0bce-130e-478c-a064-d685bd8a3cfc?name=name-value&email=email-value&state=state-valuehttps://identity.moneyhub.co.uk/widget-pages/831b0bce-130e-478c-a064-d685bd8a3cfc?name=name-value&email=email-value&state=state-value&externalUserId=external-user-id-value

Receiving parameters at the end of the Journey

After a user has connected accounts and has submitted the data, we will redirect to the finish url that was configured for the widget with the following data as query params:

  • userId: Moneyhub user ID that was created during the affordability journey
  • reportId: A unique identifier of the affordability report that was created
  • state: State value that was passed when initialising the widget

This is an example of a redirect URL from the end of a journey when the finish URL is set aswww.moneyhub.com/finish:

https://www.moneyhub.com/finish?reportId=9edd3853-1a25-44fe-a563-abcc513904fa&userId=63d24f731e23f51590331b1e&state=state-value