Mobile Event Webhook

🚧

Note: Mobile events have been deprecated in favor of clickstream events and will eventually be removed. Please consider updating your consumer to use clickstream webhooks instead. Clickstream webhooks generally contain richer dataset, more varied event types, and you can configure them yourself directly in your Tapcart dashboard.

How to configure your Webhook?

You will create an HTTPS endpoint on your app as a webhook receiver, and specify that endpoint's URL as the webhook subscription's endpoint.

This generated URL must be able to accept HTTP POST requests. For example, your domain is

https://mycompanysite.com

A common method merchant's may use is a route to a dedicated webhook endpoint. An example of a route to that webhook endpoint is:

@app.route('/tapcart_webhooks', methods=['POST'])

Then the specified URL should combine your domain and the webhook endpoint

https://mycompanysite.com/tapcart_webhooks

How do I send my URL to Tapcart?

Once the URL has been specified with a domain and webhook endpoint that can receive POST requests, you will need to reach out to the Tapcart team via email. We will take the URL and then subscribe the merchant to a dedicated topic to receive POST requests.

Please email the URL to: [email protected]

How will I know data has successfully been sent?

The following messages represent the standard error codes your server should send after Tapcart's attempted POST requests are sent to the webhook endpoint:

CodeDescription
200Successful Request
400Invalid Request
401Unauthorized Request
403Forbidden
429Throttling errors
422Custom errors
500–511Server errors

In the event you see a 400 or 500 response, Tapcart webhooks will go through a process of retrying the event in order to complete for 5 minutes. If the event still fails to process, Tapcart will end retrying the event.

Payload Structure

Upon receiving a successful 200 POST request from the webhook, an individual payload will be received in JSON format.

This event payload will include a single event performed by a single user. The webhook streams data as it's received and in its entirety.

Guaranteed Fields (All Events)

The following fields are present on every mobile app event payload:

FieldTypeDescription
event_typestringThe name of the event (e.g. AppOpened, ProductViewed).
event_idstringUnique identifier for the event.
app_idstringUnique merchant identifier.
device_idstringUnique device identifier.
timestampnumberEvent timestamp in epoch milliseconds.
device_propertiesobjectDevice information. See Device Properties.
app_propertiesobjectApp configuration data. See App Properties.
shopify_propertiesobjectShopify user data. See Shopify Properties.
session_propertiesobjectSession data. See Session Properties.
event_propertiesobjectEvent-specific data. Contents vary by event_type. See Event Properties.

Device Properties

Fields present on every event:

FieldTypeDescription
osstringOperating system (e.g. ios, Android).
os_versionstringOS version (e.g. 26.3.1, 18.7.7).
manufacturerstringDevice manufacturer (e.g. Apple).
countrystringTwo-letter country code (e.g. US).
localestringLocale code (e.g. en, es).

App Properties

Fields present on every event:

FieldTypeDescription
app_idstringUnique merchant identifier.
app_versionstringApp version (e.g. 7.9).
os_versionstringOS version.
tapcart_buildstringTapcart build version (e.g. 20.17.1).
active_feature_experimentsstringJSON-encoded string containing active feature flag experiments.

Shopify Properties

Fields present on every event:

FieldTypeDescription
shopify_user_idstring | number | nullShopify customer ID. null when user is not identified.
logged_inbooleanWhether the user is logged in.

Session Properties

Fields present on every event:

FieldTypeDescription
session_idstringUnique session identifier.
sourcestringSession source (e.g. direct).

Event Properties

The contents of event_properties vary by event_type. This object is always present but its fields are event-specific. See Event Properties by Type for details.

Example Payload (Standard Format)

The majority of events use this structure. Below is an AppOpened event:

{
  "app_id": "UNIQUE MERCHANT ID",
  "device_id": "UNIQUE DEVICE ID",
  "event_id": "UNIQUE EVENT ID",
  "timestamp": 1776123343508,
  "device_properties": {
    "manufacturer": "Apple",
    "os": "ios",
    "os_version": "26.3.1",
    "country": "US",
    "locale": "en"
  },
  "app_properties": {
    "app_id": "UNIQUE MERCHANT ID",
    "app_version": "7.9",
    "os_version": "26.3.1",
    "tapcart_build": "20.17.1",
    "active_feature_experiments": "[{\"name\": \"feature-flag-name\", \"value\": true}]"
  },
  "shopify_properties": {
    "shopify_user_id": "1234567890",
    "logged_in": true
  },
  "session_properties": {
    "session_id": "UNIQUE SESSION ID",
    "source": "direct"
  },
  "event_properties": {},
  "event_type": "AppOpened"
}

