Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
106 changes: 106 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,111 @@
See full changelog for the OpenAPI schema (OAS) [here](https://github.com/plaid/plaid-openapi/blob/master/CHANGELOG.md).

# 42.0.0
- Updating to OAS 2020-09-14_1.705.4

## Breaking changes in this version
- [BREAKING] For `/cra/check_report/create`, replace `CraCheckReportCashflowInsightsGetOptions`, `CraCheckReportIncomeInsightsGetOptions`, `CraCheckReportLendScoreGetOptions`, `CraCheckReportNetworkInsightsGetOptions`, and `CraCheckReportVerificationGetEmploymentRefreshOptions` with the corresponding `CraCheckReportCreate*Options` types. The old types remain available for the deprecated `/get` options, and request JSON is unchanged. (OAS 2020-09-14_1.700.0)
- [BREAKING] Use `ProductsTerminateReasonCode` for `ItemProductsTerminateRequest.reasonCode` and `UserProductsTerminateRequest.reasonCode`; the endpoint-specific wrapper classes were removed. Accepted wire values are unchanged. (OAS 2020-09-14_1.701.1)
- [BREAKING] `FDXInitiatorFiAttribute.value`, its getter, and its setter now use `String` instead of `FDXPartyType`. For example, replace `.value(FDXPartyType.DATA_PROVIDER)` with `.value(FDXPartyType.DATA_PROVIDER.getValue())`. This schema is not referenced by an endpoint. (OAS 2020-09-14_1.703.0)
- [BREAKING] `StudentRepaymentPlan.INTEREST_ONLY` now serializes as `"interest only"` instead of `"interest-only"`, matching the value returned by the API. The Java enum constant is unchanged. (OAS 2020-09-14_1.699.1)

## OpenAPI Schema Changes
### 2020-09-14_1.705.4
- Expose `/cra/report/get` and its request/response schemas in generated client libraries. The endpoint remains hidden from public documentation.

### 2020-09-14_1.705.3
- Document the `ip_address` field on the `/identity_verification/create` `user` object: accepted only here (not via `/link/token/create`) and captured automatically by the Link SDK, for backend-only integrations that need IP-based risk checks.

### 2020-09-14_1.705.2
- Clarified the `/oauth/token` response `token_type` description (it is `Bearer` for OAuth access tokens); dropped the inaccurate "always Bearer" wording.

### 2020-09-14_1.705.1
- internal changes only

### 2020-09-14_1.705.0
- Type the `product` field of the `CraReportUpdatedWebhook` (`CRA_REPORT`/`CRA_REPORT_UPDATED`) `successful_products`/`failed_products` entries against the `Products` enum instead of a free-form string, matching the sibling `/cra/report/get` product schemas.

### 2020-09-14_1.704.2
- internal changes only

### 2020-09-14_1.704.1
- internal changes only

### 2020-09-14_1.704.0
- internal changes only

### 2020-09-14_1.703.0
- Add the `environment` field to the `LinkEventsWebhook` (`LINK`/`EVENTS`) schema, matching actual behavior.
- Change `FDXInitiatorFiAttribute.value` from the `FDXPartyType` enum to a string, matching the sibling `FDXFiAttribute` (this schema is not referenced by any endpoint).
- Fixed a `TransactionsRuleDetails.query` description that referenced a nonexistent `NAME` field (the enum value is `MERCHANT_NAME`), and a `/cra/encompass/get_reports` example whose `report_status` was not a valid value and whose `generated_at` key should be `created_at`.
- Fixed additional example/consistency issues: `/transactions/get` and `/processor/transactions/get` examples now report the correct `total_transactions`; the Identity Verification `Strategy` note references the `watchlist_screening` step; the `US_SDN` watchlist code label is consistent; `SelfieCapture` examples reflect that only one of `image_url`/`video_url` is populated; the `/institutions/get_by_id` example nests `liabilities` correctly; the `/oauth/token` scope description calls `urn:plaid:params:oauth:user-token` a subject token type; and a `/cra/encompass/load/existing` example was corrected to match its schema.

### 2020-09-14_1.702.4
- Add `hide_gse_details` to `/cra/check_report/verification/pdf/get`. When `true`, the GSE identifiers (the Report ID and `gse_reference_id`) are omitted from the returned Home Lending Report PDF. Defaults to `false`. These identifiers are always present in the `/cra/check_report/verification/get` JSON response regardless of this field.

### 2020-09-14_1.702.3
- Add the `error`, `repairable_items`, and `failed_products` fields to the `CHECK_REPORT_FAILED` and `USER_CHECK_REPORT_FAILED` webhooks.

### 2020-09-14_1.702.2
- Add `tax_lots` to the `/investments/holdings/get` sample response, showing both a holding with per-lot detail and a holding with an empty `tax_lots` array.

### 2020-09-14_1.702.1
- Update descriptions for the CRA `/get` endpoints.

### 2020-09-14_1.702.0
- Add `timestamp` to `/protect/compute` responses to indicate when the Trust Index score and fraud attributes were computed.

### 2020-09-14_1.701.4
- Add `ip_address` (optional, nullable) to the `user` object (`IdentityVerificationCreateRequestUser`) on `/identity_verification/create`. Lets backend-only integrations supply the end user's IP address for IP-based risk checks without launching the Link SDK.

### 2020-09-14_1.701.3
- Add `exclusion_code` to the `CraPartnerInsightsUltraFicoScoreResult` object, exposing the FICO exclusion code that explains why an UltraFICO® score could not be computed due to consumer-data conditions (e.g. insufficient account history).

### 2020-09-14_1.701.2
- Add private-visibility `error`, `repairable_items`, and `failed_products` to the `CHECK_REPORT_FAILED` and `USER_CHECK_REPORT_FAILED` webhooks.

### 2020-09-14_1.701.1
- Add the nullable `receiver_details` field to the `BankTransferEvent` schema returned by `/bank_transfer/event/list` and `/bank_transfer/event/sync`, matching what the API already emits. Currently always `null`.
- [Breaking] Change the generated `reason_code` type for `/item/products/terminate` and `/user/products/terminate` from the unusable `ItemProductsTerminateReasonCode` and `UserProductsTerminateReasonCode` wrapper types to `ProductsTerminateReasonCode`. The accepted JSON values are unchanged.
- Make `home_lending_report_options` visible in the docs for `/cra/check_report/create` and `/link/token/create`.

### 2020-09-14_1.701.0
- Add `figi` to the `Security` schema: the 12-character OpenFIGI identifier, which stays stable across most corporate actions (ticker/CUSIP/name changes) and is the preferred identifier for tracking a security across its lifecycle. Null until Plaid has enriched the security with FIGI data.

### 2020-09-14_1.700.1
- Add the `/sandbox/fdx/consent/seed` endpoint for seeding a test FDX consent grant on Sandbox data partner accounts. Takes `customer_id` and `application_id` (and an optional `consent_id`) and returns the seeded `consent_id`.

### 2020-09-14_1.700.0
- [Breaking] Rename the `/cra/check_report/create` request options schemas for `cashflow_insights`, `lend_score`, `network_insights`, `income_insights`, and the Home Lending Report's `employment_refresh_options` to `CraCheckReportCreate*Options`. The JSON request is unchanged.
- Deprecate the request-time generation config on the CRA `/get` endpoints (`options`, `partner_insights`, `employment_refresh_options`); no longer accepted for new clients (created on or after 2026-07-01).

### 2020-09-14_1.699.6
- Add `cash advance`, `late fee`, `membership fee`, `returned item fee` to the `transaction_code` enum.

### 2020-09-14_1.699.5
- Add `num_i20s_uploaded` to the `document_income_results` object in the `/credit/sessions/get` and `/link/token/get` responses

### 2020-09-14_1.699.4
- Add private-visibility scaffolding for the `CRA_REPORT_UPDATED` webhook (`CRA_REPORT` type), fired when a subscribed CRA report is updated; lists the `successful_products` and `failed_products` for the update. Hidden from the public spec/docs until launch (customer-facing entry follows when `x-private-visibility` flips).

### 2020-09-14_1.699.3
- Add `kick` to the `processor` enum on `/processor/token/create`, for creating processor tokens for the Kick integration.

### 2020-09-14_1.699.2
- Adds `DOCUMENT_TYPE_US_STUDENT_I20` enum value (Form I-20 student document) for document metadata
- Add `/fdx/consents`, `/fdx/consents/{consentId}`, and `/fdx/consents/{consentId}/revocation` for managing FDX consent grants. These endpoints remain hidden from public documentation.

### 2020-09-14_1.699.1
- Additions and corrections of enum values returned by API but not mentioned in OpenAPI spec. No actual changes to API behavior.
- `PlaidErrorType`: add 13 error types (`ASSETS_ERROR`, `ENRICH_ERROR`, `STATEMENTS_ERROR`, `RECURRING_TRANSACTIONS_ERROR`, `CRA_MONITORING_ERROR`, `CREDIT_PROFILE_REPORT_ERROR`, `ENCOMPASS_ERROR`, `FRAUD_INSIGHTS_ERROR`, `FREDDIE_MAC_ERROR`, `LINK_DELIVERY_ERROR`, `PROFILE_ERROR`, `TRANSFER_RECURRING_ERROR`, `TRANSFER_REFUND_ERROR`
- Asset Report `warning_code`: add the 5 `BANK_INCOME_INSIGHTS_*` codes
- watchlist `source`: add `retro` enum value
- `TransferNetwork`: add `rfp` enum value (request for payment; closed beta, debit-only)
- `StudentRepaymentPlan.type`: `interest-only` → `interest only` (match the emitted value)

### 2020-09-14_1.699.0
- Add support for the Form I-20 US immigration student document on `/credit/payroll_income/get`. This form now returns an `i20` array which extraction data on uploaded I-20 documents.

# 41.0.0
- Updating to OAS 2020-09-14_1.698.7

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.plaid</groupId>
<artifactId>plaid-java</artifactId>
<version>41.0.0-SNAPSHOT</version>
<version>42.0.0-SNAPSHOT</version>

<parent>
<groupId>org.sonatype.oss</groupId>
Expand Down
118 changes: 117 additions & 1 deletion src/main/java/com/plaid/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@
import okhttp3.ResponseBody;
import okhttp3.Request;
import okhttp3.Response;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
import retrofit2.Converter;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.converter.scalars.ScalarsConverterFactory;
import com.plaid.client.auth.HttpBasicAuth;
import com.plaid.client.auth.HttpBearerAuth;
import com.plaid.client.auth.ApiKeyAuth;
import com.plaid.client.auth.OAuth;
import com.plaid.client.auth.OAuth.AccessTokenListener;
import com.plaid.client.auth.OAuthFlow;

import java.io.IOException;
import java.lang.annotation.Annotation;
Expand Down Expand Up @@ -49,7 +54,7 @@ public ApiClient() {
public Response intercept(Chain chain) throws IOException {
Request originalRequest = chain.request();
Request requestWithUserAgent = originalRequest.newBuilder()
.header("User-Agent", "Plaid Java v41.0.0")
.header("User-Agent", "Plaid Java v42.0.0")
.header("Plaid-Version", "2020-09-14")
.build();
return chain.proceed(requestWithUserAgent);
Expand All @@ -70,6 +75,9 @@ public ApiClient(String[] authNames) {
if ("clientId".equals(authName)) {

auth = new ApiKeyAuth("header", "PLAID-CLIENT-ID");
} else if ("oauth2".equals(authName)) {

auth = new OAuth(OAuthFlow.application, "", "https://api.plaid.com/oauth2/apiv2/token", "cra:report:read, user:write");
} else if ("plaidVersion".equals(authName)) {

auth = new ApiKeyAuth("header", "Plaid-Version");
Expand All @@ -96,6 +104,9 @@ public ApiClient(Map<String, String> apiKeys) {
ApiKeyAuth apiKeyAuth = new ApiKeyAuth("header", "PLAID-CLIENT-ID");
apiKeyAuth.setApiKey(apiKeys.get(authName));
auth = (Interceptor) apiKeyAuth;
} else if ("oauth2".equals(authName)) {

auth = new OAuth(OAuthFlow.application, "", "https://api.plaid.com/oauth2/apiv2/token", "cra:report:read, user:write");
} else if ("plaidVersion".equals(authName)) {

ApiKeyAuth apiKeyAuth = new ApiKeyAuth("header", "Plaid-Version");
Expand Down Expand Up @@ -143,6 +154,23 @@ public ApiClient(String authName, String username, String password) {
this.setCredentials(username, password);
}

/**
* Helper constructor for single password oauth2
* @param authName Authentication name
* @param clientId Client ID
* @param secret Client Secret
* @param username Username
* @param password Password
*/
public ApiClient(String authName, String clientId, String secret, String username, String password) {
this(authName);
this.getTokenEndPoint()
.setClientId(clientId)
.setClientSecret(secret)
.setUsername(username)
.setPassword(password);
}

public void createDefaultAdapter() {
json = new JSON();

Expand Down Expand Up @@ -256,10 +284,98 @@ public ApiClient setCredentials(String username, String password) {
basicAuth.setCredentials(username, password);
return this;
}
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth.getTokenRequestBuilder().setUsername(username).setPassword(password);
return this;
}
}
return this;
}

/**
* Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one)
* @return Token request builder
*/
public TokenRequestBuilder getTokenEndPoint() {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
return oauth.getTokenRequestBuilder();
}
}
return null;
}

/**
* Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one)
* @return Authentication request builder
*/
public AuthenticationRequestBuilder getAuthorizationEndPoint() {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
return oauth.getAuthenticationRequestBuilder();
}
}
return null;
}

/**
* Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one)
* @param accessToken Access token
* @return ApiClient
*/
public ApiClient setAccessToken(String accessToken) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth.setAccessToken(accessToken);
return this;
}
}
return this;
}

