# Installation
URL: /docs/a2a/installation

Add the PlusPay A2A package to a Flutter, Kotlin, Java or React Native project.

The A2A integration requires the **POS+ application** to be installed on the
same Android device. Your app and POS+ communicate locally; no network call is
made by the A2A package itself.

<Callout type="warn">
  Android only. Minimum supported Android version is **API 24 (Android 7.0)**.
</Callout>

## Add the dependency

<CodeBlockTabs defaultValue="flutter" groupId="pp-platform" persist>
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="flutter">
      Flutter
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="kotlin">
      Kotlin
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="java">
      Java
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="react-native">
      React Native
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="flutter">
    ```bash
    flutter pub add pluspay_a2a
    ```

    or add it to `pubspec.yaml` manually:

    ```yaml title="pubspec.yaml"
    dependencies:
      pluspay_a2a: ^0.8.0
    ```

    <Callout type="info">
      PlusPay A2A is published on pub.dev. See the available versions and the
      changelog at [pub.dev/packages/pluspay_a2a](https://pub.dev/packages/pluspay_a2a).
    </Callout>

    Then fetch packages:

    ```bash
    flutter pub get
    ```
  </CodeBlockTab>

  <CodeBlockTab value="kotlin">
    Copy `pluspay_a2a-debug.aar` into your module's `libs/` folder and declare it:

    ```kotlin title="app/build.gradle.kts"
    dependencies {
        implementation(files("libs/pluspay_a2a-debug.aar"))
    }
    ```

    <Callout type="info">
      Download the latest `pluspay_a2a-debug.aar` from
      [github.com/plus-pay-tr/pluspay_a2a_aar/tags](https://github.com/plus-pay-tr/pluspay_a2a_aar/tags).
    </Callout>
  </CodeBlockTab>

  <CodeBlockTab value="java">
    Copy `pluspay_a2a-debug.aar` into your module's `libs/` folder and declare it:

    ```groovy title="app/build.gradle"
    dependencies {
        implementation files('libs/pluspay_a2a-debug.aar')
    }
    ```

    <Callout type="info">
      Download the latest `pluspay_a2a-debug.aar` from
      [github.com/plus-pay-tr/pluspay_a2a_aar/tags](https://github.com/plus-pay-tr/pluspay_a2a_aar/tags).
    </Callout>
  </CodeBlockTab>

  <CodeBlockTab value="react-native">
    Install from npm (autolinking handles the rest):

    ```sh
    npm install pluspay-a2a-react-native
    # or: yarn add pluspay-a2a-react-native
    ```

    <Callout type="info">
      The latest version is **0.4.0**. See the available versions at
      [npmjs.com/package/pluspay-a2a-react-native](https://www.npmjs.com/package/pluspay-a2a-react-native).
    </Callout>
  </CodeBlockTab>
</CodeBlockTabs>

## Project requirements

<CodeBlockTabs defaultValue="flutter" groupId="pp-platform" persist>
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="flutter">
      Flutter
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="kotlin">
      Kotlin
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="java">
      Java
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="react-native">
      React Native
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="flutter">
    The plugin is Android-only and registers itself automatically — you don't add
    anything to your `pubspec.yaml` for platform setup. The only requirement is
    that your app's `minSdkVersion` is **24** or higher:

    ```groovy title="android/app/build.gradle"
    android {
        defaultConfig {
            minSdkVersion 24
        }
    }
    ```
  </CodeBlockTab>

  <CodeBlockTab value="kotlin">
    ```kotlin title="app/build.gradle.kts"
    android {
        defaultConfig {
            minSdk = 24
        }
    }
    ```

    The `.aar` bundles its own ProGuard rules; no extra keep rules are required.
  </CodeBlockTab>

  <CodeBlockTab value="java">
    ```groovy title="app/build.gradle"
    android {
        defaultConfig {
            minSdkVersion 24
        }
    }
    ```

    The `.aar` bundles its own ProGuard rules; no extra keep rules are required.
  </CodeBlockTab>

  <CodeBlockTab value="react-native">
    The module is Android-only and autolinks. Ensure the host app's `minSdkVersion` is **24** or higher:

    ```groovy title="android/app/build.gradle"
    android {
        defaultConfig {
            minSdkVersion 24
        }
    }
    ```
  </CodeBlockTab>
</CodeBlockTabs>

## Import

<CodeBlockTabs defaultValue="flutter" groupId="pp-platform" persist>
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="flutter">
      Flutter
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="kotlin">
      Kotlin
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="java">
      Java
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="react-native">
      React Native
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="flutter">
    ```dart
    import 'package:pluspay_a2a/pluspay_a2a.dart';
    ```
  </CodeBlockTab>

  <CodeBlockTab value="kotlin">
    ```kotlin
    import com.pluspay.pluspay_a2a.client.PPA2AClient
    import com.pluspay.pluspay_a2a.callback.PPA2ACallback
    import com.pluspay.pluspay_a2a.exception.PlusPayException
    ```
  </CodeBlockTab>

  <CodeBlockTab value="java">
    ```java
    import com.pluspay.pluspay_a2a.client.PPA2AClient;
    import com.pluspay.pluspay_a2a.callback.PPA2ACallback;
    import com.pluspay.pluspay_a2a.exception.PlusPayException;
    ```
  </CodeBlockTab>

  <CodeBlockTab value="react-native">
    ```ts
    import {
      PPA2AClient,
      PPA2AException,
      PPStartPaymentRequestModel,
    } from 'pluspay_a2a_react_native';
    ```
  </CodeBlockTab>
</CodeBlockTabs>

Continue to [Initialization](/docs/a2a/initialization).