Seamless fiat on-ramp integration for purchasing cryptocurrency with credit cards and Apple Pay
Install MoonPay SDK
Configure API Key
.env.local
:Import Components
pk_test_
prefixed keys for testing and pk_live_
for production. The module automatically detects the environment.MoonPayWidget
- Core component that embeds MoonPay’s purchase flowapiKey
- Your MoonPay API keyenvironment
- ‘sandbox’ or ‘production’height
- Widget height in pixelsonOpen
- Callback when widget loadsonError
- Error handling callbackonRetry
- Retry mechanism callbackmoonpayService.ts
provides configuration and validation utilities: