AI Assistants
kmp-iap provides AI-optimized documentation designed to work seamlessly with modern coding assistants like Cursor, GitHub Copilot, Claude, and ChatGPT.
AI-Optimized Documentation
| File | Description | Lines | Best For |
|---|---|---|---|
| llms.txt | Quick reference | ~300 | Fast lookups, basic implementation |
| llms-full.txt | Complete API reference | ~1000 | Complex implementations, troubleshooting |
Adding to Cursor
- Open Cursor Settings (
Cmd/Ctrl + ,) - Navigate to Features → Docs
- Click Add new doc
- Enter the URL:
https://hyochan.github.io/kmp-iap/llms.txt - Name it "kmp-iap"
- Click Confirm
Now you can reference kmp-iap documentation in Cursor by typing @kmp-iap in your prompts.
Using with GitHub Copilot
Reference the documentation directly in Copilot Chat:
@workspace Using the documentation at https://hyochan.github.io/kmp-iap/llms.txt,
help me implement in-app purchases with kmp-iap
Or for more detailed help:
@workspace Based on https://hyochan.github.io/kmp-iap/llms-full.txt,
show me how to handle subscription upgrades
Using with Claude / ChatGPT
Option 1: Include URL in Prompt
Using the kmp-iap documentation at https://hyochan.github.io/kmp-iap/llms-full.txt,
help me implement a purchase flow with server-side validation using IAPKit.
Option 2: Paste Documentation Content
- Open llms.txt or llms-full.txt
- Copy the content
- Paste into your conversation with context about your task
Direct URL Access
Access the documentation files directly:
- Quick Reference: https://hyochan.github.io/kmp-iap/llms.txt
- Full Reference: https://hyochan.github.io/kmp-iap/llms-full.txt
What's Included
Quick Reference (llms.txt)
- Project overview and installation
- Quick start guide with both usage patterns
- Core API reference (connection, products, purchases)
- Key type definitions
- Event listeners setup
- Common patterns and examples
- Error handling basics
- Platform requirements
Full Reference (llms-full.txt)
Everything in the quick reference, plus:
- Complete installation options (Gradle, Version Catalog)
- Detailed connection management
- All product loading methods
- Complete purchase operations with all options
- Transaction management (iOS & Android specific)
- Subscription management with all properties
- Purchase verification (native & IAPKit)
- All event listeners with examples
- Complete iOS-specific APIs
- Complete Android-specific APIs
- Alternative billing setup (Android)
- Billing programs API (Google Play 8.2.0+)
- Complete type definitions (all fields)
- Full error codes reference with descriptions
- Complete implementation patterns
- Troubleshooting guide
- Platform setup requirements
Example Prompts
Here are some example prompts to get the most out of kmp-iap with AI assistants:
Basic Implementation
Using kmp-iap documentation, create a basic IAPManager class that:
1. Initializes the store connection
2. Loads products
3. Handles purchases
4. Finishes transactions after validation
Subscription Handling
Using kmp-iap's llms-full.txt documentation, show me how to:
1. Check if a user has an active subscription
2. Handle subscription upgrades on Android
3. Check expiration dates on iOS
Error Handling
Based on kmp-iap error codes, implement comprehensive error handling
for purchases including retry logic for network errors.
Purchase Verification
Using kmp-iap with IAPKit verification, implement a secure purchase
flow that validates purchases before granting entitlements.
Alternative Billing (Android)
Implement Android alternative billing flow using kmp-iap, including:
1. Checking availability
2. Showing required dialog
3. Creating reporting token
4. Error handling
Platform-Specific Features
Show me all iOS-specific APIs available in kmp-iap, including
refund requests, promotional offers, and external purchase links.
Tips for Better Results
-
Be specific about the platform - Mention if you need iOS-specific, Android-specific, or cross-platform code
-
Reference the correct doc - Use
llms.txtfor quick answers,llms-full.txtfor detailed implementations -
Include context - Mention your Kotlin version, target platforms, and any specific requirements
-
Ask about OpenIAP - kmp-iap follows the OpenIAP specification, so asking about OpenIAP patterns works well
-
Request complete examples - Ask for full code examples including error handling and edge cases
Feedback
If you have suggestions for improving the AI documentation:
- Open an issue on GitHub
- Join the discussion at OpenIAP Discussions
See Also
- Core Methods - Complete API documentation
- Types - All type definitions
- Error Codes - Error handling reference
- OpenIAP Specification - Cross-platform IAP standard
