Interface EventListeners

A set of non-blocking callback functions that are triggered in response to the widget events.

Example

<SuperfluidWidget eventListeners={{
onSuccess: () => console.log('Checkout is successfully finished!'),
onSuccessButtonClick: () => console.log('Merchant success button is clicked!')
onPaymentOptionUpdate: (paymentOption) => setChainId(paymentOption?.chainId);
}} />

Hierarchy

  • EventListeners

Properties

onPaymentOptionUpdate?: ((paymentOption?) => void)

Type declaration

    • (paymentOption?): void
    • Called when the payment option is initialized or changed by the user.

      Parameters

      Returns void

onSuccess?: (() => void)

Type declaration

    • (): void
    • Called when the checkout is successfully finished.

      Returns void

onSuccessButtonClick?: (() => void)

Type declaration

    • (): void
    • Called when the merchant's success button is defined in the schema and it's clicked.

      Returns void

Generated using TypeDoc