Skip to content

DEV-131471 SDKs - add plaid data points#211

Open
bernardodemelo wants to merge 4 commits into
masterfrom
DEV-131471-jdk
Open

DEV-131471 SDKs - add plaid data points#211
bernardodemelo wants to merge 4 commits into
masterfrom
DEV-131471-jdk

Conversation

@bernardodemelo
Copy link
Copy Markdown
Contributor

@bernardodemelo bernardodemelo commented May 20, 2026

📌 Related Issues: DEV-131471

✅ Type of Change

  • 🚀 Feature

📝 Problem Statement

Merchants using the Java SDK have no way to send Plaid bank account data points to Riskified as part of payment details.

📝 Solution Overview

Extended BankWirePaymentDetails with the following optional fields:

Field Type JSON key
daysSinceAccountOpening int days_since_account_opening
daysWithNegativeBalanceCount int days_with_negative_balance_count
isSavingsOrMoneyMarketAccount boolean is_savings_or_money_market_account
nsfOverdraftTransactionsCount int nsf_overdraft_transactions_count
unauthorizedTransactionsCount int unauthorized_transactions_count
plaidScores PlaidScores plaid_scores

Two new model classes were added to support the nested Plaid scores structure:

  • PlaidScores — holds customerInitiatedReturnRisk and bankInitiatedReturnRisk
  • InitiatedReturnRisk — holds score and riskTier

Serialization is handled automatically by Gson's LOWER_CASE_WITH_UNDERSCORES policy — no annotations required. All new fields are optional and do not affect existing validation logic.

🚨 Risks & Considerations

  • All new fields are non-mandatory, so existing integrations are fully backwards compatible.
  • Primitive fields (int, boolean) default to 0 / false if not set — Gson will serialize them even when unset. Merchants should only populate fields they have data for.

🔍 Additional Notes

  • .gitignore was also cleaned up: reorganised into labelled sections, duplicated patterns removed, and .metals/ added to prevent Metals LSP artefacts from appearing in PRs.

@bernardodemelo bernardodemelo requested a review from a team as a code owner May 20, 2026 12:59
}

@Test
public void testBankWirePlaidScoresGetterAndSetter() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we need this test

}

@Test
public void testBankWirePlaidScoresSerializeWithCorrectStructure() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge this with testBankWirePlaidScalarFieldsSerializeWithCorrectKeys above. I don't think we need 2 separate ones since all of BankWire details includes both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants