Ramps' events

Widget events in the SDK communication layer

Interface: RampsChildToParentInterface

This interface represents the events that the Widget SDK can trigger from within the MoonPay Widget to partners' parent applications.

This allows partner apps to be informed and adapt to certain widget lifecycle events.

Hierarchy

  • RampsSwapsKycChildToParentInterface

    RampsChildToParentInterface

Methods

onAuthToken

onAuthToken(props): Promise<void>

Fired when the partner needs to receive an updated customer auth token so
they can perform authorized actions on behalf of the customer.

Parameters

NameType
propsOnAuthTokenProps

Returns

Promise<void>

Inherited from

RampsSwapsKycChildToParentInterface.onAuthToken


onInitiateDeposit

onInitiateDeposit(props): Promise<OnInitiateDepositReplyProps>

Called in the integrated sell flow, in the transaction tracker, when the widget is waiting for the sell amount to be deposited by the customer.

This allows the partner to trigger a deposit right from their wallet app.

Parameters

Returns

Promise<OnInitiateDepositReplyProps>


onLogin

onLogin(props): Promise<void>

Fired when the customer logs in or their authentication is refreshed.

Parameters

NameType
propsOnLoginProps

Returns

Promise<void>


onSwapsCustomerSetupComplete

onSwapsCustomerSetupComplete(): Promise<void>

Fired when the Swaps Customer Setup flow has completed signaling to the parent app that the widget may now be closed.

Returns

Promise<void>

Inherited from

RampsSwapsKycChildToParentInterface.onSwapsCustomerSetupComplete


onTransactionCompleted

onTransactionCompleted(props): Promise<void>

Fired when a transaction is detected as completed or if a previously completed transaction is loaded again in the transaction tracker.

Parameters

Returns

Promise<void>


onUnsupportedRegion

onUnsupportedRegion(): Promise<void>

Fired when the Unsupported Region screen is triggered, independently of whether the widget redirects away from it.

Returns

Promise<void>