14.6.4 - Google Play Billing 8.3.0 External Payments Support
14.6.4 adds support for the External Payments program introduced in Google Play Billing Library 8.3.0. This new feature enables developers to offer a side-by-side choice between Google Play Billing and their external payment option directly in the purchase flow.
What's New
External Payments Program (Japan Only)
Google Play Billing Library 8.3.0 introduces the External Payments program, which presents a side-by-side choice between Google Play Billing and the developer's external payment option directly in the purchase dialog.
This differs from the existing User Choice Billing in that both options appear together in the same dialog, rather than requiring a separate selection dialog.
New APIs
BillingProgramAndroid.EXTERNAL_PAYMENTS- New billing program type for external paymentsDeveloperBillingOptionParamsAndroid- Configure external payment option in purchase flowDeveloperBillingLaunchModeAndroid- How to launch the external payment linkDeveloperProvidedBillingDetailsAndroid- ContainsexternalTransactionTokenwhen user selects developer billingdeveloperProvidedBillingListenerAndroid- New listener for when user selects developer billingdeveloperBillingOption- New field inRequestPurchaseAndroidPropsandRequestSubscriptionAndroidProps
New Event
IapEvent.DeveloperProvidedBillingAndroid- Fired when user selects developer billing in External Payments flow
Usage Example
import {
enableBillingProgramAndroid,
developerProvidedBillingListenerAndroid,
requestPurchase,
initConnection,
} from 'react-native-iap';
// Option A: Enable External Payments via initConnection config (Recommended)
await initConnection({
enableBillingProgramAndroid: 'external-payments',
});
// Option B: Enable manually BEFORE initConnection
enableBillingProgramAndroid('external-payments');
await initConnection();
// Set up listener for when user selects developer billing
const subscription = developerProvidedBillingListenerAndroid((details) => {
console.log('User selected developer billing');
console.log('Token:', details.externalTransactionToken);
// Process payment through your external payment system
processExternalPayment();
// Report to Google Play backend within 24 hours
reportToGooglePlay(details.externalTransactionToken);
});
// Request purchase with developer billing option
await requestPurchase({
request: {
google: {
skus: ['premium_monthly'],
developerBillingOption: {
billingProgram: 'external-payments',
linkUri: 'https://your-website.com/payment',
launchMode: 'launch-in-external-browser-or-app',
},
},
},
type: 'subs',
});
Key Differences from User Choice Billing
| Feature | User Choice Billing | External Payments |
|---|---|---|
| Billing Library | 7.0+ | 8.3.0+ |
| Availability | Eligible regions | Japan only |
| UI | Separate dialog | Side-by-side in purchase dialog |
| Setup Mode | alternativeBillingModeAndroid: 'user-choice' | enableBillingProgramAndroid('external-payments') |
| Listener | userChoiceBillingListenerAndroid | developerProvidedBillingListenerAndroid |
OpenIAP Updates
- openiap-google: 1.3.16 → 1.3.19 - Google Play Billing 8.3.0 External Payments support
- openiap-gql: 1.3.8 → 1.3.10 - External Payments types,
enableBillingProgramAndroidin InitConnectionConfig - openiap-apple: 1.3.7 → 1.3.8 - Auto connection management improvements
Important Notes
- External Payments is currently only available in Japan
- Can enable via
initConnection({ enableBillingProgramAndroid: 'external-payments' })(recommended) orenableBillingProgramAndroid('external-payments')before initConnection - External transaction token must be reported to Google Play within 24 hours
- If user selects Google Play billing,
purchaseUpdatedListenerfires as normal
Installation
npm install react-native-iap react-native-nitro-modules
# or
yarn add react-native-iap react-native-nitro-modules
# or
bun add react-native-iap react-native-nitro-modules
Check out the Alternative Billing Guide for detailed documentation.
Questions or feedback? Reach out via GitHub issues.
