Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

plaid-java Circle CI Maven Central

Java Bindings for the Plaid API ( This library is generated from the Plaid OpenAPI spec.

Plaid API is defined in the PlaidApi interface.

Check the Junit test classes for examples of more use cases. Every API endpoint has at least one integration test against the sandbox environment.

Uses Retrofit and OkHttp under the hood. You may want to take a look at those libraries if you need to do anything out of the ordinary.


Plaid-java is available at Maven Central



As of 9.0.0, the library is generated from the OpenAPI spec. Previous versions were written manually and should still mostly work. Here's a link to 8.5.0, the latest pre-generated version.

Each major version of plaid-java targets a specific version of the Plaid API:

API version plaid-java release
2020-09-14 (latest) 8.x.x, 9.x.x
2019-05-29 7.x.x
2018-05-22 4.x.x (and 3.x.x)
2017-03-08 2.x.x

For information about what has changed between versions and how to update your integration, head to the version changelog.

Basic Usage

private PlaidApi plaidClient;

HashMap<String, String> apiKeys = new HashMap<String, String>();
apiKeys.put("clientId", plaidClientId);
apiKeys.put("secret", plaidSecret);
apiClient = new ApiClient(apiKeys);
apiClient.setPlaidAdapter(ApiClient.Sandbox); // or equivalent, depending on which environment you're calling into
plaidClient = apiClient.createService(PlaidApi.class);

// Synchronously exchange a Link public_token for an API access_token
// Required request parameters are always Request object constructor arguments
ItemPublicTokenExchangeRequest request = new ItemPublicTokenExchangeRequest().publicToken("the_link_public_token");
Response<ItemPublicTokenExchangeResponse> response = plaidClient()

if (response.isSuccessful()) {
  accessToken = response.body().getAccessToken();

// Asynchronously do the same thing. Useful for potentially long-lived calls.
ItemPublicTokenExchangeRequest request = new ItemPublicTokenExchangeRequest().publicToken(publicToken);
    .enqueue(new Callback<ItemPublicTokenExchangeResponse>() {
        public void onResponse(Call<ItemPublicTokenExchangeResponse> call, Response<ItemPublicTokenExchangeResponse> response) {
          if (response.isSuccessful()) {
            accessToken = response.body.getAccessToken();

        public void onFailure(Call<ItemPublicTokenExchangeResponse> call, Throwable t) {
          // handle the failure as needed

// Decoding an unsuccessful response
try {
  Gson gson = new Gson();
  Error error = gson.fromJson(response.errorBody().string(), Error.class);
} catch (Exception e) {
  throw new Exception(
      "Failed converting from API Response Error Body to Error %f",

Legacy API

If you're looking for a Java client that works with the legacy Plaid API, use versions of plaid-java before 2.1.0. The API and client are not backwards-compatible.


Java bindings for Plaid




No packages published