This guide explains the fundamental concepts of Iaptic and how they work together.
Overview
Iaptic is a unified in-app purchase validation and subscription management service that works across multiple platforms:
- Apple App Store
- Google Play Store
- Microsoft Store
- Braintree
- Stripe
Key Concepts
Purchases
- For consumable and non-consumable purchases, a purchase is a single transaction in your app.
- For subscriptions, a purchase is the subscription itself (which can include multiple transactions). In general, the status of the purchase is defined by the status of the most recent transaction.
Each purchase has:
- A unique purchase identifier
- A transaction identifier (which is the last transaction in the purchase)
- A product identifier
- A purchase date
For subscriptions, the purchase date is the start date of the subscription. Subscription purchases also contain a lastRenewalDate, which is the date of the most recent renewal, and a expirationDate, which is the date the subscription will expire.
See API doc for Purchase for more details.
Entitlements
Entitlements are the permissions granted to a customer for a given purchase. They should be used to unlock content, features, or services in your app.
A list of customers entitled to a purchase is associated with the purchase, in the entitledUsers
field. When a purchase is updated, a webhook is sent to your server for each customer currently or previously entitled to the purchase.
For more details, see:
Receipts
A receipt is a platform-specific proof of purchase. Iaptic validates the receipts sent by your app using platform APIs to:
- Verify authenticity of the purchases
- Extract up-to-date information about the purchase(s) it contains
- Track subscription status
- Maintain a collection of purchases for a given customer
Apple receipts contain information about all purchases for a given customer. These receipt is refered to as the application receipt. Other platforms typically provide one receipt per purchase.
Webhooks
Webhooks are how Iaptic notifies your server about:
- New purchases
- Subscription renewals
- Status changes and other events (cancellation, expiration, refunds, etc.)
Use them to keep your server in sync (update subscription status, unlock content, deliver virtual goods, etc.)
See Webhook Reference for more details.
Events
Events are records of everything that happens in your app:
- Receipt validations
- Webhook deliveries
- Server notifications sent by the platforms
Data Flow
graph LR
A[Mobile App] -->|Receipt| B[Iaptic]
B -->|Validation| C[Store API]
F[Store Server] -->|Notification| B
C -->|Response| B
B -->|Webhook| D[Your Server]
B -->|Events| E[Dashboard]
Next Steps
Need help? Contact our support team.