Event capture

This page provides instructions on how to get events generated by the Cashier in asynchronous mode.

As an alternative to the notifications, you can configure your ecosystem to "listen to", i.e. receive, transaction-related events generated by the Cashier. This might be necessary for implementing your own business logic when BridgerPay cannot control the redirection.


Consult the Cashier or server-side deposit flow diagram for better understanding the sequence of the events.

Session created: the API has created or failed to create a Cashier session.

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

Cashier widget shown: a Cashier widget has been shown to a shopper.

[bp]:contentRendered //or

Deposit processed: the shopper's request to make a deposit has been processed. This might be approved or declined, or the PSP might request to enter a security code to confirm the deposit (3D Secure). In the latter case, the event will happen at the end of the workflow.

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

Shopper redirected: the shopper has been redirected to the appropriate page to see the result of their transaction.

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


If a Cashier scheme is integrated as a script embedded in your website, include the following piece of code to listen to all the event.

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

Or, include the following one to listen to a particular event (e.g. "Session created").

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

If a Cashier scheme is integrated as an iframe placed on an arbitrary web resource, include the following piece of code to listen to the events.

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