Skip to main content

Event types

Payrails Web SDK has two categories of events:
Important Update:As of @payrails/web-sdk@5.36.0, Payrails Elements’ payment authorization related events are now marked deprecated. For more information, please checkout this page.Please refer to these generic events as replacements.

Rules for Event Execution

While UI events are async and trigger on user interaction (such as onChange, onFocus), payment events have some rules and order of execution around them. onAuthorizeSuccess , onAuthorizeFailed and onAuthorizePending are terminal events. This means each request will result in at least a success or failed state and corresponding event will be fired. Rules for event execution are defined below:
  • onPaymentButtonClicked (UI Event) - if this returns false, this also calls onAuthorizeFailed as terminal event.
  • onThreeDSecureChallenge - triggered when the user sees the 3D Secure popup.
  • onPaymentSessionExpired - in case of unauthorized request. Also calls onAuthorizeFailed as terminal event.
  • onAuthorizeFailed - when payment authorization fails. With this event you would also get the reason why the execution failed. This is based on the operations codes.
  • onAuthorizeSuccess - when payment authorization is successful
  • onAuthorizePending - triggered when the execution is in pending state with no further action required from the user. (Please reach out to your account manager on what could be the potential use cases for this event)

Web SDK Event Glossary

React Native Event Glossary

Last modified on September 30, 2026