8.1.2
New Features
-
External Payments Program (Android 8.3.0+, Japan Only): Support for Google Play Billing Library 8.3.0's External Payments program
- Presents a side-by-side choice between Google Play Billing and the developer's external payment option directly in the purchase flow
- New
BillingProgramAndroid.ExternalPaymentsbilling program type - New
DeveloperBillingOptionParamsAndroidto configure external payment option in purchase flow - New
DeveloperBillingLaunchModeAndroidenum for how to launch the external payment link - New
DeveloperProvidedBillingDetailsAndroidtype containingexternalTransactionTokenwhen user selects developer billing - New
developerProvidedBillingAndroidstream for listening to developer billing selection events - New
developerBillingOptionfield inRequestPurchaseAndroidPropsandRequestSubscriptionAndroidProps
// Listen for developer billing selection iap.developerProvidedBillingAndroid.listen((details) { // User selected developer billing // Report transaction to Google within 24 hours using details.externalTransactionToken print('External transaction token: ${details.externalTransactionToken}'); }); // Request purchase with external payments option await iap.requestPurchaseWithBuilder( build: (builder) { builder.google.skus = ['product_id']; builder.google.developerBillingOption = DeveloperBillingOptionParamsAndroid( billingProgram: BillingProgramAndroid.ExternalPayments, launchMode: DeveloperBillingLaunchModeAndroid.LaunchInExternalBrowserOrApp, linkUri: 'https://example.com/checkout', ); builder.type = ProductQueryType.InApp; }, );