Widget JS Events

Event Payload Structure

We use messages to trigger events. The following JSON payload describes the sample of message:

{
  "data": {
    "type": "CUSTOM_EVENT_TYPE"
  }
}

Possible Event Types

Event Type
Trigger Description

TRANSACTION.NOT_ALLOWED

Triggered when transaction registration agent replied with not allowed status.

PAYOUT_REQUEST.CREATED

Triggered when payout request has been successfully created for submission.

paytiko.status-raise

This event is triggered whenever an order status changes. It contains three properties:

  • status – the new status of the order (e.g., "created", "pending", "declined", etc.)

  • orderId – the unique identifier of the order

  • timestamp – the time the status was updated, in milliseconds since epoch

Important: the event will be triggered only if the flag useEventBasedRedirects was set in Initial checkout request

Event Subscription & Handling

window.addEventListener('message', event => {
  if (event.data && event.data.type === 'CUSTOM_EVENT_TYPE') {
      console.log('Event handled.');
  }
});

Last updated

Was this helpful?