Skip to main content
Custom Events

Integrate the Ventrata checkout solution to external applications using custom events.

Lucia Burin Sestakova avatar
Written by Lucia Burin Sestakova
Updated over 2 months ago

Event

Details

Name

ventrata-order-created

Description

fires after order creation with order id as event detail

Usage

document.addEventListener('ventrata-order-created',
(event) => {
alert(`ventrata order created with ID :${event.detail.id}`)
}
)

Event

Details

Name

ventrata-order-updated

Description

fires after the order is updated with order id as event detail

Usage

document.addEventListener('ventrata-order-updated',
(event) => {
alert(`ventrata order with ID :${event.detail.id} was updated`)
}
)

Event

Details

Name

ventrata-order-confirmed

Description

fires after the order gets confirmed (set as paid) with order id as event detail

Usage

document.addEventListener('ventrata-order-confirmed',
(event) => {
alert(`ventrata order with ID :${event.detail.id} was successfully paid`)
}
)

Event

Details

Name

ventrata-order-expired

Description

fires after the order expires with order id as event detail

Usage

document.addEventListener('ventrata-order-expired',
(event)=>{
alert(`ventrata order with ID:${event.detail.id} expired`)
}
)

Event

Details

Name

ventrata-booking-created

Description

fires after booking creation with booking id as event detail

Usage

document.addEventListener('ventrata-booking-created',
(event) => {
alert(`ventrata booking created with ID :${event.detail.id}`)
}
)

Event

Details

Name

ventrata-booking-updated

Description

fires after booking is updated with booking id as event detail

Usage

 document.addEventListener('ventrata-booking-updated',
(event) => {
alert(`ventrata booking updated with ID :${event.detail.id}`)
}
)

Event

Details

Name

ventrata-booking-removed

Description

fires after booking is removed with booking id as event detail

Usage

document.addEventListener('ventrata-booking-removed',
(event) => {
alert(`ventrata booking removed with ID :${event.detail.id}`)
}
)

Event

Details

Name

ventrata-bottom-bar-visibility

Description

fires when bottom bar is shown or hidden

Usage

document.addEventListener('ventrata-bottom-bar-visibility',
(event) => {
alert(`bottom bar visibility is ${event.detail.visible}`)
}
)

Did this answer your question?