Integration options
Helping you decide which Swap integration option to choose
MoonPay Swaps is provided in two distinct flavours:
- A fully featured and self-contained web-based widget which you can embed or redirect to.
- An API-driven flow where you create your own swaps UI and use our widget to authenticate and KYC customers.
a) Swap widget flow
The web-based widget takes care of every aspect of a swap, from selecting the currencies to executing a quote and tracking the swap transaction.
With our SDKs, you can choose from various methods to display the MoonPay widget. This includes options such as presenting it in a modal overlay on your web app or integrating it within an in-app web view. To swap, the customer goes through the following steps in the widget:
- Confirm the base and quote cryptocurrencies, and amount to swap.
- Log in to the widget using multi-factor authentication (MFA).
- Go through KYC, if the customer is new to MoonPay.
- Confirm the swap.
- Customer deposits the base currency to MoonPay which then sends the quote currency to the customer.
Try the swap flow in our sandbox environment
Advantages
Integrating our ready-to-go widget has the following advantages:
Ease of integration: Our swaps widget is quick and easy to integrate. Using our SDKs you can embed our widget within your website or native mobile application, or simply redirect to it within a new browser window.
Themeable UI: Our widget can be themed to match your application's UI, improving your customers experience and increasing retention.
Get started with the Swap widget flow.
b) Swap API-driven flow
Our API-driven swap flow is a combined API and web-based UI product. This method allows you to create your own swaps UI where your customers can select the currencies to exchange and respective amounts, and see the resulting quotes which they can then accept to place a swap with MoonPay.
Prior to placing the swap order, first-time customers are required to authenticate and KYC with MoonPay. We provide a simplified web-based widget that initiates an authentication and KYC journey inside our MoonPay widget.
Advantages
The API-driven integration option has the following advantages:
Your own swaps UI: This method allows you to create your own swaps UI where your customers can select the currencies to exchange and respective amounts, and see the resulting quotes which they can then accept to place a swap with MoonPay.
Comprehensive APIs: We provide REST API endpoints which allow you to list currency pairs, get quotes and execute those quotes. Post transaction you can also query the status of your swap transactions.
Updated 8 months ago