Hey! These docs are for version 3.2, which is no longer officially supported. Click here for the latest version, 1.0!

Clickstream Events

Merchants can access the clickstream events in the onEvent callback from Juspay’s SDK with the event name - log_stream. The final event value will be available under the payload within the callback response

Sample Response

{
    "requestId": "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a",
    "service": "in.juspay.hyperpay",
    "event": "log_stream",
    "payload": {
        "category": "action",
        "subcategory": "user",
        "label": "button_clicked",
        "value": {
            "button_name": "back_button_pressed"
        }
    },
    "error": false,
    "errorCode": "",
    "errorMessage": ""
}

Event Types

1. Screen Events
Event Label : current_screen
Description : This provides the name of the screen being displayed
{
    "category": "screen",
    "subcategory": "screen",
    "label": "current_screen",
    "value": {
        "url": "",
        "screen_name": "PaymentPageScreen",
        "presentation_type": "screen",
        "id": 1
    }
}
2. Button Click Event
Event Label : button_clicked
Description : This provides the name of the button which was clicked
{
   "category":"action",
   "subcategory":"user",
   "label":"button_clicked",
   "value":{
      "button_name":"proceed_to_pay"
   }
}
{
   "category":"action",
   "subcategory":"user",
   "label":"button_clicked",
   "value":{
      "button_name":"back_button_pressed"
   }
}
3. Checkbox Event
Event Label: checkbox_clicked
Description : This provides the name of the checkbox along with the state of the checkbox
{
    "category": "action",
    "subcategory": "system",
    "label": "checkbox_clicked",
    "value": {
        "checkbox_details": {
            "checkbox_name": "save_card",
            "state": "selected"
        }
    }
}
4. Payment Events
1. Event Label : payment_instrument_group
Description : This is emitted whenever a user selects a payment method and or initiates the transaction via the selected payment method.
{
   "category":"action",
   "subcategory":"user",
   "label":"payment_instrument_group",
   "value":{
      "pig_name":"nb"
   }
}
  1. Event Label : stored_card_selected
    Description : This is emitted whenever user taps on a stored card or transacts via it the stored card selection.
{
   "category":"action",
   "subcategory":"user",
   "label":"stored_card_selected",
   "value":{
      "card_details":{
         "card_type":"DEBIT",
         "card_brand":"visa",
         "bank_name":"SBI"
      }
   }
}

3.Event Label: card_selected
Description : This is emitted whenever user transacts via the add card flow

{
   "category":"action",
   "subcategory":"user",
   "label":"card_selected",
   "value":{
      "card_details":{
         "card_type":"DEBIT",
         "card_brand":"visa",
         "bank_name":"SBI"
      }
   }
}
  1. Event Label : bank_selected
    Description : This provides the bank name whenever user taps on a net banking option or transacts via it the selected bank option.
{
   "category":"action",
   "subcategory":"user",
   "label":"bank_selected",
   "value":{
      "bank_name":"Axis Bank"
   }
}
  1. Event Label : wallet_selected
    Description : This provides the wallet name whenever user taps on a wallet option or transacts via it the selected wallet option.
{
   "category":"action",
   "subcategory":"user",
   "label":"wallet_selected",
   "value":{
      "unlinked_wallet":"Paytm Wallet"
   }
}
  1. Event Label :upi_apps
    Description : This provides the UPI app name whenever user taps on a UPI app option or transacts via it the selected UPI app option.
{
   "category":"action",
   "subcategory":"user",
   "label":"upi_apps",
   "value":{
      "upi_app_selected":{
         "packageName":"com.google.android.apps.nbu.paisa.user",
         "appName":"Google Pay"
      }
   }
}
5. Form Events
1. Event Label : expiry_date_changed
Description : This is emitted when user changes the expiry value. This also provides the name of the screen where the card expiry field is changed
{
   "category":"action",
   "subcategory":"user",
   "label":"expiry_date_changed",
   "value":{
      "AddCardScreen":"XXXX"
   }
}
  1. Event Label : cvv_changed
    Description : This is emitted when user changes the cvv text. This also provides the name of the screen where the card cvv CVV field is changed
{
   "category":"action",
   "subcategory":"user",
   "label":"cvv_changed",
   "value":{
      "AddCardScreen":"XXX"
   }
}
  1. Event Label : card_number_changed
    Description : This is emitted when user changes the card number. This also provides the name of the screen where the card number field is changed.
{
   "category":"action",
   "subcategory":"user",
   "label":"card_number_changed",
   "value":{
      "AddCardScreen":"515161XXXXXXXXXXX"
   }
}

4.Event Label : upi_id_changed
Description : This is emitted when user changes the UPI VPA in the collect flow. This also provides the name of the screen where the UPI VPA is changed.

{
   "category":"action",
   "subcategory":"user",
   "label":"upi_id_changed",
   "value":{
      "VpaScreen":"@upi"
   }
}