The Swift SDK is currently in Beta. View the source code on GitHub.

Native iOS onramp with Apple Pay support
Before you start
Set up your project and get an API key.
Swift SDK on GitHub
View the open source Swift SDK repository.
You can start testing Onramp in staging. Once you are ready to go live, reach out to
sales to enable the feature in production
- Install the Swift SDK using Swift Package Manager
- Create a Crossmint order for your authenticated users
- Use Crossmint’s embedded checkout component with SwiftUI to handle KYC, payment, and delivery automatically
Requirements
- iOS 14.0+
- SwiftUI framework
- Xcode 13.0 or later
1. Installation
Install the Crossmint Swift SDK using Swift Package Manager.1
Add Package Dependency
In Xcode, go to File > Add Package Dependencies and add:Select the
CrossmintCheckout product for your target.2
Create API key
Create a server-side API key with the
orders.create and orders.read scopes enabled.2. Create Order
Use the Create Order API to initiate the purchase process from your backend. Use the following token addresses for USDC on staging:| Chain | Staging Token Address |
|---|---|
| Solana | 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU |
| Base | 0x036CbD53842c5426634e7929541eC2318f3dCF7e |
🚨 IMPORTANT: The
payment.receiptEmail parameter is required for compliance reasons. This email is used by Crossmint to determine whether KYC is required for the order. The API accepts either recipient.email OR recipient.walletAddress, not both.Example Response
Example Response
3. Use Component
Once you have the order response withorderId and clientSecret, use Crossmint’s embedded checkout component in your SwiftUI view.
The component supports native Apple Pay for a seamless iOS payment experience.
Key Features (Beta)
- Native Apple Pay: Seamless integration with iOS payment system
- SwiftUI Components: Modern declarative UI framework
- Automatic KYC: Handles verification flow automatically
- Customizable Appearance: Control visibility of UI elements
4. Track Order
After the user completes payment, you can track the order status using webhooks or polling.Option 1: Webhooks (Recommended)
Configure a webhook endpoint to receive real-time order status updates:- Go to the Crossmint Console
- Add your webhook endpoint URL
- Subscribe to
order.payment.succeededandorder.delivery.succeededevents
Option 2: Polling
Poll the order status endpoint from your backend:order.payment.status and order.lineItems[].delivery.status fields to track progress.
5. Transaction Completion
Upon successful payment:- The purchased tokens (minus fees) are sent directly to the user’s wallet
- User receives an email receipt from hello@crossmint.io
- The embedded checkout component handles all the complexity of KYC verification and payment processing automatically
6. Next Steps
- Explore our Payment Methods Guide to learn about different payment options
- Check out our Production Launch Guide for going live
- View the Swift SDK source code on GitHub

