Integrate Apple Pay and Google Pay into your mini-app
Both Apple Pay and Google Pay run directly in the WebView environment of your mini-app, using their respective JavaScript APIs.

Environment Setup

First, ensure your mini-app has a secure HTTPS environment, as both Apple Pay and Google Pay require it.
For Apple Pay, you must: - Register for an Apple Developer account - Configure your merchant ID - Register your domain with Apple - Set up merchant validation on your server Complete setup guide on Apple’s website

Testing

Test your integration thoroughly using test cards and sandbox environments.
Development Environment: - Use Apple Pay’s sandbox environment - Test with Apple’s test cards Test Cards: - You can use any valid card number in the sandbox - No actual charges will be processed Testing Checklist:
  • Verify merchant validation works - Test on both iOS devices and Safari on macOS - Check error handling - Verify payment completion flows
Apple Pay integration demo

Limitations and Considerations

  • Platform Restrictions: Apple Pay only works on iOS/macOS devices with Safari, while Google Pay is primarily for Android
  • Device Support: Users must have devices that support these payment methods
  • WebView Context: Some features might behave differently in the mini-app WebView compared to a standard browser
For Apple Pay merchant validation, your server needs to be accessible via HTTPS and properly configured with Apple’s developer portal.

Additional Resources