# Billing Services

Essential Kit's Billing Services feature lets Unity teams monetize mobile games with in-app purchases without maintaining platform-specific code. This tutorial walks you through setup, key APIs, testing, and troubleshooting so you can add consumables, non-consumables, and subscriptions with confidence.

{% hint style="info" %}
Using PlayMaker? See the PlayMaker guide: [PlayMaker](/features/billing-services/playmaker.md).
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=s1r2wpeIxjU>" %}
Billing Services Video Tutorial
{% endembed %}

{% hint style="info" %}
Looking for a working reference? Open the demo scene at `Assets/Plugins/VoxelBusters/EssentialKit/Examples/Scenes/BillingServicesDemo.unity` and the companion script at `Assets/Plugins/VoxelBusters/EssentialKit/Examples/Scripts/BillingServicesDemo.cs` to see the full API in action.
{% endhint %}

## What You'll Learn

* Configure products in Essential Kit Settings and platform stores (App Store Connect, Google Play Console)
* Initialize the store connection and retrieve localized product pricing
* Purchase products and handle transaction states (success, failure, deferred, restored)
* Restore purchases for non-consumables and subscriptions
* Finish transactions and manage pending purchases (advanced server verification)

## Why Billing Services Matters

* **Revenue Generation**: Primary monetization driver for mobile games with secure, native purchase flows
* **Cross-Platform Consistency**: Single API works across iOS App Store and Google Play Store
* **Security Built-In**: Local receipt verification on iOS (StoreKit2), optional server verification for Android
* **App Store Compliance**: Automatic platform setup with restore functionality required by Apple guidelines

## Tutorial Roadmap

1. [Setup](/features/billing-services/setup.md) - Configure products in Essential Kit Settings and platform stores
2. [Usage](/features/billing-services/usage.md) - Initialize store, purchase products, restore purchases, handle transactions
3. [Testing](/features/billing-services/testing.md) - Test with sandbox accounts and validate on devices
4. [FAQ](/features/billing-services/faq.md) - Troubleshoot common purchase and configuration issues

## Key Use Cases

### Sell Virtual Goods

Use consumable products to sell in-game items like coins, gems, lives, or power-ups that players can purchase repeatedly. Offer multiple value tiers ($0.99, $4.99, $9.99) to maximize revenue across different player segments.

### Premium Upgrades

Sell permanent features with non-consumable products like ad removal, character unlocks, or premium level packs. Once purchased, these items are owned forever and automatically restored across devices.

### Subscriptions

Implement VIP memberships, battle passes, or season passes with recurring billing. Offer flexible durations (weekly, monthly, yearly) with introductory offers and free trials to increase conversion.

### Multi-Currency Systems

Support multiple virtual currencies (coins, gems, tickets) using payout definitions. A single purchase can grant multiple currency types for complex economy systems.

### Remove Ads

Offer an ad-free experience with a non-consumable product. Use `IsProductPurchased()` to check ownership status and hide ads permanently for paying users.

## Prerequisites

* Unity project with Essential Kit v3 installed and Billing Services feature included in the build
* **iOS**: App Store Connect account with products configured and banking information complete
* **Android**: Google Play Console account with products configured and app uploaded for testing
* Test device or sandbox accounts to validate purchases before release

{% content-ref url="/pages/-MJr4SfrvIe3EJE4W95X" %}
[Setup](/features/billing-services/setup.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MJr4XnUAj\_-S1CZ3S-q" %}
[Usage](/features/billing-services/usage.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MJr4Zke9RPtM1EDjEzo" %}
[Testing](/features/billing-services/testing.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MJr4cPTiFGrMCCTPDNt" %}
[FAQ](/features/billing-services/faq.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://assetstore.essentialkit.voxelbusters.com/features/billing-services.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
