MoonPay Integration for Crypto Purchase in Mobile App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
MoonPay Integration for Crypto Purchase in Mobile App
Simple
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

MoonPay Integration for Crypto Purchase in a Mobile App

MoonPay is one of the most widespread on-ramp providers. It supports 160+ countries, Visa/Mastercard/Amex, Apple Pay, Google Pay, and bank transfers. Integration via widget takes a day, but properly signed URLs and callback handling are separate challenges.

Obtaining API Keys and URL Signing

At dashboard.moonpay.com, create an account and get a publishable key (public, for the app) and secret key (server-only). Without the secret key, you can't sign the URL; without the signature, MoonPay blocks the widget.

Signature is HMAC-SHA256 of the URL query string:

// Forming a signed URL — executed on backend, not in app
// Server-side (Node.js example):
const crypto = require('crypto');
const queryString = new URL(widgetUrl).search; // "?apiKey=...&walletAddress=..."
const signature = crypto
  .createHmac('sha256', process.env.MOONPAY_SECRET_KEY)
  .update(queryString)
  .digest('base64');
const signedUrl = `${widgetUrl}&signature=${encodeURIComponent(signature)}`;

The app requests the signed URL from its own backend and never stores the secret key locally.

Opening the Widget on iOS and Android

// iOS — SFSafariViewController (recommended by MoonPay)
import SafariServices
let vc = SFSafariViewController(url: URL(string: signedUrl)!)
vc.preferredBarTintColor = UIColor(named: "AppBackground")
vc.preferredControlTintColor = UIColor(named: "AppTint")
present(vc, animated: true)
// Android — Chrome Custom Tabs
val customTabsIntent = CustomTabsIntent.Builder()
    .setToolbarColor(ContextCompat.getColor(context, R.color.app_background))
    .setShowTitle(true)
    .build()
customTabsIntent.launchUrl(context, Uri.parse(signedUrl))

Don't open the widget in a regular WebView — MoonPay explicitly discourages this for 3DS security reasons.

Customization Parameters

Key query parameters for the widget:

  • walletAddress — address to receive crypto
  • currencyCodeeth, btc, sol, usdc_ethereum, etc.
  • baseCurrencyAmount — pre-filled amount in fiat
  • baseCurrencyCodeusd, eur, gbp
  • colorCode — accent color (URL-encoded hex, %23FF6600)
  • languageen, ru, de, etc.
  • email — pre-fill email for KYC (if known)
  • redirectURL — URL to return to app after purchase

Handling Result via Deeplink

After a successful purchase, MoonPay redirects to redirectURL. Register a custom URL scheme in your app:

// Android: AndroidManifest.xml
// <intent-filter>
//   <data android:scheme="myapp" android:host="moonpay-success"/>
// </intent-filter>

override fun onNewIntent(intent: Intent) {
    val uri = intent.data ?: return
    if (uri.host == "moonpay-success") {
        val txId = uri.getQueryParameter("transactionId")
        // Show success screen, update balance after 30 sec
    }
}

Additionally, use a webhook on the backend for reliable status retrieval (transaction_completed, transaction_failed). MoonPay sends events to the webhookUrl specified in dashboard settings.

Timeline: 2–3 days for backend URL signing, integrating the widget via SFSafariViewController/CustomTabs, deeplink callback handling, and balance updates after successful purchase.