Skip to content

feat: Smart Transfer source account balance and data consent - #186

Merged
cernadasjuan merged 1 commit into
masterfrom
feat/smart-transfer-source-account-balance
Oct 8, 2026
Merged

cernadasjuan merged 1 commit into
masterfrom
feat/smart-transfer-source-account-balance

Conversation

@cernadasjuan

Copy link
Copy Markdown
Contributor

What

Smart Transfer preauthorizations can now ask, in the same approval, for permission to read the source account balance.

  • CreateSmartTransferPreauthorization.linkedJourney?: boolean asks for that permission.
  • SmartTransferPreauthorization.dataConsent: { status, rejectionReason, updatedAt }, or null when it was not requested. Statuses: AWAITING_AUTHORISATION, AUTHORISED, REJECTED.
  • fetchSmartTransferPreauthorizationBalance(id): GET /smart-transfers/preauthorizations/{id}/balance. Returns { balance, overdraft } in BRL; overdraft is { contracted, used, available }, or null when the institution does not share it.
  • cancelSmartTransferPreauthorizationDataConsent(id): DELETE /smart-transfers/preauthorizations/{id}/data-consent. Cancels only the permission; the preauthorization stays active.

Tests

tests/payments/smartTransfers.test.ts (nock): balance with and without overdraft, data consent cancel, and the existing Smart Transfer calls. pnpm test: 90/90. pnpm build OK.

…nt balance

- linkedJourney on CreateSmartTransferPreauthorization and dataConsent on SmartTransferPreauthorization
- fetchSmartTransferPreauthorizationBalance: balance and overdraft (null when the institution does not share it)
- cancelSmartTransferPreauthorizationDataConsent

@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 c77e1c3 into master Oct 8, 2026
1 of 2 checks passed
@cernadasjuan
cernadasjuan deleted the feat/smart-transfer-source-account-balance branch October 8, 2026 20:29
pluggy-github-app Bot pushed a commit that referenced this pull request Oct 8, 2026
# [0.92.0](v0.91.0...v0.92.0) (2026-10-08)

### Bug Fixes

* **api:** URL-encode query string values ([#184](#184)) ([16f0596](16f0596))
* **deps:** patch handlebars, http-cache-semantics and brace-expansion advisories ([#187](#187)) ([0ef8d00](0ef8d00))

### Features

* add Smart Transfer linkedJourney, data consent and source account balance ([#186](#186)) ([c77e1c3](c77e1c3))
* **item:** add fetchItemsCursor and fetchAllItems for GET /v2/items ([#185](#185)) ([7a82811](7a82811))
* sync with the API spec (card metadata, SCR, merchants, category rules, pix-qr, boletos) ([#183](#183)) ([d0f0c86](d0f0c86))
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