Skip to content

v4.6.0

Latest

Choose a tag to compare

@janpaepke janpaepke released this 30 Jun 14:34

This release reconciles the SDK's types and JSDoc with Mollie's current API spec across nearly every resource, adds three new pieces of API coverage (Invoices, Terminal pairing codes, single-route GET), enables non-Node.js server runtimes, and begins deprecating the Orders API. All changes are additive and non-breaking at runtime; a few type-level adjustments are noted at the end.

New APIs

  • Add Invoices API support — invoices.get/page/iterate, an invoice.getPdfUrl() helper, and the InvoiceStatus enum (#506)
  • Add terminal pairing codes — terminalPairingCodes.create/get/page/iterate/revoke and a terminalPairingCode.getProfile() helper (#508)
  • Complete Routes API coverage — paymentRoutes.get(id, { paymentId }) and a route.getPayment() helper (#511)

Runtime & compatibility

  • Run on non-Node.js server runtimes — Bun, Deno, and Cloudflare Workers — by replacing the Node-only process.release.name guard with a browser-only check; the CI matrix now runs the test suite and a packaged-tarball smoke-check under Bun and Deno (#490)
  • Add a dangerouslyAllowBrowser client option to opt out of the browser block for trusted, short-lived tokens (#490)
  • Cloudflare Workers requires nodejs_compat and a compatibility date ≥ 2025-08-15; on Deno, use the named import import { createMollieClient } from '@mollie/api-client'. Full edge-isolate support without node compat is planned for 5.0 (#490)

Enhancements

  • Add a parameterDefaults option for OAuth clients to auto-fill testmode/profileId on every request that accepts them (#517)
  • Add storeCredentials to payment- and order-create for saved-card mandates (#480)
  • Declare testmode/profileId on the remaining endpoints that accept them (#514, #503)
  • Add profileId to the Apple Pay payment-session request (#512)
  • Add legalEntity, registrationOffice, and incorporationDate to the Create client link endpoint (#495)
  • Add metadata to connect balance transfers (#492)

Type & documentation sync

Reconciled with the current API spec — additive or JSDoc-only unless noted:

  • Payments — new getSettlement/getCustomer/getMandate/getSubscription/getTerminal/getMobileAppCheckoutUrl helpers and new request params (#510); plus the additional/consume voucher line categories and expanded PaymentRoutingInfo fields (#516)
  • Refunds — mode, externalReference, routing reversals, and an embed param (#484)
  • Settlements — balanceId, invoiceId, the SettlementStatus enum, and a getInvoice() helper (#509)
  • Subscriptions — a getMandate() helper and the profileId list param (#504)
  • Profiles — description, countriesOfActivity, and a getDashboardUrl() helper (#505)
  • Organizations — the email field, a getDashboardUrl() helper, and testmode on get (#502)
  • Methods — the googlepay method, en_GB/fr_LU/de_LU locales, and a sequenceType param (#488)
  • Chargebacks — the settlementId field and testmode params (#487)
  • Payment links — lines, billingAddress, and shippingAddress on update (#501)
  • Onboarding — businessCategory and a british vatRegulation (#500)
  • Terminals — the mode and updatedAt response fields (#507)
  • Capabilities, OAuth tokens, Customers — JSDoc and reference-link refreshes (#494, #496, #498)

Fixes

  • Captures now embed their payment via the embed query parameter instead of the silently-ignored include; the old include/CaptureInclude remain as deprecated aliases (#483)

Deprecations

  • The Orders API is deprecated — every Orders binder/method now carries @deprecated; migrate to the Payments API (#486)
  • Payments — the legacy Klarna methods (klarnapaylater/klarnapaynow/klarnasliceit, use klarna), payconiq, and settlementAmount (removal announced 2027-01-01) (#516)
  • Onboarding — submit/SubmitParameters (use Client Links) and numeric categoryCode (use businessCategory) (#500)
  • Captures — include/CaptureInclude in favour of embed/CaptureEmbed (#483)
  • Callback-as-second-argument on terminals.get, profiles.get, paymentLinks.delete, permissions.get, and organizations.get (#514)

Internal

  • Update dev dependencies and re-resolve form-data to clear a CRLF-injection advisory; extend CI to Node 22/24 (#482)
  • Automate npm publishing via GitHub Actions Trusted Publishing (OIDC) with provenance (#485)

Notes for upgraders

Type-level only, no runtime impact:

  • Terminals (#507): mode/updatedAt are now required on TerminalData — a compile-time break only for code that hand-constructs/mocks it.
  • Settlements (#509): status is now the SettlementStatus enum and _links.invoice is optional — normal read use still type-checks; prefer getInvoice().
  • Refunds (#484): the cancel callback type was corrected to Callback<true>.
  • OAuth parameterDefaults (#517): defaults apply wherever the type declares the param; a few spec-gap over-declarations (tracked in #489) could 422 until fixed. Per-call values always override.

Special thanks

Special thanks to @fjbender for contributing storeCredentials support (#480)!

Full Changelog: v4.5.0...v4.6.0