The React Native,
Flutter, and
Kotlin SDKs render and configure this WebView for you. If you build with one
of those frameworks, start from the SDK instead and return here only if you need full control over the WebView.
Prerequisites
- API keys: From the Crossmint Console, under Integrate → API Keys, create a server key (
sk_staging_...) with theorders.createandorders.readscopes, and a client key (ck_staging_...) with theorders.readscope. - A recipient wallet: purchased assets are delivered to a wallet address that you pass at order creation.
- A backend: order creation uses the server key, which must never ship inside the app.
Integration
1
Create the order server-side
Create the order from your backend and return the The example uses a token line item; NFT collection line items work the same way. See the
create order API reference for all line item types and options.
orderId and clientSecret to the app. The order carries the item, the recipient, and optionally the receipt email, so the checkout never needs to ask the user for them:2
Build the checkout URL
The checkout page accepts its configuration as URL query parameters:Every configuration option from payment methods and
UI customization works here. The example above renders a
wallet-button-only checkout; see the
one-tap Apple Pay quickstart for that experience end to end.
3
Render the URL in a WebView
A few WebView settings make the difference between a checkout that shows Apple Pay and Google Pay and one that silently does not. The tabs below contain the tested configuration per platform:
- React Native
- Android (Kotlin)
- iOS (Swift)
Requires react-native-webview version 13.15.0 or higher.For Google Pay, the app also needs the Android payment intent declaration from the
Google Pay guide.
4
Track the order
The checkout page reports progress with messages. In React Native, listen with On iOS (Swift) and Android (Kotlin), track the order from your backend instead: subscribe to
webhooks or poll the
get order endpoint with the
onMessage:orderId you already hold.5
Test on a physical device
Wallet payment methods render on real hardware: test Apple Pay on an iPhone running iOS 17 or higher with a card added to Apple Wallet, and Google Pay on an Android device with Google Play Services. In staging, wallet payments run against a test environment, so the card behind the wallet is never charged.To exercise the full purchase from a simulator or emulator during development, enable the card form
(
allowedMethods: { card: true, ... }) and pay with the staging test card 4242 4242 4242 4242. More options are
listed in testing tips.Troubleshooting
The payment sheet opens but the purchase never completes
The payment sheet opens but the purchase never completes
A navigation restriction is usually interrupting the checkout mid-purchase. Remove custom
WebViewClient/WKNavigationDelegate rules that cancel navigations, or extend your allowlist with the
domains listed under “Restricting navigation” above.The checkout page does not load
The checkout page does not load
- Enable JavaScript and DOM storage on the WebView (step 3).
- Match the base URL to the key environment:
ck_staging_/sk_staging_keys pair withstaging.crossmint.com, production keys withwww.crossmint.com. - Confirm the
paymentandappearanceparameters contain valid JSON after URL encoding.
A payment fails and nothing appears on screen
A payment fails and nothing appears on screen
Pass
GlobalMessage: { display: "visible" } inside appearance.rules (step 2). In layouts that hide the
checkout inputs, this rule is the surface where payment errors render.FAQ
Can a Crossmint SDK handle this for me?
Can a Crossmint SDK handle this for me?
Yes. The React Native,
Flutter, and
Kotlin SDKs apply this WebView configuration automatically and expose
the checkout as a component. Use this guide when you need your own WebView, or on platforms without an SDK,
such as native iOS (Swift).
Do I need to register a domain for Apple Pay?
Do I need to register a domain for Apple Pay?
No. Apple Pay domain registration applies to websites that embed the
checkout. In this integration the checkout page is served from
crossmint.com, which is already enabled for
Apple Pay.Can I open the checkout in a browser instead of a WebView?
Can I open the checkout in a browser instead of a WebView?
Yes. The checkout URL also renders in
SFSafariViewController, Chrome Custom Tabs, or a regular browser tab.
A WebView keeps the checkout inside your own screens; a browser surface takes less configuration and suits
flows where opening a sheet over the app is acceptable.Which payment methods can users see?
Which payment methods can users see?
The same ones as the embedded checkout on web: cards, Apple Pay, Google Pay, and crypto, controlled by the
payment URL parameter. See payment methods.Next Steps
One-Tap Apple Pay
Render only the wallet button and build the rest of the experience in your own UI
Google Pay Mobile
Production approval and native Android configuration for Google Pay
UI Customization
Theme the checkout through the appearance parameter

