Link SDK Moonpay integration

The exchange functionality is available in SDK v1.3.33+ and is a collaboration between Immutable X and Moonpay. cryptoCurrencies param is available in SDK v1.3.38+


Early access feature

As of January 2021 only onramping funds is supported. Offramp support will soon follow.
Onramp functionality is available in SDK v1.3.33+
Onramp is in early access and will be updated and extended in the future.
Api endpoints to get the exchange process status will be available in the future.

The exchange process allows users to buy crypto from the Immutable X platform using a credit card. There's no gas price for purchases, only a Moonpay transaction fee.

The deposit happens directly on L2 via the transfer from Moonpay accounts.

The amount, fee and currency are selected within the Moonpay widget, and are under user's control. There's a minimal deposit amount of $20USD.

The current available cryptos are:

  • USDC
  • ETH
  • IMX
  • GODS


Exchange requires authenticated user

Link.fiatToCrypto({}) should only be called when user is authenticated and logged in, otherwise it will require user to reconnect

To initialise the exchange process with an option to choose any available currency, a developer needs to call the exchange function:

await link.fiatToCrypto({})

This displays the Link UI with loaded Moonpay widget:

To initialize the exchange process for a specific currency:

await link.fiatToCrypto({cryptoCurrencies: ['ETH']})

This displays the Link UI with loaded Moonpay widget:

To initialize the exchange process when a user can choose only specific currencies:

await link.fiatToCrypto({cryptoCurrencies: ['ETH', 'USDC']})

// or

await link.fiatToCrypto({cryptoCurrencies: ['IMX', 'GODS']})


Testing the flow

To test the transactions in the test environment please use the following test cards:

CARD: Visa
NUMBER: 4000056655665556
DATE: any date in the future
CVC: 123

CARD: Visa
NUMBER: 4000020951595032
DATE: 12/2022
CVC: 123

Did this page help you?