CustomEvents that you can listen to on your page. Use these to trigger post-payment UX β such as showing a success message, refreshing inventory, or dismissing a modal β without polling.
Client-side events are available in widget mode only. They are not emitted in redirect mode. For authoritative payment confirmation in both modes, use webhooks.
Event Types
FortePaymentsBuyVdaSuccess
FortePaymentsBuyVdaSuccess
Emitted when the user exits the widget from the success screen after completing a VDG purchase β whether they press βDoneβ or click the close button.When to act: This is a UI signal that the user has seen the success confirmation. For authoritative delivery confirmation β especially before delivering a Virtual Digital Good β wait for the
payment_approved webhook.FortePaymentsWidgetClosed
FortePaymentsWidgetClosed
Emitted when the user closes the widget from any screen that is not the success screen β including mid-flow abandonment, after a payment decline, or after session expiry.Use this event to handle clean-up UX, such as re-showing a βBuyβ button or dismissing a modal.
Event Listener Snippet
Add event listeners before the script that loads the Forte widget.detail object includes the paymentIntentId associated with the session.
Authoritative Payment Confirmation
Client-side events confirm that the user closed the widget β not that the payment has settled. For authoritative confirmation before delivering a Virtual Digital Good, always rely on the server-sidepayment_approved webhook.
Webhooks
Set up server-side webhook subscriptions for payment status events