Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
Cross-platform in-app purchase plugin following the OpenIAP specification.Features:• Unified API for iOS (StoreKit 2) and Android (Google Play Billing 8+)• Type-safe GDScript API with auto-generated types• Supports consumables, non-consumables, and subscriptions• OpenIAP standard compliance for consistent behavior across platforms
godot-iap
About
This is an In-App Purchase plugin for Godot Engine, built following the OpenIAP specification. This project has been inspired by expo-iap, flutter_inapp_purchase, kmp-iap, and react-native-iap.
We are trying to share the same experience of in-app purchase in Godot Engine as in other cross-platform frameworks. Native code is powered by openiap-apple and openiap-google modules.
We will keep working on it as time goes by just like we did in other IAP libraries.
Documentation
Visit the documentation site for installation guides, API reference, and examples:
hyochan.github.io/godot-iap
Installation
- Download
godot-iap-{version}.zipfrom GitHub Releases - Extract and copy
addons/godot-iap/to your project'saddons/folder - Enable the plugin in Project → Project Settings → Plugins
See the Installation Guide for more details.
Quick Start
extends Node
# Load OpenIAP types for type-safe API
const Types = preload("res://addons/godot-iap/types.gd")
func _ready():
# Connect signals
GodotIapPlugin.purchase_updated.connect(_on_purchase_updated)
GodotIapPlugin.purchase_error.connect(_on_purchase_error)
# Initialize connection
if GodotIapPlugin.init_connection():
_fetch_products()
func _fetch_products():
# Create typed ProductRequest
var request = Types.ProductRequest.new()
request.skus = ["coins_100", "premium"]
request.type = Types.ProductQueryType.ALL
# Returns Array of typed products (Types.ProductAndroid or Types.ProductIOS)
var products = GodotIapPlugin.fetch_products(request)
for product in products:
# Access typed properties directly
print("Product: ", product.id, " - ", product.display_price)
func _on_purchase_updated(purchase: Dictionary):
if purchase.get("purchaseState") == "Purchased":
# Finish transaction with typed PurchaseInput
var purchase_input = Types.PurchaseInput.from_dict(purchase)
GodotIapPlugin.finish_transaction(purchase_input, true) # true = consumable
func _on_purchase_error(error: Dictionary):
print("Error: ", error.get("code"), " - ", error.get("message"))
func buy(product_id: String):
# Create typed RequestPurchaseProps
var props = Types.RequestPurchaseProps.new()
props.request = Types.RequestPurchasePropsByPlatforms.new()
props.request.google = Types.RequestPurchaseAndroidProps.new()
props.request.google.skus = [product_id]
props.request.apple = Types.RequestPurchaseIosProps.new()
props.request.apple.sku = product_id
props.type = Types.ProductQueryType.IN_APP
# Returns typed purchase object or null
var purchase = GodotIapPlugin.request_purchase(props)
License
MIT License - see LICENSE file for details.
Cross-platform in-app purchase plugin following the OpenIAP specification.
Features:
• Unified API for iOS (StoreKit 2) and Android (Google Play Billing 8+)
• Type-safe GDScript API with auto-generated types
• Supports consumables, non-consumables, and subscriptions
• OpenIAP standard compliance for consistent behavior across platforms
Reviews
Quick Information
Cross-platform in-app purchase plugin following the OpenIAP specification.Features:• Unified API for iOS (StoreKit 2) and Android (Google Play Billing 8+)• Type-safe GDScript API with auto-generated types• Supports consumables, non-consumables, and subscriptions• OpenIAP standard compliance for consistent behavior across platforms