Skip to content

feat(gql,google): add BillingClient 5.0+ and 7.0+ fields#78

Merged
hyochan merged 5 commits intomainfrom
feat/issue-77-billing-client-enhancement
Feb 10, 2026
Merged

feat(gql,google): add BillingClient 5.0+ and 7.0+ fields#78
hyochan merged 5 commits intomainfrom
feat/issue-77-billing-client-enhancement

Conversation

@hyochan
Copy link
Member

@hyochan hyochan commented Feb 10, 2026

Summary

  • Add purchaseOptionId for one-time purchase offers (BillingClient 7.0+)
  • Add InstallmentPlanDetailsAndroid for subscription installment plans (BillingClient 7.0+)
  • Add PendingPurchaseUpdateAndroid for subscription upgrades/downgrades (BillingClient 5.0+)

Closes #77

Changes

GraphQL Schema (packages/gql)

  • purchaseOptionId on ProductAndroidOneTimePurchaseOfferDetail
  • InstallmentPlanDetailsAndroid type with commitmentPaymentsCount and subsequentCommitmentPaymentsCount
  • installmentPlanDetails on ProductSubscriptionAndroidOfferDetails
  • PendingPurchaseUpdateAndroid type with products and purchaseToken
  • pendingPurchaseUpdateAndroid on PurchaseAndroid

Standardized Offer Types

  • purchaseOptionIdAndroid on DiscountOffer
  • installmentPlanDetailsAndroid on SubscriptionOffer

Android (packages/google)

  • Extract fields from BillingClient in BillingConverters.kt
  • Add fields to generated Types.kt
  • Comprehensive unit tests in StandardizedOfferTypesTest.kt

Documentation (packages/docs)

  • v1.3.17 release notes with accordion-style References
  • Updated type documentation for DiscountOffer, SubscriptionOffer, PurchaseAndroid
  • New PendingPurchaseUpdateAndroid type section

Test plan

  • bun run typecheck (docs)
  • Unit tests for all new fields
  • toJson/fromJson serialization tests

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Android installment plan tracking support (Billing Library 7.0+).
    • Added purchase option identification for Android offers.
    • Added pending purchase update tracking for Android upgrades and downgrades.
  • Documentation

    • Updated API documentation across multiple languages (TypeScript, Kotlin, Java, Dart, GDScript, Swift) to reflect new Android features.
  • Tests

    • Added comprehensive test coverage for Android-specific purchase and offer functionality.

hyochan and others added 5 commits February 11, 2026 06:08
Android BillingClient enhancements:
- purchaseOptionId on ProductAndroidOneTimePurchaseOfferDetail (7.0+)
- InstallmentPlanDetailsAndroid type for subscription installments (7.0+)
- installmentPlanDetails on ProductSubscriptionAndroidOfferDetails
- PendingPurchaseUpdateAndroid for subscription upgrades/downgrades (5.0+)
- pendingPurchaseUpdateAndroid on PurchaseAndroid

Standardized offer types:
- purchaseOptionIdAndroid on DiscountOffer
- installmentPlanDetailsAndroid on SubscriptionOffer

Closes #77

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Regenerate TypeScript, Swift, Kotlin, Dart, GDScript types
from updated GraphQL schema with BillingClient 5.0+ and 7.0+ fields.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
BillingConverters:
- Extract purchaseOptionId from OneTimePurchaseOfferDetails (7.0+)
- Extract installmentPlanDetails from SubscriptionOfferDetails (7.0+)
- Extract pendingPurchaseUpdate from Purchase (5.0+)

Types.kt:
- Add purchaseOptionIdAndroid to DiscountOffer
- Add installmentPlanDetailsAndroid to SubscriptionOffer
- Add pendingPurchaseUpdateAndroid to PurchaseAndroid

Tests:
- Add comprehensive tests for all new fields
- Test toJson/fromJson serialization
- Test use cases like subscription downgrades

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Release notes (notes.tsx):
- Add v1.3.17 release entry for Android BillingClient Enhancement
- Convert all References sections to accordion format
- Add proper ul indentation for numbered headings

Type documentation:
- Add purchaseOptionIdAndroid to DiscountOffer (offer.tsx)
- Add installmentPlanDetailsAndroid to SubscriptionOffer (offer.tsx)
- Add pendingPurchaseUpdateAndroid to PurchaseAndroid (purchase.tsx)
- Add PendingPurchaseUpdateAndroid type section (purchase.tsx)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add debug/run configurations:
- GQL: Generate Types
- Docs: Dev Server
- Test: Apple (Swift)
- Test: Google (Android)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