/**
* Helper method to configure the oauth accessCode/implicit flow parameters
* @param clientId Client ID
* @param clientSecret Client secret
* @param redirectURI Redirect URI
* @return ApiClient
*/
public ApiClient configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth.getTokenRequestBuilder()
.setClientId(clientId)
.setClientSecret(clientSecret)
.setRedirectURI(redirectURI);
oauth.getAuthenticationRequestBuilder()
.setClientId(clientId)
.setRedirectURI(redirectURI);
return this;
}
}
return this;
}

/**
* Configures a listener which is notified when a new access token is received.
* @param accessTokenListener Access token listener
* @return ApiClient
*/
public ApiClient registerAccessTokenListener(AccessTokenListener accessTokenListener) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth.registerAccessTokenListener(accessTokenListener);
return this;
}
}
return this;
}

/**
* Adds an authorization to be used by the client
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/plaid/client/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.698.7
* The version of the OpenAPI document: 2020-09-14_1.705.4
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/plaid/client/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.698.7
* The version of the OpenAPI document: 2020-09-14_1.705.4
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand All @@ -16,7 +16,7 @@
import java.util.Collection;
import java.util.Iterator;

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-25T19:00:45.518774Z[Etc/UTC]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-07-22T17:01:43.955778Z[Etc/UTC]")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
Expand Down
Loading