Install the In-App Payments SDK

Link to section

1. Add the In-App Payments SDK dependency

  1. Add the Square SDK public repository in the build.gradle file for your project.

    repositories { google() maven { url '' } }
  2. Add a compile option to support Java version 1.8 in the build.gradle file for your :app module.

    android { ... compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } ... }
  3. Add the In-App Payments SDK dependency to the module build.gradle file.

    dependencies { implementation "" }
  4. Update the file in the solution application folder to apply rules to In-App Payment SDK classes.

    -keep class sqip.** { *; }
Link to section

2. Configure the In-App Payments SDK

To configure the In-App Payments SDK, you must set the Square application ID for your application in AndroidManifest.xml. Open the AndroidManifest.xml file for your application Gradle module and add the following XML to set the application ID.


To test an application in the Square Sandbox, set the Developer Dashboard to Sandbox Settings mode before completing the following instructions in this step:

  • Copy your application ID from the Credentials page.

    <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="" xmlns:tools=""> <application ...> <meta-data android:name="sqip.SQUARE_APPLICATION_ID" android:value="REPLACE_WITH_YOUR_SQUARE_APPLICATION_ID"/> </application> </manifest>
Link to section

3. Set application permissions

If AndroidManifest.xml does not already have application permissions set, add the following two permissions:

<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Link to section

See also

Now that the In-App Payments SDK is installed, follow one of these build guides to add it to your mobile application: