Skip to content

feat: add new Open Finance credit card fields#172

Merged
cernadasjuan merged 1 commit into
masterfrom
feat/of-credit-card-fields
Jun 16, 2026
Merged

feat: add new Open Finance credit card fields#172
cernadasjuan merged 1 commit into
masterfrom
feat/of-credit-card-fields

Conversation

@cernadasjuan

Copy link
Copy Markdown
Contributor

Summary

Pluggy's API now returns additional Open Finance credit-card fields. This PR models them in the SDK types so consumers can read them. All new fields are optional and additive.

CreditData (src/types/account.ts):

  • brandAdditionalInfo?: string — free text specifying the brand category when brand is OTHER.
  • disaggregatedCreditLimits?: DisaggregatedCreditLimit[] — detailed credit-limit breakdown (was already part of the API but unmodeled in the SDK).

New DisaggregatedCreditLimit type (src/types/account.ts):

  • Full type modeled to match the API shape, plus the new fields:
    • limitAmountReason?: string
    • customizedLimitAmount?: number
    • customizedLimitAmountCurrencyCode?: CurrencyCode
    • lineName?: CreditCardLimitLineName (typed via the new union instead of a plain string)

CreditCardMetadata (src/types/transaction.ts):

  • feeType?: CreditCardAccountFeeType
  • feeTypeAdditionalInfo?: string
  • otherCreditsType?: CreditCardAccountOtherCreditType
  • otherCreditsAdditionalInfo?: string

New enums / unions (following the existing as const + typeof[number] idiom):

  • CreditCardLimitLineName: CREDITO_A_VISTA, CREDITO_PARCELADO, SAQUE_CREDITO_BRASIL, SAQUE_CREDITO_EXTERIOR, EMPRESTIMO_CARTAO_CONSIGNADO, OUTROS
  • CreditCardAccountFeeType: ANNUAL_FEE, ATM_WITHDRAWAL_DOMESTIC, ATM_WITHDRAWAL_INTERNATIONAL, EMERGENCY_CREDIT_EVALUATION, CARD_REISSUE, BILL_PAYMENT_FEE, SMS, OTHER
  • CreditCardAccountOtherCreditType: REVOLVING_CREDIT, BILL_INSTALLMENT, LOAN, OTHER

Test plan

  • pnpm install --frozen-lockfile — OK
  • pnpm build (tsc -p tsconfig.build.json) — passes; new fields/enums emitted to dist/types/*.d.ts
  • pnpm test — 12 suites / 54 tests pass
  • pnpm exec eslint src/types/account.ts src/types/transaction.ts — clean

🤖 Generated with Claude Code

Pluggy's backend added new Open Finance credit-card fields to the
canonical types, and the Pluggy API now returns them in credit-card
responses. Model them in the SDK so consumers can read them.

- CreditData: add `brandAdditionalInfo` and `disaggregatedCreditLimits`.
- New `DisaggregatedCreditLimit` type (previously unmodeled in the SDK,
  though already part of the API), including the new `limitAmountReason`,
  `customizedLimitAmount`, `customizedLimitAmountCurrencyCode` fields and
  a typed `lineName` (new `CreditCardLimitLineName` union).
- CreditCardMetadata: add `feeType`, `feeTypeAdditionalInfo`,
  `otherCreditsType`, `otherCreditsAdditionalInfo`, backed by the new
  `CreditCardAccountFeeType` and `CreditCardAccountOtherCreditType` unions.

All new fields are optional. Enums follow the existing `as const` +
`typeof[number]` idiom used by the other credit-card types.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cernadasjuan

Copy link
Copy Markdown
Contributor Author

@claude review this

@jhonatan-pluggy jhonatan-pluggy left a comment

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.

LGTM

@cernadasjuan cernadasjuan merged commit 3339194 into master Jun 16, 2026
1 of 2 checks passed
@cernadasjuan cernadasjuan deleted the feat/of-credit-card-fields branch June 16, 2026 18:14
pluggy-github-app Bot pushed a commit that referenced this pull request Jun 16, 2026
# [0.89.0](v0.88.0...v0.89.0) (2026-06-16)

### Features

* add new Open Finance credit card fields ([#172](#172)) ([3339194](3339194))
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