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 requestarrow-up-right

paytiko.copy-to-clipboard

This event could be triggered for those payment providers that are based on manual payment by bank details If the cashier works in an iframe, this event should be handled on the client side

Event Subscription & Handling

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

Copy to Clipboard Event

Last updated