Extended Format

Some events include additional fields beyond the standard format. The CustomBlockViewed event is a known example that includes the full extended payload.

Additional Top-Level Fields

FieldTypeDescription
metadataobjectContains schema_id identifying the event schema version.
timestamp_isostringISO 8601 formatted timestamp (e.g. 2026-04-13T17:03:56.014-07:00).

Additional Device Properties

FieldTypeDescription
ipstringUser's IP address.
modelstringDevice model identifier (e.g. iPhone16,2).
orientationstringScreen orientation (e.g. portrait).
carrierstringMobile carrier name.
radiostringConnection type (e.g. Wifi).
lib_versionstringSDK library version.
wifibooleanWhether the device is on Wi-Fi.
app_versionstring | nullApp version.
tapcart_buildstring | nullTapcart build version.
external_buildstring | nullExternal build version.
tapcart_commit_hashstring | nullTapcart commit hash.
consumer_typestringConsumer type (e.g. Returning).
device_idstringUnique device identifier.
prev_push_enabledbooleanWhether push was previously enabled.
push_enabledbooleanWhether push is currently enabled.

Additional App Properties

FieldTypeDescription
currency_codestringStore currency code (e.g. USD).
external_buildstringExternal build version.
tapcart_commit_hashstring | nullTapcart commit hash.
environmentstringEnvironment name (e.g. release).

Additional Session Properties

FieldTypeDescription
session_typestringSession type (e.g. Returning).
session_start_timenumberSession start time in epoch milliseconds.
notification_idstring | nullNotification identifier that triggered the session.
notification_typestring | nullType of notification.
utm_sourcestring | nullUTM source parameter.
utm_mediumstring | nullUTM medium parameter.
utm_campaignstring | nullUTM campaign parameter.
utm_contentstring | nullUTM content parameter.
utm_termstring | nullUTM term parameter.
external_notification_idstring | nullExternal notification identifier.
segment_idstring | nullSegment identifier.

📝 Note: The notification_id field in session_properties may also appear on standard-format events when the session was triggered by a notification (e.g. InboxItemViewed).

Example Payload (Extended Format)

{
  "event_type": "CustomBlockViewed",
  "metadata": {
    "schema_id": "Event_CustomBlockViewed_10_1_0"
  },
  "device_properties": {
    "ip": "USER'S IP",
    "os": "iOS",
    "model": "iPhone16,2",
    "orientation": "portrait",
    "carrier": "--",
    "radio": "Wifi",
    "manufacturer": "Apple",
    "lib_version": "10.1.6",
    "country": "US",
    "locale": "en",
    "wifi": true,
    "app_version": null,
    "tapcart_build": null,
    "external_build": null,
    "os_version": "26.3",
    "tapcart_commit_hash": null,
    "consumer_type": "Returning",
    "device_id": "UNIQUE DEVICE ID",
    "prev_push_enabled": false,
    "push_enabled": false
  },
  "shopify_properties": {
    "shopify_user_id": null,
    "logged_in": false
  },
  "session_properties": {
    "session_id": "UNIQUE SESSION ID",
    "source": "direct",
    "session_type": "Returning",
    "session_start_time": 1776122472243,
    "notification_id": null,
    "notification_type": null,
    "utm_source": null,
    "utm_medium": null,
    "utm_campaign": null,
    "utm_content": null,
    "utm_term": null,
    "external_notification_id": null,
    "segment_id": null
  },
  "app_properties": {
    "app_id": "UNIQUE MERCHANT ID",
    "currency_code": "USD",
    "app_version": "6.3",
    "tapcart_build": "12.34.1",
    "external_build": "12.34.1",
    "os_version": "26.3",
    "tapcart_commit_hash": "9d5fc37",
    "environment": "release",
    "active_feature_experiments": "[...]"
  },
  "event_properties": {
    "event_id": "UNIQUE EVENT ID",
    "custom_block_id": "BLOCK ID",
    "custom_block_source_url": "https://tapcart.studio/...",
    "custom_block_index": 0,
    "custom_block_location": "phoenix_page",
    "static_position": null
  },
  "event_id": "UNIQUE EVENT ID",
  "device_id": "UNIQUE DEVICE ID",
  "app_id": "UNIQUE MERCHANT ID",
  "timestamp": 1776125036014,
  "timestamp_iso": "2026-04-13T17:03:56.014-07:00"
}

