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, aninvoice.getPdfUrl()helper, and theInvoiceStatusenum (#506) - Add terminal pairing codes —
terminalPairingCodes.create/get/page/iterate/revokeand aterminalPairingCode.getProfile()helper (#508) - Complete Routes API coverage —
paymentRoutes.get(id, { paymentId })and aroute.getPayment()helper (#511)
Runtime & compatibility
- Run on non-Node.js server runtimes — Bun, Deno, and Cloudflare Workers — by replacing the Node-only
process.release.nameguard 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
dangerouslyAllowBrowserclient option to opt out of the browser block for trusted, short-lived tokens (#490) - Cloudflare Workers requires
nodejs_compatand a compatibility date ≥ 2025-08-15; on Deno, use the named importimport { createMollieClient } from '@mollie/api-client'. Full edge-isolate support without node compat is planned for 5.0 (#490)
Enhancements
- Add a
parameterDefaultsoption for OAuth clients to auto-filltestmode/profileIdon every request that accepts them (#517) - Add
storeCredentialsto payment- and order-create for saved-card mandates (#480) - Declare
testmode/profileIdon the remaining endpoints that accept them (#514, #503) - Add
profileIdto the Apple Pay payment-session request (#512) - Add
legalEntity,registrationOffice, andincorporationDateto the Create client link endpoint (#495) - Add
metadatato 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/getMobileAppCheckoutUrlhelpers and new request params (#510); plus theadditional/consumevoucher line categories and expandedPaymentRoutingInfofields (#516) - Refunds —
mode,externalReference, routing reversals, and anembedparam (#484) - Settlements —
balanceId,invoiceId, theSettlementStatusenum, and agetInvoice()helper (#509) - Subscriptions — a
getMandate()helper and theprofileIdlist param (#504) - Profiles —
description,countriesOfActivity, and agetDashboardUrl()helper (#505) - Organizations — the
emailfield, agetDashboardUrl()helper, andtestmodeonget(#502) - Methods — the
googlepaymethod,en_GB/fr_LU/de_LUlocales, and asequenceTypeparam (#488) - Chargebacks — the
settlementIdfield andtestmodeparams (#487) - Payment links —
lines,billingAddress, andshippingAddresson update (#501) - Onboarding —
businessCategoryand abritishvatRegulation(#500) - Terminals — the
modeandupdatedAtresponse fields (#507) - Capabilities, OAuth tokens, Customers — JSDoc and reference-link refreshes (#494, #496, #498)
Fixes
- Captures now embed their payment via the
embedquery parameter instead of the silently-ignoredinclude; the oldinclude/CaptureIncluderemain 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, useklarna),payconiq, andsettlementAmount(removal announced 2027-01-01) (#516) - Onboarding —
submit/SubmitParameters(use Client Links) and numericcategoryCode(usebusinessCategory) (#500) - Captures —
include/CaptureIncludein favour ofembed/CaptureEmbed(#483) - Callback-as-second-argument on
terminals.get,profiles.get,paymentLinks.delete,permissions.get, andorganizations.get(#514)
Internal
- Update dev dependencies and re-resolve
form-datato 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/updatedAtare now required onTerminalData— a compile-time break only for code that hand-constructs/mocks it. - Settlements (#509):
statusis now theSettlementStatusenum and_links.invoiceis optional — normal read use still type-checks; prefergetInvoice(). - Refunds (#484): the
cancelcallback type was corrected toCallback<true>. - OAuth
parameterDefaults(#517): defaults apply wherever the type declares the param; a few spec-gap over-declarations (tracked in #489) could422until 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