14.4.12 - Alternative Billing Support
React Native IAP 14.4.12 introduces comprehensive alternative billing support for both iOS and Android platforms, empowering developers to use external payment systems alongside or instead of platform billingβunlocking reduced fees and greater monetization flexibility.
π View the full release on GitHub
π What's Newβ
Alternative Billing for Android & iOSβ
Android - Two modes supported:
- Alternative Billing Only: Exclusive use of your payment system
- User Choice Billing: Users choose between Google Play or your payment system
- Reduced Fees: 4% service fee reduction when using alternative billing
- Regional Availability: South Korea, India, EEA
iOS - External purchase links:
- External URLs: Redirect users to your website for payment (iOS 16.0+)
- Notice Sheets: Required disclosure before external redirect (iOS 18.2+)
- Reduced Commission: 27% (vs. 30%) for year 1, 12% for subsequent years
- Regional Availability: US, EU, and approved countries
π± New APIsβ
Androidβ
import {
initConnection,
checkAlternativeBillingAvailabilityAndroid,
showAlternativeBillingDialogAndroid,
createAlternativeBillingTokenAndroid,
userChoiceBillingListenerAndroid,
} from 'react-native-iap';
Core Methods:
initConnection(config)
- Configure billing modecheckAlternativeBillingAvailabilityAndroid()
- Check availabilityshowAlternativeBillingDialogAndroid()
- Show information dialogcreateAlternativeBillingTokenAndroid()
- Generate reporting token
Event Listener:
userChoiceBillingListenerAndroid()
- Listen for user billing choice
iOSβ
import {
canPresentExternalPurchaseNoticeIOS,
presentExternalPurchaseNoticeSheetIOS,
presentExternalPurchaseLinkIOS,
} from 'react-native-iap';
Core Methods:
canPresentExternalPurchaseNoticeIOS()
- Check notice availability (iOS 18.2+)presentExternalPurchaseNoticeSheetIOS()
- Show disclosure notice (iOS 18.2+)presentExternalPurchaseLinkIOS()
- Open external link (iOS 16.0+)
π§ Expo Config Pluginβ
Automatic iOS setup with zero manual configuration:
// app.config.ts
export default {
plugins: [
[
'react-native-iap',
{
iosAlternativeBilling: {
countries: ['kr', 'nl'], // ISO 3166-1 alpha-2 codes
links: {
kr: 'https://your-site.com/kr/checkout',
nl: 'https://your-site.com/nl/checkout',
},
enableExternalPurchaseLink: true,
},
},
],
],
};
The plugin automatically adds:
- β
Required entitlements (
com.apple.developer.storekit.external-purchase*
) - β
Info.plist keys (
SKExternalPurchase
,SKExternalPurchaseLink
, etc.) - β URL validation and formatting
Advanced Configuration:
multiLinks
- Multiple URLs per country (iOS 17.5+, up to 5 for music apps)customLinkRegions
- Custom link regions (iOS 18.1+)streamingLinkRegions
- Music streaming regions (iOS 18.2+)
See Expo Plugin Guide for complete configuration options.
π¨ useIAP Hook Integrationβ
Alternative billing is fully integrated into the useIAP
hook:
import {useIAP} from 'react-native-iap';
const {connected} = useIAP({
// Android billing mode
alternativeBillingModeAndroid: 'user-choice', // or 'alternative-only'
// User choice event handler
onUserChoiceBillingAndroid: (details) => {
console.log('User selected alternative billing');
reportToBackend(details.externalTransactionToken);
},
});
π Documentation & Examplesβ
Comprehensive Guidesβ
- Alternative Billing Guide - Complete platform integration guide
- Alternative Billing Example - Code examples for both platforms
- API Reference - Full method documentation
- Type Definitions - TypeScript types and interfaces
Working Example Appβ
Complete alternative billing implementation in the example app:
π Location: example/screens/AlternativeBilling.tsx
Features:
- β¨ Platform-specific flows (iOS vs. Android)
- π Android billing mode switcher (alternative-only β user-choice)
- π± Real-time status and result display
- π Step-by-step compliance guidance
- π Deep linking recommendations (iOS)
Run Example:
cd example
yarn ios # or yarn android
# Navigate to "Alternative Billing" from home screen
View source: AlternativeBilling.tsx on GitHub
π¨ Technical Implementationβ
OpenIAP Upgradesβ
- openiap-apple β v1.2.10 - StoreKit external purchase support
- openiap-google β v1.2.12 - Alternative billing APIs
- openiap-gql β v1.0.12 - Updated type definitions
Android Architectureβ
- Native alternative billing API integration (Google Play Billing 7.0+)
- Automatic service reconnection handling
- Token creation and validation
- User choice event deduplication
iOS Architectureβ
- StoreKit External Purchase API integration (iOS 16.0+)
- Notice sheet support (iOS 18.2+)
- Automatic entitlement management
- URL validation and sanitization
Type Safetyβ
Full TypeScript support with comprehensive types:
type AlternativeBillingModeAndroid =
| 'none'
| 'alternative-only'
| 'user-choice';
interface UserChoiceBillingDetails {
products: string[];
externalTransactionToken: string;
}
interface ExternalPurchaseNoticeResultIOS {
result: 'continue' | 'cancel';
}
interface ExternalPurchaseLinkResultIOS {
success: boolean;
error?: string;
}
β οΈ Platform Requirementsβ
iOSβ
- Minimum Version: iOS 16.0+ (external links), iOS 18.2+ (notice sheets)
- App Store Connect: External purchase entitlement approval required
- Provisioning Profile: Must include StoreKit external purchase entitlements
- URL Requirements: HTTPS only, no query parameters, β€1,000 characters
π StoreKit External Purchase Documentation
Androidβ
- Google Play Console: Alternative billing approval required
- Token Reporting: Tokens must be reported to Google within 24 hours
- Backend: Server-side token validation and reporting
- Billing Library: Google Play Billing 7.0+
π Google Play Alternative Billing Documentation
Regional Availabilityβ
Platform | Regions |
---|---|
iOS | US, EU countries, and approved regions (varies by feature) |
Android | South Korea, India, EEA (varies by app category) |
π¦ Installationβ
npm install react-native-iap@14.4.12
# or
yarn add react-native-iap@14.4.12
# or
bun add react-native-iap@14.4.12
For Expo projects:
npx expo prebuild --clean # Apply config plugin changes
For React Native CLI:
cd ios && pod install # Install iOS dependencies
π¨ Breaking Changesβ
None - This release is fully backward compatible. All changes are additive.
π Acknowledgmentsβ
This release builds on the alternative billing implementation from expo-iap, bringing the same powerful features to React Native CLI projects.
Special thanks to:
- OpenIAP team for cross-platform alternative billing support
- Community contributors for testing and feedback
π Additional Resourcesβ
- OpenIAP Alternative Billing: openiap.dev/docs/alternative-billing
- Apple External Purchase: developer.apple.com/storekit/external-purchase
- Google Alternative Billing: developer.android.com/google/play/billing/alternative
- User Choice Billing (Android): support.google.com/googleplay/android-developer/answer/13821247
π¬ Feedbackβ
Questions or issues? Let us know via GitHub Issues.
Try out alternative billing in 14.4.12 and share your experience! π