Guides

SDK Events

Overview

While merchants use the Saber web-hosted SDK, events are sent to the merchant.

Events

The exhaustive list of the SDK events can be found below:

Event

Description

Sample Value

KYC_STATUS

Triggered when user completes their KYC

{
event: "KYC_STATUS",
  level: "INFO",
  params: { status: "COMPLETED" }
}

ORDER_CREATED

Triggered when an order is created

{
  event: "ORDER_CREATED",
  level: "INFO",
  params: { order_id : "order_id" }
}

ORDER_UPDATED

Triggered when an order is updated - generally when a user updates their UTR* manually.

A Unique Transaction Reference (UTR) is a unique transaction identifier sent to the user from their respective bank account.

{
  event: "ORDER_UPDATED",
  level: "INFO",
  params: { order_id : "order_id" }
}

UPI_INTENT

Triggered when a user attempts to pay via a UPI intent. A URL in payment can be used to trigger the intent URL in cases where it doesn’t automatically get triggered.

{
  event: "UPI_INTENT",
  level: "INFO",
  params: { url : "intent_url" }
}

BACK

When a user clicks the back button the SDK

{
  event: "BACK",
  level: "INFO",
}

SUCCESS

Called when the transaction is complete

{
  event: "SUCCESS",
  level: "INFO",
  params: {
    crypto_amount: cryptoAmount,
    transaction_id: transactionID,
    status: status,
  }

DIGILOCKER_URL

Called when the digilocker URL is generated.
Can be used to navigate to the Digilocker

{
  event: "DIGILOCKER_URL",
  level: "INFO",
  params: {
    url: "https://url.to.digilocker",
  },
}