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
This event is only fired for those integrating with our Swaps (SDK+API) product.
▸ 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
Name | Type |
---|---|
props | OnAuthTokenProps |
Returns
Promise
<void
>
Inherited from
RampsSwapsKycChildToParentInterface.onAuthToken
onClose
▸ onClose(): Promise
<void
>
Fired when the Widget is closing, triggered by either system logic or user actions.
Returns
Promise
<void
>
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
Name | Type |
---|---|
props | OnInitiateDepositProps |
Returns
Promise
<OnInitiateDepositReplyProps
>
onLogin
▸ onLogin(props
): Promise
<void
>
Fired when the customer logs in or their authentication is refreshed.
Parameters
Name | Type |
---|---|
props | OnLoginProps |
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
onTransactionCreated
▸ onTransactionCreated(props
): Promise
<void
>
Fired when a buy, sell, or NFT transaction is created, just before redirecting to the transaction tracker.
Parameters
Name | Type |
---|---|
props | OnTransactionCreatedProps |
Returns
Promise
<void
>
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
Name | Type |
---|---|
props | OnTransactionCompletedProps |
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
>
Updated about 7 hours ago