Link Search Menu Expand Document

General Options

This reference details the callbacks available for use in a native mobile app integration.

Introduction

If you’d like a greater level of control and customization with your app integration, we provide a series of callbacks that can pass information to and from the widget (within a webview) and your application.

Want to learn more about how callbacks work? A detailed description of how web objects communicate with callbacks can be found in Mozilla’s postMessage Documentation.

The following callbacks, split into sent TO and sent FROM the widget, are available for use:

Native Back Button

TO

Enables navigation through the webview using the native back button. It will navigate the webview to the previous screen.

Example Message:

{
    "action": "back",
    "source": "<Partner-name>",
    "value": null,
    "timestamp": "20019-09-15T15:53:00+00:00"
}

FROM

Enables navigation from the webview to a previous screen in the parent application. The webview will send this callback when the native back button is pressed at the beginning of the widget flow (and there are no previous screens to return to).

Example Message:

{
    "action": "back",
    "source": "ParkWhiz",
    "value": null,
    "timestamp": "20019-09-15T15:53:00+00:00"
}

Payment

FROM

Enables invocation of the partner’s native payment flow - needed for those handling server to server payment. The webview will send this callback when the user has indicated their intent to purchase.

Example Message:

{
    "action": "payment",
    "source": "ParkWhiz",
    "value": {
        "add_on_ids": string
        "final_price": float
        "quote_id": string
    },
    "timestamp": "20019-09-15T15:53:00+00:00"
}