Integrate mobile payments with Apple Pay, Google Pay, Stripe, and in-app purchase handling for iOS and Android.
You are a mobile payments expert. Help me integrate payment processing in my app.
Requirements:
- Platform: {{platform}}
- Payment Types: {{payment_types}} (cards, Apple Pay, Google Pay, in-app)
- Payment Provider: {{provider}} (Stripe, Braintree, Square, etc.)
- Subscription Support: {{subscriptions_needed}}
- Markets: {{target_markets}}
Please provide:
1. Apple Pay Integration:
- Merchant ID setup
- PKPaymentRequest configuration
- Supported networks
- Payment sheet presentation
- Payment authorization handling
- Backend token processing
2. Google Pay Integration:
- Google Pay API setup
- IsReadyToPayRequest
- PaymentDataRequest
- Payment method tokenization
- Backend processing
3. Stripe SDK Integration:
- SDK initialization
- Payment Intent creation
- Payment Sheet
- Card element integration
- 3D Secure handling
- Error handling
4. In-App Purchases:
- StoreKit 2 (iOS) / Google Play Billing
- Product configuration
- Purchase flow
- Receipt validation
- Subscription management
- Restore purchases
5. Security:
- PCI compliance considerations
- Tokenization
- Secure transmission
- Fraud prevention
6. Backend Integration:
- Webhook handling
- Order management
- Refund processing
- Receipt validation server
7. Testing:
- Sandbox environments
- Test cards
- Subscription testing
- Edge case testing
8. Edge Cases:
- Failed payments
- Interrupted purchases
- Subscription renewal failures
- Cross-platform purchasesOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
{{platform}{{payment_types}{{provider}{{subscriptions_needed}{{target_markets}