Event Capture

This page offers detailed instructions on how to obtain events that are generated by the Cashier in asynchronous mode.

As an alternative to utilizing notifications, you have the option to configure your system to listen and receive transaction-related events directly from the Cashier. This approach may be necessary when you need to implement your own business logic, especially in cases where BridgerPay does not have control over the redirection process.



For a clearer understanding of the event sequence in the API deposit flow, we recommend referring to the deposit flow diagram provided in the API guide.

Session created:

The API has attempted to create a Cashier session, which could result in either successful creation or a failure to create the session.

[bp]:create-session  //or
  type: 'success' | 'failure',
  bearerToken?: [string]

Cashier widget Rendered:

A Cashier widget has been rendered and presented to the user.

[bp]:contentRendered  //or

Deposit processed:

The customer's deposit request has been processed, leading to various outcomes. It could be approved or declined, or the Payment Service Provider (PSP) might request the customer to enter a security code for deposit confirmation (3D Secure). In the case of the latter scenario, this event will occur towards the end of the workflow.

[bp]:deposit  //or
  type: 'approved' | 'declined' | 'pending'

Customer redirected:

The customer has been redirected to the relevant page where they can view the outcome of their transaction.

[bp]:redirect  //or
  url: [string]


Event listener for capturing all events

Please incorporate the following code snippet to enable event listening for all events.

  ({ detail }) => console.log('[bp]:all', detail)

Event listener for a particular event

Please include the provided code snippet to establish event listening for a specific event, such as "Session created".

  ({ detail: { type, bearerToken } }) => console.log(

Event listener for Redirect


When a script is utilized, there is no need for manual redirection using events as the process is handled automatically.

By incorporating this code snippet, you will be able to listen to events within the iframe and subsequently redirect the user to a designated page upon the transaction's completion.

	({ data: { event, url }}) => {
		if (!event || !event.includes('[bp]'))
		if (event === '[bp]:redirect')
			window.location.href = url;

Apple Pay

Event listener for Apple Pay transactions

(e) => {
	const result = e.detail;
    // handle result: hide apple button, show result to the payer
}, false);

Events descriptions: