This guide will walk you through the process of integrating Iaptic into your application.
Prerequisites
Before you begin, make sure you have:
- An Iaptic account
- Your application set up in the relevant app stores
- Development environment ready for your platform
Step 1: Platform Setup
Choose your platform and follow the appropriate setup guide:
- Apple App Store Setup Guide
- Google Play Store Setup Guide
- Web (Stripe) Setup
- Braintree Setup
- Windows Store Setup
Step 2: Client Integration
-
Choose your client library:
- Swift Library for iOS/macOS
- Cordova Plugin for Cordova/Ionic
- Direct API Integration for other platforms
-
Follow the integration guide for your chosen library
Server Integration
The simplest integration method is to set up an endpoint on your server to receive updates via webhook.
For more complex setups, our REST API provides detailed insights about your customers, purchases, transactions, and statistics.
How to get started?
Open an account and setup your app - we will guide you through the required steps.
Implementation Flow
Here's how Iaptic typically integrates into your purchase flow:
sequenceDiagram
participant App
participant Plugin/SDK
participant Iaptic
participant Server
rect rgb(255, 255, 255)
Note over App: App Launch
App->>Plugin/SDK: Initialize()
Plugin/SDK-->>App: Active and pending purchases
App->>Iaptic: Verify receipt
Iaptic-->>App: Success
App->>Plugin/SDK: Acknowledge purchases
Iaptic->>Server: Webhook (RECEIPT_VALIDATED)
Note over Server: Update user's purchases
Server->>App: Notify of updated entitlements
end
rect rgb(255, 255, 255)
Note over App: New Purchase
App->>Plugin/SDK: Buy()
Plugin/SDK-->>App: New purchase
App->>Iaptic: Verify receipt
Iaptic-->>App: Success
Iaptic->>Server: Webhook (RECEIPT_VALIDATED)
App->>Plugin/SDK: Acknowledge purchase
Iaptic->>Server: Webhook (PURCHASED)
end
Key Implementation Points
- Initialize Early: Process purchases when your app starts
- Verify All Purchases: Both existing and new purchases require verification
- Handle Errors: Implement robust error logging and recovery flows
- Acknowledge Purchases: Always call
finish()
after successful verification - Monitor Webhooks: Keep your server in sync using webhook notifications
Step 3: Server Integration
- Set up webhook endpoints to receive purchase updates
- Implement purchase validation using our REST API
Step 4: Testing
- Test the integration using sandbox/test accounts
- Verify webhook reception
- Validate purchase flow
Next Steps
- Review the Architecture Overview
- Learn about Subscription Lifecycle
- Explore advanced features in our How-To Guides
timeline
Setup
: Create Iaptic account
: Configure platform settings
: Set up webhook endpoints
Integration
: Add client library
: Implement purchase flow
: Test sandbox purchases
Launch
: Verify production setup
: Monitor transactions
: Track analytics