Event Properties by Type

AppOpened

FieldTypeDescription
(empty object)No additional properties.

AppInstalled

FieldTypeDescription
event_idstringUnique event identifier.

ProductViewed

FieldTypeDescription
product_idstringShopify product ID.
product_titlestringProduct name.
product_pricestringProduct price.
multi_currency_codestringCurrency code (e.g. USD).
product_tags_liststring[]Array of product tags.

CollectionViewed

FieldTypeDescription
collection_idstringShopify collection ID.
collection_titlestringCollection title.

CartUpdated

FieldTypeDescription
update_typestringType of update (e.g. product_removed).
cart_idstringCart identifier.
quantity_updatednumber | nullQuantity change.
variant_idstringShopify variant ID.
cart_total_pricestringTotal cart price.
multi_currency_codestringCurrency code.
cart_total_itemsnumberTotal items in cart.
product_idstringShopify product ID.
product_titlestringProduct name.
product_tags_liststring[]Array of product tags.

CheckoutCreated

FieldTypeDescription
checkout_amountnumberCheckout total amount.
currency_codestringCurrency code.
checkout_subtotalnumber | nullCheckout subtotal.
checkout_total_itemsnumberTotal items in checkout.
checkout_items_liststring[]List of item names.
total_discount_amountnumberTotal discount applied.

PurchaseCompleted

FieldTypeDescription
cart_idstringCart identifier.
checkout_idstringCheckout identifier.
checkout_source_typestringSource type (e.g. cart).
total_pricenumberTotal purchase price.
purchase_total_pricenumberTotal purchase price.
currency_codestringCurrency code.
product_idsstring[]Array of Shopify product IDs.
total_discount_amountnumberTotal discount applied.

PageView

FieldTypeDescription
page_idstringPage identifier.
page_gidstring | nullPage global identifier.
page_typestringPage type (e.g. wishlist-detail).
page_urlstringFull page URL.

WishlistUpdated

FieldTypeDescription
wishlist_update_typestringType of update (e.g. wishlist_item_added).

WishlistItemAdded

FieldTypeDescription
product_idstringShopify product ID.
product_titlestringProduct name.
product_pricenumberProduct price.
multi_currency_codestringCurrency code.

AccountCreated

FieldTypeDescription
account_shopify_user_idstringShopify user ID for the new account.

InboxItemViewed

FieldTypeDescription
notification_idstringNotification identifier.
notification_titlestringNotification title.
notification_messagestringNotification body text.
notification_imagestringNotification image URL.

CustomBlockViewed

FieldTypeDescription
event_idstringUnique event identifier.
custom_block_idstringCustom block identifier.
custom_block_source_urlstringSource URL of the custom block.
custom_block_indexnumberPosition index of the block.
custom_block_locationstringLocation type (e.g. phoenix_page).
static_positionstring | nullStatic position value.

Known Event Types

Event TypeFormatDescription
AppOpenedStandardUser opened the app.
AppInstalledStandardUser installed the app.
ProductViewedStandardUser viewed a product.
CollectionViewedStandardUser viewed a collection.
CartUpdatedStandardUser updated their cart.
CheckoutCreatedStandardUser initiated checkout.
PurchaseCompletedStandardUser completed a purchase.
PageViewStandardUser viewed a page.
WishlistUpdatedStandardUser updated their wishlist.
WishlistItemAddedStandardUser added an item to their wishlist.
AccountCreatedStandardUser created an account.
InboxItemViewedStandardUser viewed an inbox notification.
CustomBlockViewedExtendedUser viewed a custom block.

📘 Important Note

Every event received from the webhook will represent new data. The Insight Data Streaming webhook does not provide any historical data previous to when the webhook was setup.