This PR introduces Android-specific support for installment plan details, purchase option identification, and pending purchase updates across multiple packages. New fields are added to Swift, Kotlin, and TypeScript models, GraphQL schemas are extended, and comprehensive documentation is provided across all supported languages.

Changes

Cohort / File(s) Summary
Developer Environment
.vscode/launch.json
Converted two launch configurations from node-terminal to node type, routing execution through bash with runtimeArgs to execute bun commands with integrated terminal output.
Swift Type Models
packages/apple/Sources/Models/Types.swift
Added Android-specific fields: purchaseOptionIdAndroid to DiscountOffer, purchaseOptionId to ProductAndroidOneTimePurchaseOfferDetail, installmentPlanDetails to ProductSubscriptionAndroidOfferDetails, and new structs InstallmentPlanDetailsAndroid and PendingPurchaseUpdateAndroid.
Kotlin Type Models & Serialization
packages/google/openiap/src/main/java/.../Types.kt
Added Android-specific data classes (InstallmentPlanDetailsAndroid, PendingPurchaseUpdateAndroid) and extended existing models with purchase option, installment plan, and pending purchase fields; wired through fromJson and toJson serialization.
Kotlin Converter Logic
packages/google/openiap/src/play/java/.../BillingConverters.kt
Extended conversion pathways to map InstallmentPlanDetailsAndroid, purchase option IDs, and pending purchase updates from Billing Library objects into model types.
Unit Tests
packages/google/openiap/src/test/java/.../StandardizedOfferTypesTest.kt
Added comprehensive test suite covering Android-specific fields, fromJson/toJson serialization, and related behavior across all new and modified types.
GraphQL Schemas
packages/gql/src/type.graphql, packages/gql/src/type-android.graphql
Added new scalar fields and types: purchaseOptionIdAndroid on DiscountOffer, installmentPlanDetailsAndroid on SubscriptionOffer, and new types InstallmentPlanDetailsAndroid and PendingPurchaseUpdateAndroid.
Documentation
packages/docs/src/pages/docs/types/android.tsx, offer.tsx, purchase.tsx
Added field documentation and code examples across TypeScript, Kotlin, Java, Dart, and GDScript showing new Android installment plan details, purchase option tracking, and pending purchase update structures.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

🎯 feature, 🤖 android, ❄️ types, 📖 documentation

Poem

🐰 Hoppy hops through billing calls,
Android fields rise through the halls!
Installments, options, pending states—
New models open all the gates! 🎉
Cross-platform clarity takes the stage,
GraphQL and code, each perfect page!

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.41% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding BillingClient 5.0+ and 7.0+ fields across packages.
Linked Issues check ✅ Passed The PR fully implements issue #77's requirement to add purchaseOptionId to OneTimePurchaseOfferDetails and extends support with related BillingClient fields.
Out of Scope Changes check ✅ Passed All changes are directly related to issue #77; VSCode launch.json changes appear to be supporting infrastructure for development and testing workflows.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/issue-77-billing-client-enhancement

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @hyochan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the Android billing capabilities by integrating support for several new features from Google Play Billing Library versions 5.0 and 7.0. It introduces fields for identifying specific purchase options in one-time purchases, detailing installment plans for subscriptions, and tracking pending subscription changes like upgrades or downgrades. These additions ensure the system can accurately capture and process more granular billing information, improving the overall robustness and feature parity with the latest Android billing APIs.

Highlights

  • New Android Billing Fields: Introduced purchaseOptionId for Android one-time purchase offers (BillingClient 7.0+), InstallmentPlanDetailsAndroid for subscription installment plans (BillingClient 7.0+), and PendingPurchaseUpdateAndroid for subscription upgrades/downgrades (BillingClient 5.0+).
  • GraphQL Schema and Type Generation: Updated the GraphQL schema and regenerated types across multiple languages (Kotlin, Swift, Dart, Godot, TypeScript) to incorporate the new Android billing fields and types.
  • Documentation Updates: Added comprehensive documentation for the new Android-specific fields and types, including purchaseOptionId, InstallmentPlanDetailsAndroid, and PendingPurchaseUpdateAndroid, in the packages/docs module.
  • Billing Converters and Unit Tests: Implemented logic in BillingConverters.kt to extract the new fields from Google Play Billing Library objects and added extensive unit tests to ensure correct functionality and serialization of all new Android billing types.
  • VS Code Launch Configurations: Updated VS Code launch configurations to use bun run commands with bash -lc for GraphQL type generation and documentation development, improving the development workflow.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .vscode/launch.json
    • Updated launch configurations to use bun run commands with bash -lc for gql:generate types and docs:dev server.
  • packages/apple/Sources/Models/Types.swift
    • Added purchaseOptionIdAndroid to DiscountOffer.
    • Introduced InstallmentPlanDetailsAndroid and PendingPurchaseUpdateAndroid structs.
    • Added installmentPlanDetails to ProductSubscriptionAndroidOfferDetails.
    • Added pendingPurchaseUpdateAndroid to PurchaseAndroid.
  • packages/docs/src/pages/docs/types/android.tsx
    • Documented the new purchaseOptionId field for Android one-time purchase offers.
  • packages/docs/src/pages/docs/types/offer.tsx
    • Documented purchaseOptionIdAndroid on DiscountOffer.
    • Documented installmentPlanDetailsAndroid on SubscriptionOffer.
    • Added the InstallmentPlanDetailsAndroid interface/struct definitions.
  • packages/docs/src/pages/docs/types/purchase.tsx
    • Documented the pendingPurchaseUpdateAndroid field on PurchaseAndroid.
    • Provided details for the new PendingPurchaseUpdateAndroid type.
  • packages/google/openiap/src/main/java/dev/hyo/openiap/Types.kt
    • Added purchaseOptionIdAndroid to DiscountOffer.
    • Defined InstallmentPlanDetailsAndroid and PendingPurchaseUpdateAndroid data classes.
    • Included installmentPlanDetails in ProductSubscriptionAndroidOfferDetails.
    • Included pendingPurchaseUpdateAndroid in PurchaseAndroid.
    • Updated fromJson and toJson methods for affected data classes.
  • packages/google/openiap/src/play/java/dev/hyo/openiap/utils/BillingConverters.kt
    • Implemented conversion logic to extract purchaseOptionId from one-time purchase offers.
    • Implemented conversion logic to extract installmentPlanDetails from subscription offers.
    • Implemented conversion logic to extract pendingPurchaseUpdate from purchase objects.
  • packages/google/openiap/src/test/java/dev/hyo/openiap/StandardizedOfferTypesTest.kt
    • Added unit tests for DiscountOffer.purchaseOptionIdAndroid.
    • Added unit tests for InstallmentPlanDetailsAndroid.
    • Added unit tests for SubscriptionOffer.installmentPlanDetailsAndroid.
    • Added unit tests for ProductAndroidOneTimePurchaseOfferDetail.purchaseOptionId.
    • Added unit tests for ProductSubscriptionAndroidOfferDetails.installmentPlanDetails.
    • Added unit tests for PendingPurchaseUpdateAndroid.
    • Added unit tests for PurchaseAndroid.pendingPurchaseUpdateAndroid.
  • packages/gql/src/generated/Types.kt
    • Updated generated Kotlin types to include new Android billing fields and types.
  • packages/gql/src/generated/Types.swift
    • Updated generated Swift types to include new Android billing fields and types.
  • packages/gql/src/generated/types.dart
    • Updated generated Dart types to include new Android billing fields and types.
  • packages/gql/src/generated/types.gd
    • Updated generated Godot types to include new Android billing fields and types.
  • packages/gql/src/generated/types.ts
    • Updated generated TypeScript types to include new Android billing fields and types.
  • packages/gql/src/type-android.graphql
    • Extended ProductAndroidOneTimePurchaseOfferDetail with purchaseOptionId.
    • Defined InstallmentPlanDetailsAndroid type.
    • Added installmentPlanDetails to ProductSubscriptionAndroidOfferDetails.
    • Defined PendingPurchaseUpdateAndroid type.
    • Added pendingPurchaseUpdateAndroid to PurchaseAndroid.
  • packages/gql/src/type.graphql
    • Extended DiscountOffer with purchaseOptionIdAndroid.
    • Extended SubscriptionOffer with installmentPlanDetailsAndroid.
Activity
  • The pull request was created to address Issue Request to add purchaseOptionId to OneTimePurchaseOfferDetails #77, focusing on enhancing Android billing capabilities.
  • The author, hyochan, implemented changes across the GraphQL schema, Android types, and documentation.
  • The changes were generated using Claude Code, indicating an AI-assisted development process.
  • The author verified the changes with bun run typecheck for documentation, unit tests for all new fields, and toJson/fromJson serialization tests.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@hyochan hyochan added the 🎯 feature New feature label Feb 10, 2026
@hyochan hyochan changed the title feat(gql,google): add BillingClient 5.0+ and 7.0+ fields (Issue #77) feat(gql,google): add BillingClient 5.0+ and 7.0+ fields Feb 10, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for new fields from Google Play Billing Library versions 5.0+ and 7.0+, specifically purchaseOptionId, InstallmentPlanDetailsAndroid, and PendingPurchaseUpdateAndroid. The changes are comprehensive, spanning GraphQL schemas, generated types for multiple languages, the native Android implementation, and documentation. The new functionality is also well-covered by unit tests. The code quality is high, and I have just one suggestion for a minor refactoring to improve maintainability by reducing code duplication.

@hyochan hyochan merged commit 910ab68 into main Feb 10, 2026
7 checks passed
@hyochan hyochan deleted the feat/issue-77-billing-client-enhancement branch February 10, 2026 21:18
hyochan added a commit to hyochan/react-native-iap that referenced this pull request Feb 11, 2026
## Summary

- Sync with OpenIAP v1.3.17
- Add InstallmentPlanDetailsAndroid type (Billing Library 7.0+)
- Add PendingPurchaseUpdateAndroid type (Billing Library 5.0+)
- Add purchaseOptionIdAndroid field to DiscountOffer (Billing Library
7.0+)
- Add tests for new types
- Update llms.txt with new type documentation
- Add release blog post

## Related

- OpenIAP PR: hyodotdev/openiap#78
- OpenIAP Release Notes:
https://www.openiap.dev/docs/updates/notes#gql-1-3-17-google-1-3-28

## OpenIAP Versions

| Package | Version |
|---------|---------|
| openiap-gql | 1.3.17 |
| openiap-google | 1.3.28 |
| openiap-apple | 1.3.14 |

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
hyochan added a commit to hyochan/kmp-iap that referenced this pull request Feb 11, 2026
## Summary

- Sync with OpenIAP v1.3.17
- Add InstallmentPlanDetailsAndroid data class (Billing Library 7.0+)
- Add PendingPurchaseUpdateAndroid data class (Billing Library 5.0+)
- Add purchaseOptionIdAndroid field to DiscountOffer (Billing Library
7.0+)
- Update llms.txt with new type documentation
- Add release blog post

## Related

- OpenIAP PR: hyodotdev/openiap#78
- OpenIAP Release Notes:
https://www.openiap.dev/docs/updates/notes#gql-1-3-17-google-1-3-28

## OpenIAP Versions

| Package | Version |
|---------|---------|
| openiap-gql | 1.3.17 |
| openiap-google | 1.3.28 |
| openiap-apple | 1.3.14 |

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
hyochan added a commit to hyochan/flutter_inapp_purchase that referenced this pull request Feb 11, 2026
## Summary

- Sync with OpenIAP v1.3.17
- Add InstallmentPlanDetailsAndroid class (Billing Library 7.0+)
- Add PendingPurchaseUpdateAndroid class (Billing Library 5.0+)
- Add purchaseOptionIdAndroid field to DiscountOffer (Billing Library
7.0+)
- Update llms.txt with new type documentation
- Add release blog post

## Related

- OpenIAP PR: hyodotdev/openiap#78
- OpenIAP Release Notes:
https://www.openiap.dev/docs/updates/notes#gql-1-3-17-google-1-3-28

## OpenIAP Versions

| Package | Version |
|---------|---------|
| openiap-gql | 1.3.17 |
| openiap-google | 1.3.28 |
| openiap-apple | 1.3.14 |

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
hyochan added a commit to hyochan/godot-iap that referenced this pull request Feb 11, 2026
## Summary

- Sync with OpenIAP v1.3.17
- Add InstallmentPlanDetailsAndroid class (Billing Library 7.0+)
- Add PendingPurchaseUpdateAndroid class (Billing Library 5.0+)
- Add purchase_option_id_android field to DiscountOffer (Billing Library
7.0+)
- Update llms.txt with new type documentation
- Add release blog post

## Related

- OpenIAP PR: hyodotdev/openiap#78
- OpenIAP Release Notes:
https://www.openiap.dev/docs/updates/notes#gql-1-3-17-google-1-3-28

## OpenIAP Versions

| Package | Version |
|---------|---------|
| openiap-gql | 1.3.17 |
| openiap-google | 1.3.28 |
| openiap-apple | 1.3.14 |

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added support for Google Play Billing Library 7.0+ features including
installment payment plans and purchase option identification
  * Enhanced support for pending purchase updates (Billing Library 5.0+)
* Improved data structure initialization across Android and iOS in-app
purchases

* **Documentation**
* Added v1.2.4 release notes documenting new billing library feature
support

* **Chores**
  * Updated dependency versions for improved compatibility

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎯 feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request to add purchaseOptionId to OneTimePurchaseOfferDetails

1 participant