Skip to content

chore: migrate IAPKit verification host to kit.openiap.dev#102

Merged
hyochan merged 5 commits into
mainfrom
chore/cross-platform-iapkit-host-migration
Apr 19, 2026
Merged

chore: migrate IAPKit verification host to kit.openiap.dev#102
hyochan merged 5 commits into
mainfrom
chore/cross-platform-iapkit-host-migration

Conversation

@hyochan
Copy link
Copy Markdown
Member

@hyochan hyochan commented Apr 19, 2026

Summary

  • Migrate the IAPKit purchase verification endpoint from api.iapkit.com to kit.openiap.dev across native modules (Apple, Google) and all downstream libraries/docs.
  • Only the host changed — request/response schema, Authorization: Bearer <apiKey>, and /v1/purchase/verify path are identical; no consumer code change required after picking up the new package versions.
  • Add an IAPKit nav button (top-right) and a new "Verify Purchase with IAPKit" section on /docs/features/purchase.

Changes

Native modules (packages/apple, packages/google)

  • packages/apple/Sources/OpenIapModule.swift: IAPKit provider URL → https://kit.openiap.dev/v1/purchase/verify.
  • packages/google/openiap/src/main/java/dev/hyo/openiap/utils/PurchaseVerificationValidator.kt: DEFAULT_IAPKIT_ENDPOINThttps://kit.openiap.dev/v1/purchase/verify.

Docs (packages/docs)

  • IAPKIT_URL constant → https://kit.openiap.dev; update example.tsx, types/verification.tsx, lifecycle/subscription.tsx link targets.
  • New top-right IAPKit nav button (Navigation.tsx + navigation.css) with gradient pill styling.
  • features/purchase.tsx: new "Verify Purchase with IAPKit" section with verifyPurchaseWithProvider({ provider: 'iapkit', ... }) examples for TypeScript, Swift, Kotlin, KMP, Dart, GDScript; notes endpoint and API-key flow.
  • updates/releases.tsx: 2026-04-19 release note describing the host-only migration.

Libraries (env/plugin references)

  • Update Get your API key from https://iapkit.com comments to https://kit.openiap.dev in:
    • libraries/expo-iap/{example,plugin}
    • libraries/react-native-iap/{example,example-expo,plugin}
    • libraries/flutter_inapp_purchase/example
    • libraries/kmp-iap/{,example,example/iosApp/Configuration/Secrets.xcconfig.example}
  • bun.lock: workspace version sync picked up during bun install.

Test plan

  • bun run typecheck (packages/docs) passes
  • bunx prettier --check src/** (packages/docs) passes
  • Local build of downstream libraries (rn-iap, expo-iap, flutter, kmp) — URL-only change, no API surface impact; deferred to CI
  • Verify purchase flow against kit.openiap.dev with a valid API key

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Documentation

    • Updated API endpoint references across all platform-specific libraries and examples to reflect the new IAPKit location.
    • Added comprehensive purchase verification guide, including endpoint information and authentication requirements.
    • Published migration notes documenting the IAPKit verification endpoint transition.
  • New Features

    • Added direct IAPKit link in documentation navigation for quick access.

hyochan and others added 4 commits April 19, 2026 17:57
Update the IAPKit provider endpoint from api.iapkit.com to
kit.openiap.dev. Request/response shape, bearer auth, and the
/v1/purchase/verify path are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Update the DEFAULT_IAPKIT_ENDPOINT from api.iapkit.com to
kit.openiap.dev. Request/response shape, bearer auth, and the
/v1/purchase/verify path are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Update IAPKIT_URL constant and all inline href/text references
- Add IAPKit nav button (top-right) linking to kit.openiap.dev
- Add "Verify Purchase with IAPKit" section to /docs/features/purchase
  with examples across TypeScript, Swift, Kotlin, KMP, Dart, GDScript
- Add 2026-04-19 release note documenting the host migration

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Update comments, env examples, and plugin JSDoc across
expo-iap, react-native-iap, flutter_inapp_purchase, and kmp-iap
so all "Get your API key from" pointers target kit.openiap.dev.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 19, 2026

Warning

Rate limit exceeded

@hyochan has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 32 minutes and 16 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 32 minutes and 16 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e4a0e7f9-d67f-465a-afd4-2dfc80902b35

📥 Commits

Reviewing files that changed from the base of the PR and between e94d8e5 and 5a135d6.

📒 Files selected for processing (3)
  • packages/docs/src/components/Navigation.tsx
  • packages/docs/src/pages/docs/features/purchase.tsx
  • packages/docs/src/styles/navigation.css
📝 Walkthrough

Walkthrough

The PR updates the IAPKit API endpoint migration from api.iapkit.com to kit.openiap.dev across environment examples, configuration files, plugin documentation, and source code endpoints for multiple libraries (Expo, Flutter, KMP, React Native, Apple, Google), alongside documentation updates and a new navigation link.

Changes

Cohort / File(s) Summary
Environment Examples
libraries/expo-iap/example/.env.example, libraries/flutter_inapp_purchase/example/env.example, libraries/kmp-iap/.env.example, libraries/kmp-iap/example/.env.example, libraries/react-native-iap/example-expo/.env.example, libraries/react-native-iap/example/.env.example
Updated documentation comments pointing API key sources from https://iapkit.com to https://kit.openiap.dev.
Configuration & Example Code
libraries/expo-iap/example/app.config.ts, libraries/react-native-iap/example-expo/app.config.ts, libraries/kmp-iap/example/composeApp/src/commonMain/kotlin/dev/hyo/martie/config/AppConfig.kt, libraries/kmp-iap/example/iosApp/Configuration/Secrets.xcconfig.example, libraries/flutter_inapp_purchase/example/lib/src/constants.dart
Updated inline documentation and comments in example configurations to reference the new IAPKit URL.
Plugin Documentation
libraries/expo-iap/plugin/src/withIAP.ts, libraries/react-native-iap/plugin/src/withIAP.ts
Updated JSDoc comments for iapkitApiKey options directing users to the new API key source URL.
Production Endpoints
packages/apple/Sources/OpenIapModule.swift, packages/google/openiap/src/main/java/dev/hyo/openiap/utils/PurchaseVerificationValidator.kt
Updated hardcoded IAPKit verification endpoints from https://api.iapkit.com/v1/purchase/verify to https://kit.openiap.dev/v1/purchase/verify.
Docs Configuration
packages/docs/src/lib/config.ts
Updated exported IAPKIT_URL constant from https://iapkit.com to https://kit.openiap.dev.
Documentation Pages
packages/docs/src/pages/docs/example.tsx, packages/docs/src/pages/docs/lifecycle/subscription.tsx, packages/docs/src/pages/docs/types/verification.tsx
Updated external hyperlinks to use the new IAPKit URL while preserving link structure and handlers.
Purchase Documentation
packages/docs/src/pages/docs/features/purchase.tsx
Added new "Verify Purchase with IAPKit" section documenting client-side verification flow via verifyPurchaseWithProvider, including endpoint details and API key configuration requirements.
Release Notes
packages/docs/src/pages/docs/updates/releases.tsx
Added new release note entry for April 19, 2026 documenting the IAPKit verification host migration with explicit old/new URL examples.
Navigation UI & Styling
packages/docs/src/components/Navigation.tsx, packages/docs/src/styles/navigation.css
Added new external "IAPKit" navigation link with trackIapKitClick analytics handler; introduced .iapkit-link CSS class with gradient styling, hover effects, and responsive behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

📖 documentation, 🕶️ meta

Poem

🐰 A hop, skip, and redirect,
From iapkit to the nest,
kit.openiap.dev—manifest!
Links updated, docs polished bright,
Our new home shines in the light! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: migrate IAPKit verification host to kit.openiap.dev' directly and clearly describes the primary change: updating the IAPKit verification endpoint from api.iapkit.com to kit.openiap.dev across multiple files.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/cross-platform-iapkit-host-migration

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.

@hyochan hyochan added cross-platform Cross-platform (both Android & iOS) expo-iap expo-iap library flutter_inapp_purchase flutter_inapp_purchase library kmp-iap kmp-iap library react-native-iap react-native-iap library 📖 documentation Improvements or additions to documentation 📱 iOS Related to iOS 🤖 android Related to android labels Apr 19, 2026
Copy link
Copy Markdown
Contributor

@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 migrates the IAPKit verification host from iapkit.com to kit.openiap.dev across the monorepo, updates documentation links, and introduces a new 'Verify Purchase with IAPKit' section with multi-language code examples. Feedback was provided to ensure the new IAPKit link is included in the mobile navigation for consistency. Additionally, several corrections were suggested for the code examples in the documentation to fix naming inconsistencies and property mismatches, ensuring they align with the SDK's actual type definitions and implementation details.

Comment thread packages/docs/src/components/Navigation.tsx
Comment thread packages/docs/src/pages/docs/features/purchase.tsx
Comment thread packages/docs/src/pages/docs/features/purchase.tsx Outdated
Comment thread packages/docs/src/pages/docs/features/purchase.tsx Outdated
Comment thread packages/docs/src/pages/docs/features/purchase.tsx Outdated
Comment thread packages/docs/src/pages/docs/features/purchase.tsx
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/docs/src/pages/docs/features/purchase.tsx`:
- Around line 693-709: Update the paragraph that mentions IAPKit and the phrase
"no server code required" (the copy referencing verifyPurchaseWithProvider and
the 'iapkit' provider) to qualify that while IAPKit handles purchase
verification for you, apps that manage user accounts or entitlements must still
perform grant decisions on a trusted server/backend; add a brief sentence after
the existing "no server code required" claim clarifying that server-side checks
or account-binding are recommended to enforce trust boundaries and prevent
client-side bypass.

In `@packages/docs/src/styles/navigation.css`:
- Around line 100-105: The CTA currently sets color: `#ffffff` over a gradient
background (background: linear-gradient(135deg, var(--primary-color),
var(--accent-color))) which fails WCAG AA; update the color property for the
IAPKit CTA selector in navigation.css from `#ffffff` to `#000000` so text uses black
(`#000000`) across the gradient endpoints, ensuring the contrast ratios meet WCAG
AA.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3420f8e1-983c-43fb-82ae-8acb29ea24b9

📥 Commits

Reviewing files that changed from the base of the PR and between 4c27954 and e94d8e5.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (23)
  • libraries/expo-iap/example/.env.example
  • libraries/expo-iap/example/app.config.ts
  • libraries/expo-iap/plugin/src/withIAP.ts
  • libraries/flutter_inapp_purchase/example/env.example
  • libraries/flutter_inapp_purchase/example/lib/src/constants.dart
  • libraries/kmp-iap/.env.example
  • libraries/kmp-iap/example/.env.example
  • libraries/kmp-iap/example/composeApp/src/commonMain/kotlin/dev/hyo/martie/config/AppConfig.kt
  • libraries/kmp-iap/example/iosApp/Configuration/Secrets.xcconfig.example
  • libraries/react-native-iap/example-expo/.env.example
  • libraries/react-native-iap/example-expo/app.config.ts
  • libraries/react-native-iap/example/.env.example
  • libraries/react-native-iap/plugin/src/withIAP.ts
  • packages/apple/Sources/OpenIapModule.swift
  • packages/docs/src/components/Navigation.tsx
  • packages/docs/src/lib/config.ts
  • packages/docs/src/pages/docs/example.tsx
  • packages/docs/src/pages/docs/features/purchase.tsx
  • packages/docs/src/pages/docs/lifecycle/subscription.tsx
  • packages/docs/src/pages/docs/types/verification.tsx
  • packages/docs/src/pages/docs/updates/releases.tsx
  • packages/docs/src/styles/navigation.css
  • packages/google/openiap/src/main/java/dev/hyo/openiap/utils/PurchaseVerificationValidator.kt

Comment thread packages/docs/src/pages/docs/features/purchase.tsx
Comment thread packages/docs/src/styles/navigation.css Outdated
- Navigation: mirror IAPKit link in mobile menu (gemini-code-assist)
- navigation.css: switch CTA text to #000000 for WCAG AA contrast
  over gradient (coderabbitai)
- purchase.tsx IAPKit section:
  - Soften "no server code required" to clarify that
    accounts/entitlements should still be granted from a trusted
    backend (coderabbitai)
  - Swift: rename type to RequestVerifyPurchaseWithIapkitAppleProps
    and use the "IAPKitAPIKey" Info.plist key that matches the
    Expo plugin output (gemini-code-assist)
  - Kotlin/KMP/Dart/GDScript: rename Apple/Google props types to
    ...AppleProps / ...GoogleProps to match
    types/verification.tsx (gemini-code-assist)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyochan hyochan merged commit cb0774a into main Apr 19, 2026
13 checks passed
@hyochan hyochan deleted the chore/cross-platform-iapkit-host-migration branch April 19, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 android Related to android cross-platform Cross-platform (both Android & iOS) 📖 documentation Improvements or additions to documentation expo-iap expo-iap library flutter_inapp_purchase flutter_inapp_purchase library 📱 iOS Related to iOS kmp-iap kmp-iap library react-native-iap react-native-iap library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant