4 min read

Getting Started with Iaptic

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

  1. Choose your platform (Apple, Google, ...)
  2. follow the appropriate Setup Guide

Step 2: Client Integration

  1. Choose your Client Library:
  2. Follow the integration guide for your chosen library

Step 3: Server Integration (optional)

The simplest integration method is to set up an endpoint on your server to receive updates via webhook calls.

For more complex setups, use our REST API to fetch detailed insights about your customers, purchases, transactions, and statistics.

Implementation Flow

Here's how Iaptic typically integrates into your purchase flow:

sequenceDiagram
    participant Your App
    participant Plugin/SDK
    participant Iaptic
    participant Server

    rect rgb(255, 255, 255)
      Note over Your App: App Launch
      Your App->>Plugin/SDK: Initialize()
      Plugin/SDK-->>Your App: Active and pending purchases
      Plugin/SDK->>Iaptic: Verify receipt
      Iaptic-->>Your App: Success
      Your App->>Plugin/SDK: Acknowledge purchases
      Iaptic->>Server: Webhook (RECEIPT_VALIDATED)
      Note over Server: Update user's purchases
      Server->>Your App: Notify of updated entitlements
    end

    rect rgb(255, 255, 255)
      Note over Your App: New Purchase
      Your App->>Plugin/SDK: Buy()
      Plugin/SDK-->>Your App: New purchase
      Plugin/SDK->>Iaptic: Verify receipt
      Iaptic-->>Your App: Success
      Iaptic->>Server: Webhook (RECEIPT_VALIDATED)
      Your App->>Plugin/SDK: Acknowledge purchase
      Iaptic->>Server: Webhook (PURCHASED)
    end

Key Implementation Points

  1. Initialize Early: Process purchases when your app starts
  2. Verify All Purchases: Both existing and new purchases require verification
  3. Handle Errors: Implement robust error logging and recovery flows
  4. Acknowledge Purchases: Always acknowledge purchases after successful verification
  5. Monitor Webhooks: Keep your server in sync using webhook notifications

Next Steps

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