{"id":17653852,"url":"https://github.com/hyochan/react-native-iap","last_synced_at":"2026-04-02T14:23:01.696Z","repository":{"id":37766817,"uuid":"107826162","full_name":"hyochan/react-native-iap","owner":"hyochan","description":"In App Purchase module for React Native that confirms OpenIAP","archived":false,"fork":false,"pushed_at":"2026-03-25T22:31:39.000Z","size":216128,"stargazers_count":3217,"open_issues_count":12,"forks_count":695,"subscribers_count":34,"default_branch":"main","last_synced_at":"2026-03-26T10:48:10.434Z","etag":null,"topics":["amazon","android","appstore","billing","iap","in-app-purchase","ios","openiap","playstore","react-native","react-native-iap"],"latest_commit_sha":null,"homepage":"https://hyochan.github.io/react-native-iap","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyochan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"buy_me_a_coffee":"hyochan"}},"created_at":"2017-10-22T00:31:20.000Z","updated_at":"2026-03-26T01:35:38.000Z","dependencies_parsed_at":"2023-02-16T21:45:42.309Z","dependency_job_id":"5bdc104c-1c56-4757-a254-6c83fcd5e83f","html_url":"https://github.com/hyochan/react-native-iap","commit_stats":{"total_commits":1673,"total_committers":243,"mean_commits":6.88477366255144,"dds":0.6150627615062761,"last_synced_commit":"e67f19bd4e8852fc3e9f3cdcaa260e7671c61912"},"previous_names":["dooboolab/react-native-iap","hyochan/react-native-iap","dooboolab-community/react-native-iap"],"tags_count":323,"template":false,"template_full_name":null,"purl":"pkg:github/hyochan/react-native-iap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyochan%2Freact-native-iap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyochan%2Freact-native-iap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyochan%2Freact-native-iap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyochan%2Freact-native-iap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyochan","download_url":"https://codeload.github.com/hyochan/react-native-iap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyochan%2Freact-native-iap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31307845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon","android","appstore","billing","iap","in-app-purchase","ios","openiap","playstore","react-native","react-native-iap"],"created_at":"2024-10-23T12:02:28.202Z","updated_at":"2026-04-02T14:23:01.687Z","avatar_url":"https://github.com/hyochan.png","language":"TypeScript","funding_links":["https://buymeacoffee.com/hyochan","https://opencollective.com/react-native-iap","https://www.buymeacoffee.com/hyochan"],"categories":["TypeScript"],"sub_categories":[],"readme":"# React Native IAP\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://hyochan.github.io/react-native-iap/img/icon.png\" alt=\"React Native IAP Logo\" width=\"150\" /\u003e\n  \n[![Version](http://img.shields.io/npm/v/react-native-iap.svg?style=flat-square)](https://npmjs.org/package/react-native-iap)\n[![Download](http://img.shields.io/npm/dm/react-native-iap.svg?style=flat-square)](https://npmjs.org/package/react-native-iap)\n[![OpenIAP](https://img.shields.io/badge/OpenIAP-Compliant-green?style=flat-square)](https://openiap.dev)\n[![Backers and Sponsors](https://img.shields.io/opencollective/all/react-native-iap.svg)](https://opencollective.com/react-native-iap)\n[![CI - Test](https://github.com/hyochan/react-native-iap/actions/workflows/ci-test.yml/badge.svg)](https://github.com/hyochan/react-native-iap/actions/workflows/ci-test.yml)\n[![codecov](https://codecov.io/gh/hyochan/react-native-iap/graph/badge.svg?token=KSYo4rC6cU)](https://codecov.io/gh/hyochan/react-native-iap)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fhyochan%2Freact-native-iap.svg?type=shield\u0026issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Fhyochan%2Freact-native-iap?ref=badge_shield\u0026issueType=license)\n  \n  **React Native IAP** is a high-performance in-app purchase library using Nitro Modules that **conforms to the [Open IAP specification](https://openiap.dev)**. It provides a unified API for handling in-app purchases across iOS and Android platforms with comprehensive error handling and modern TypeScript support.\n  \n  \u003ca href=\"https://openiap.dev\"\u003e\u003cimg src=\"https://github.com/hyodotdev/openiap/blob/main/logo.png\" alt=\"Open IAP\" height=\"40\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## 🎨 Promotion\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://hyodotdev.github.io/kstyled\"\u003e\n    \u003cimg src=\"https://hyodotdev.github.io/kstyled/img/logo.png\" alt=\"kstyled Logo\" width=\"120\" /\u003e\n  \u003c/a\u003e\n\n**Compile-time CSS-in-JS for React Native**\n\n✨ Banishing runtime overhead, one style at a time with **[kstyled](https://hyodotdev.github.io/kstyled)** - fully type-safe styling that compiles away.\n\n🚀 **[Explore kstyled →](https://hyodotdev.github.io/kstyled)**\n\n\u003c/div\u003e\n\n## 📚 Documentation\n\n**[📖 Visit our comprehensive documentation site →](https://hyochan.github.io/react-native-iap)**\n\n## ⚠️ Notice\n\n**Starting from version 14.0.0**, this library uses [Nitro Modules](https://github.com/mrousavy/nitro) for high-performance native bridge implementation. You must install `react-native-nitro-modules` alongside `react-native-iap`.\n\n### Compatibility (Nitro 14.x)\n\n- `react-native-iap@14.x` (Nitro) requires **React Native 0.79+**.\n- Stuck on **RN 0.75.x or lower**? Use the last pre‑Nitro version: `npm i react-native-iap@13.1.0`.\n- Seeing Swift 6 C++ interop errors in Nitro (e.g., `AnyMap.swift` with `cppPart.pointee.*`)? Temporarily pin Swift to **5.10** for the `NitroModules` pod (see Installation docs) or upgrade RN and Nitro deps.\n- Recommended: upgrade to RN 0.79+, update `react-native-nitro-modules`/`nitro-codegen`, then `pod install` and clean build.\n\nMore details and the Podfile snippet are in the docs: https://hyochan.github.io/react-native-iap/docs/installation#ios\n\n## ✨ Features\n\n- 🔄 **Cross-platform Support**: Works seamlessly on both iOS and Android\n- ⚡ **Nitro Modules**: High-performance native bridge with minimal overhead\n- 🎯 **TypeScript First**: Full TypeScript support with comprehensive type definitions\n- 🛡️ **Centralized Error Handling**: Unified error management with platform-specific error code mapping\n- 🎣 **React Hooks**: Modern React hooks API with `useIAP`\n- 📱 **Expo Compatible**: Works with Expo development builds\n- 🔍 **Receipt Validation**: Built-in receipt validation for both platforms\n- 💎 **Products \u0026 Subscriptions**: Support for both one-time purchases and subscriptions\n- 🚀 **Performance Optimized**: Efficient caching and minimal re-renders\n\n## 🚀 Quick Start\n\n```bash\nnpm install react-native-iap react-native-nitro-modules\n# or\nyarn add react-native-iap react-native-nitro-modules\n```\n\n**[📖 See the complete installation guide and quick start tutorial →](https://hyochan.github.io/react-native-iap/docs/installation)**\n\n## 🏗️ Architecture\n\nReact Native IAP is built with a modern architecture that emphasizes:\n\n- **Nitro Modules**: High-performance native bridge with C++ core and platform-specific implementations\n- **Type Safety**: Comprehensive TypeScript definitions for all APIs\n- **Error Resilience**: Centralized error handling with meaningful error codes\n- **Platform Abstraction**: Unified API that handles platform differences internally\n- **Performance**: Optimized for minimal bundle size and runtime performance\n\n## 📱 Platform Support\n\n| Platform          | Support | Notes                                   |\n| ----------------- | ------- | --------------------------------------- |\n| iOS               | ✅      | StoreKit 2 (requires iOS 15+)           |\n| Android           | ✅      | Google Play Billing v8.0.0+             |\n| Expo Go           | ❌      | Not supported (requires native modules) |\n| Expo Dev Client   | ✅      | Full support                            |\n| Bare React Native | ✅      | Full support                            |\n\n## 📦 Installation \u0026 Configuration\n\n### Prerequisites\n\nBefore installing React Native IAP, make sure you have:\n\n- React Native 0.64 or later, or Expo SDK 45 or later\n- Node.js 16 or later\n- iOS 15+ for iOS apps (StoreKit 2 requirement)\n- Android API level 21+ for Android apps\n\n### Post Installation\n\n#### Android Configuration\n\n**Kotlin Version Requirement:** This library requires Kotlin 2.0+. Configure your project's Kotlin version:\n\nIn your root `android/build.gradle`:\n\n```gradle\nbuildscript {\n    ext {\n        kotlinVersion = \"2.1.20\"\n    }\n    dependencies {\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion\"\n    }\n}\n```\n\n#### iOS Configuration\n\n1. **Install pods**:\n\n   ```bash\n   cd ios \u0026\u0026 pod install\n   ```\n\n2. **Add StoreKit capability** to your iOS app in Xcode:\n   - Open your project in Xcode\n   - Select your app target\n   - Go to \"Signing \u0026 Capabilities\"\n   - Click \"+ Capability\" and add \"In-App Purchase\"\n\n#### Expo Configuration\n\nFor Expo projects, add the plugin to your `app.json` or `expo.json`:\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\n      \"react-native-iap\",\n      [\n        \"expo-build-properties\",\n        {\n          \"android\": {\n            \"kotlinVersion\": \"2.2.0\"\n          }\n        }\n      ]\n    ]\n  }\n}\n```\n\n**Note:** Expo projects require [development build (dev-client)](https://docs.expo.dev/develop/development-builds/introduction/) as this library contains native code.\n\n### Store Configuration\n\nReact Native IAP is **OpenIAP compliant**. For detailed store configuration:\n\n- **[iOS Setup →](https://www.openiap.dev/docs/ios-setup)** - App Store Connect configuration\n- **[Android Setup →](https://www.openiap.dev/docs/android-setup)** - Google Play Console configuration\n\n## 🤖 Using with AI Assistants\n\nReact Native IAP provides AI-friendly documentation for Cursor, GitHub Copilot, Claude, and ChatGPT.\n\n**[📖 AI Assistants Guide →](https://hyochan.github.io/react-native-iap/docs/guides/ai-assistants)**\n\nQuick links:\n\n- [llms.txt](https://hyochan.github.io/react-native-iap/llms.txt) - Quick reference\n- [llms-full.txt](https://hyochan.github.io/react-native-iap/llms-full.txt) - Full API reference\n\n## 🎯 What's Next?\n\n**[📖 Visit our comprehensive documentation site →](https://hyochan.github.io/react-native-iap)**\n\n### Key Resources\n\n- **[Installation \u0026 Quick Start](https://hyochan.github.io/react-native-iap/docs/installation)** - Get started in minutes\n- **[API Reference](https://hyochan.github.io/react-native-iap/docs/api)** - Complete useIAP hook documentation\n- **[Examples](https://hyochan.github.io/react-native-iap/docs/examples/basic-store)** - Production-ready implementations\n- **[Error Handling](https://hyochan.github.io/react-native-iap/docs/api/error-codes)** - OpenIAP compliant error codes\n- **[Troubleshooting](https://hyochan.github.io/react-native-iap/docs/guides/troubleshooting)** - Common issues and solutions\n\n## Powered by OpenIAP\n\n\u003ca href=\"https://openiap.dev\"\u003e\u003cimg src=\"https://github.com/hyodotdev/openiap/blob/main/logo.png\" alt=\"OpenIAP\" height=\"50\" /\u003e\u003c/a\u003e\n\nReact Native IAP conforms to the **[OpenIAP specification](https://openiap.dev)** — an open, vendor-neutral interoperability standard for in-app purchases. OpenIAP provides:\n\n- **Shared specification** — Common types, error codes, and purchase flows across all platforms\n- **Generated type-safe bindings** — Swift, Kotlin, Dart, and GDScript from a single GraphQL schema\n- **Platform implementations** — [openiap-apple](https://github.com/hyodotdev/openiap/tree/main/packages/apple) (StoreKit 2) and [openiap-google](https://github.com/hyodotdev/openiap/tree/main/packages/google) (Play Billing 8.x)\n- **Verification profiles** — Standardized receipt validation and purchase verification patterns\n\nOther libraries built on OpenIAP: [expo-iap](https://github.com/hyochan/expo-iap) · [flutter_inapp_purchase](https://github.com/hyochan/flutter_inapp_purchase) · [kmp-iap](https://github.com/hyochan/kmp-iap) · [godot-iap](https://github.com/hyochan/godot-iap)\n\n**[Learn more about the OpenIAP standard →](https://openiap.dev/docs/foundation/about)**\n\n## Sponsors\n\n💼 **[View Our Sponsors](https://openiap.dev/sponsors)**\n\n### \u003cp style=\"color: rgb(255, 182, 193);\"\u003eAngel\u003c/p\u003e\n\n\u003ca href=\"https://meta.com\"\u003e\n    \u003cimg width=\"600\" alt=\"courier_dot_com\" src=\"https://static.xx.fbcdn.net/rsrc.php/y3/r/y6QsbGgc866.svg\" /\u003e\n\u003c/a\u003e\n\n## Past Supporters\n\n\u003cdiv style=\"display: flex; align-items:center; gap: 10px;\"\u003e\n  \u003ca href=\"https://namiml.com\" style=\"opacity: 50%\"\u003e\n    \u003cimg src=\"https://github.com/hyochan/react-native-iap/assets/27461460/89d71f61-bb73-400a-83bd-fe0f96eb726e\" alt=\"Nami ML\" width=\"140\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.courier.com/?utm_source=react-native-iap\u0026utm_campaign=osssponsors\" style=\"opacity: 50%;\"\u003e\n    \u003cimg width=\"80\" alt=\"courier_dot_com\" src=\"https://github.com/user-attachments/assets/319d8966-6839-498d-8ead-ce8cc72c3bca\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [Buy me a coffee](https://www.buymeacoffee.com/hyochan).\n\n---\n\n### OpenCollective Sponsorship\n\nWe also manage sponsorships through OpenCollective, which operates separately from our main sponsor program.\n\n**Sponsors:** \u003ca href=\"https://opencollective.com/react-native-iap#sponsors\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/react-native-iap/sponsors.svg?width=890\" /\u003e\u003c/a\u003e\n\n**Backers:** \u003ca href=\"https://opencollective.com/react-native-iap#backers\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/react-native-iap/backers.svg?width=890\" /\u003e\u003c/a\u003e\n\n[Become a sponsor](https://opencollective.com/react-native-iap#sponsor) | [Become a backer](https://opencollective.com/react-native-iap#backer)\n\n## Contributing\n\n\u003ca href=\"graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/react-native-iap/contributors.svg?width=890\" /\u003e\u003c/a\u003e\n\nSee our [Contributing Guide](./CONTRIBUTING.md) for development setup and guidelines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyochan%2Freact-native-iap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyochan%2Freact-native-iap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyochan%2Freact-native-iap/lists"}