The integration method outlined below is deprecated. Learn more about upgrading to the Braintree SDKs.


There are a couple of ways to use the Android client encryption library.

Jar file

Download encryption-2.0.0.jar
SHA1: 864740734e9806aae1914d461600a4cb88ee5331

Android library project (SDK r6 or higher)


This assumes you are using Eclipse as your development IDE.

  1. Clone the source code on github.
  2. Import the Braintree Android library project into your Eclipse workspace.
  3. Go to your project’s properties.
  4. Under Android, Library section, add the Braintree Android library project.

Source code

github | tgz | zip

Integration examples

github | tgz | zip


If you run into a bug, contact us or create an issue on the GitHub issue tracker.

Quick start example

import com.braintreegateway.encryption.Braintree;

public class BraintreeExample {
  public static void main(String[] args) {
    Braintree braintree = new Braintree("your-client-side-encryption-key");
    String encryptedCreditCardNumber = braintree.encrypt("4111111111111111");
    String encryptedCvv = braintree.encrypt("111");
    String encryptedExpirationDate = braintree.encrypt("01/2014");