Repository navigation
feat: sync with the API spec (card metadata, SCR, merchants, category rules, pix-qr, boletos) - #183
Merged
Merged
Conversation
…ime to creditCardMetadata The API returns three more credit card metadata fields for Open Finance connectors. transactionDateTime is passed through as the institution sends it, so it is typed Date | string: the JSON reviver only turns the exact YYYY-MM-DDTHH:mm:ss.sssZ shape into a Date.
Member
Author
|
@cursor review this |
… boletos, model fields)
Adds the fields the API returns that the types were missing, plus
fetchItemScr (opt-in, SCR feature required), fetchMerchants, category
rules (list/create/delete), createPixQrPaymentRequest,
fetchSmartTransferPreauthorizationPayments and the beta boleto
endpoints. Mutation requests now accept any 2xx: DELETE
/categories/rules/{id} answers 204, which was treated as a failure.
This was referenced Oct 5, 2026
FranDisalvo90
approved these changes
Oct 5, 2026
cernadasjuan
approved these changes
Oct 5, 2026
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))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the three credit card metadata fields the API now returns for Open Finance connectors:
paymentType'SINGLE' | 'INSTALLMENT'billPostDatestring | null(YYYY-MM-DD)nullwhile not posted yettransactionDateTimeDate | stringAlso exports
CREDIT_CARD_ACCOUNT_PAYMENT_TYPES/CreditCardAccountPaymentType, following the existing fee-type pattern.Why
Date | stringfortransactionDateTimeThe value is passed through as the institution sends it.
deserializeJSONWithDatesonly revives the exactYYYY-MM-DDTHH:mm:ss.sssZshape, so a value with an offset or without milliseconds stays a string. Typing itDatewould lie for those.billPostDateis date-only and never matches the reviver, so it is always a string and cannot shift by timezone.None of the three is retroactive: transactions synced before the fields existed don't carry the key.
Also: sync with the API spec
Fields the API returns that the types were missing:
Connector.productCoverageCreditData.additionalCards(newAdditionalCard)TransactionPaymentData.authenticationCodeTransaction.orderInvestment:couponPayment(newInvestmentCouponPayment),gracePeriodDate,priceFactor,taxExemptNew methods:
PluggyClient.fetchItemScr(itemId, { from, to })→GET /items/{id}/scr. Opt-in: requires the SCR feature (403SCR_FEATURE_NOT_ENABLEDotherwise) and only works for Open Finance items with a known CPF/CNPJ (422SCR_ITEM_NOT_SUPPORTED).PluggyClient.fetchMerchants(cnpjs)→GET /merchantsPluggyClient.fetchCategoryRules(),createCategoryRule(rule),deleteCategoryRule(id)→/categories/rulesPluggyPaymentsClient.createPixQrPaymentRequest(payload)→POST /payments/requests/pix-qrPluggyPaymentsClient.fetchSmartTransferPreauthorizationPayments(id, filters)→GET /smart-transfers/preauthorizations/{id}/paymentscreateBoletoConnection,createBoletoConnectionFromItem,createBoleto,fetchBoleto,cancelBoletoBug fix in
baseApi: mutation requests (POST/PUT/PATCH/DELETE) only accepted status200, so any201/204was rejected withundefined. They now accept any 2xx, likecreateGetRequestalready did.DELETE /categories/rules/{id}answers204, which is how this surfaced; the test for it fails without the change.Note
Stack: this PR → #184 → #185. Merge in that order.
Tests
New unit test in
tests/transactions.test.tscovering bothtransactionDateTimeshapes,billPostDateas string andnull, andpaymentType. Plus new suites for SCR (incl. the 403), merchants, category rules (incl. the 204 delete), boletos, pix-qr and preauthorization payments.pnpm test: 76/76.