@paypal/paypal-js
11.3.0 · 20 Oct 2026Apache-2.0481.1k / weekRepositoryHomepagenpmAtom feed
107 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 11.x · latest line
11.3.0
20 Oct 20267689364: Add v6 types for
updateClientToken()on the SDK instance051a03e: Increase the v6
loadCoreSdkScriptper-attempt script load timeout from 30 seconds to 60 seconds so slow networks have more time to load the Core SDK script before the load is reported as timed out.83e6ca1: Only treat a v6 SDK on the window namespace as a loaded V6 core script, so a v5 SDK already on
window.paypalno longer resolvesloadCoreSdkScriptafter a failed or timed out load.
11.0.1
10 Sep 2026- security
39f147e: Guard the
environmentoption against prototype pollution invalidateArguments().processOptions()already readenvironmentviaObject.prototype.hasOwnProperty.call(), butvalidateArguments()(v5loadScript) and the v6loadCoreSdkScriptvalidator still destructured it directly, so a pollutedObject.prototype.environmentwas picked up before those guards ran. On the v5 path a junk value would throw and breakloadScript()entirely; on the v6 path a polluted"sandbox"value would pass validation and silently load the sandbox SDK. Both validators now use an own-property check so inherited values are ignored. 24ccc6a: Make
onApprovegenuinely optional onPayPalOneTimePaymentSessionOptions(and itsPayLaterOneTimePaymentSessionOptions/PayPalCreditOneTimePaymentSessionOptionsaliases).The type intersected
BasePaymentSessionOptions— whereonApproveis required — and re-declaredonApprove?withoutOmit-ing it from the base first. In a TypeScript intersection a property is optional only if it is optional in every constituent, so the?had no effect andonApprovewas required in practice (#1020). Because the presentation mode is only chosen later at.start()(a separate call) and redirect flows legitimately have no in-page approval callback, core cannot requireonApprove. It is now re-added as optional viaOmit<BasePaymentSessionOptions, "onApprove">, mirroringSavePaymentSessionOptions.eb54388: Emit a nested
dist/v6/esm/package.jsonwith{"type":"module"}so the v6 ESM bundle is correctly signaled as an ES module.The v6 build outputs ESM syntax into
.jsfiles, but the package has no root"type":"module"(it can't — that would relabel the v5 CJS bundles). Under Node's resolution rules those.jsfiles therefore default to CommonJS, so a native ESM import of@paypal/paypal-js/sdk-v6triggers aMODULE_TYPELESS_PACKAGE_JSONwarning plus a reparse penalty on modern Node, and fails to load outright on older Node or loaders without ESM syntax detection. The nested marker scopes the ESM declaration to the v6 directory only, leaving the v5 CJS artifacts untouched.
11.0.0
26 Aug 2026- breaking
6b10c2b: A breaking change that removes PayPal's homegrown
ApplePaySessionbrowser-global typing from the v6 types.@paypal/paypal-js/sdk-v6no longer declares a strippedApplePaySessionclass or augments the globalWindowinterface withApplePaySession. That augmentation conflicted with the community@types/applepayjspackage (TS2717/TS2687), and because it shipped through thesdk-v6barrel it landed in every consumer's compilation — even projects that never use Apple Pay. c3b5dbe: Update the v6 Google Pay types for 3D Secure (SCA) support.
GooglePayOneTimePaymentSession.initiatePayerActionchanges from the previous no-op
placeholder to its real signature —initiatePayerAction(options: { orderId: string }): Promise<InitiatePayerActionResponse>— which resolves with the 3DSliabilityShiftand
rejects if the buyer cancels or authentication fails.Adds and exports three supporting types:
LiabilityShiftType
("UNKNOWN" | "NO" | "YES" | "POSSIBLE"),InitiatePayerActionOptions, andInitiatePayerActionResponse.be48634: Add TypeScript types for the v6 local payment methods (LPM) components.
LPMPaymentsInstanceand theLPMComponentsunion are now exported from@paypal/paypal-js/sdk-v6, andSdkInstance/Components/CreateInstanceOptionsrecognize LPM component names (e.g."ideal-payments","bancontact-payments") socreateInstancereturns the LPM methods when an LPM component is requested.SdkInstancenow narrows the LPM methods it exposes to only the components actually requested — for examplecreateInstance({ components: ["ideal-payments"] })now typescreateIdealOneTimePaymentSessiononly, instead of surfacing all 50 LPM session-creation methods as optional. This is powered by a new single-source-of-truthLPMComponentToSessionMethodmap (also exported) and anLPMInstanceFor<T>helper type, which replace the previous positionally-alignedLPMComponents/LPMSessionMethodNameunions.Remove optional chaining (
?) fromLPMInstanceFor<T>methods since requested LPM components are guaranteed to exist at runtime on the SDK instance.
Major Changes
- breaking
6b10c2b: A breaking change that removes PayPal's homegrown
ApplePaySessionbrowser-global typing from the v6 types.@paypal/paypal-js/sdk-v6no longer declares a strippedApplePaySessionclass or augments the globalWindowinterface withApplePaySession. That augmentation conflicted with the community@types/applepayjspackage (TS2717/TS2687), and because it shipped through thesdk-v6barrel it landed in every consumer's compilation — even projects that never use Apple Pay.
Minor Changes
c3b5dbe: Update the v6 Google Pay types for 3D Secure (SCA) support.
GooglePayOneTimePaymentSession.initiatePayerActionchanges from the previous no-op
placeholder to its real signature —initiatePayerAction(options: { orderId: string }): Promise<InitiatePayerActionResponse>— which resolves with the 3DSliabilityShiftand
rejects if the buyer cancels or authentication fails.Adds and exports three supporting types:
LiabilityShiftType
("UNKNOWN" | "NO" | "YES" | "POSSIBLE"),InitiatePayerActionOptions, andInitiatePayerActionResponse.be48634: Add TypeScript types for the v6 local payment methods (LPM) components.
LPMPaymentsInstanceand theLPMComponentsunion are now exported from@paypal/paypal-js/sdk-v6, andSdkInstance/Components/CreateInstanceOptionsrecognize LPM component names (e.g."ideal-payments","bancontact-payments") socreateInstancereturns the LPM methods when an LPM component is requested.SdkInstancenow narrows the LPM methods it exposes to only the components actually requested — for examplecreateInstance({ components: ["ideal-payments"] })now typescreateIdealOneTimePaymentSessiononly, instead of surfacing all 50 LPM session-creation methods as optional. This is powered by a new single-source-of-truthLPMComponentToSessionMethodmap (also exported) and anLPMInstanceFor<T>helper type, which replace the previous positionally-alignedLPMComponents/LPMSessionMethodNameunions.Remove optional chaining (
?) fromLPMInstanceFor<T>methods since requested LPM components are guaranteed to exist at runtime on the SDK instance.
Patch Changes
be48634: Make
addressLine2andadminArea2required (not optional) on the LPMLPMSessionFieldBillingAddresstype, matching the internal SDK'sBillingAddressshape where both fields are required.
- 10.x
10.1.0
27 Jul 2026d9c0200: Narrow
PayPalMessagesSession.fetchContentto returnPromise<MessageContent>(previouslyPromise<MessageContent | null>). The evergreen SDK never resolves tonull— on an API error it returns an empty sentinelMessageContent(emptymessageItems) so the<paypal-message>element recognizes the error state and collapses. Existing=== nullchecks against the result become dead code but continue to compile.09f2994: Fix incomplete prototype-pollution protection in
processOptions. Theenvironmentoption was still read via destructuring, which reads through the prototype chain, soObject.prototype.environment = "sandbox"could downgrade a production checkout to the sandbox SDK URL.environmentis now read with ahasOwnPropertyguard, matching the existingsdkBaseUrlprotection.
10.0.3
7 Jul 2026Reading the note…
10.0.2
29 Jun 2026Reading the note…
10.0.1
25 Jun 2026Reading the note…
10.0.0
4 Jun 2026Reading the note…
- 9.x
9.8.0
3 Jun 2026Reading the note…
9.7.0
27 Apr 2026Reading the note…
9.6.0
8 Apr 2026Reading the note…
9.5.0
25 Mar 2026Reading the note…
9.4.1
19 Mar 2026Reading the note…
9.4.0
2 Mar 2026Reading the note…
9.3.0
20 Feb 2026Reading the note…
9.2.0
14 Jan 2026Reading the note…
9.1.0
17 Dec 2025Reading the note…
9.0.1
3 Oct 2025Reading the note…
9.0.0
2 Oct 2025Reading the note…
- 8.x
8.4.2
4 Sep 2025Reading the note…
8.4.1
3 Sep 2025Reading the note…
8.4.0
3 Sep 2025Reading the note…
8.3.1
2 Sep 2025Reading the note…
8.3.0
27 Aug 2025Reading the note…
8.2.0
23 Jan 2025Reading the note…
8.1.3
8 Jan 2025Reading the note…
8.1.2
16 Sep 2024Reading the note…
8.1.1
27 Aug 2024Reading the note…
8.1.0
7 Jun 2024Reading the note…
8.0.5
16 Apr 2024Reading the note…
8.0.4
20 Mar 2024Reading the note…
8.0.3
20 Mar 2024Reading the note…
8.0.2
9 Feb 2024Reading the note…
8.0.0
20 Dec 2023Reading the note…
- 7.x
7.1.1
27 Nov 2023Reading the note…
7.1.0
13 Nov 2023Reading the note…
7.0.3
19 Sep 2023Reading the note…
7.0.2
26 Aug 2023Reading the note…
7.0.1
26 Aug 2023Reading the note…
7.0.0
16 Aug 2023Reading the note…
- 6.x
6.0.1
19 Jul 2023Reading the note…
6.0.0
2 Jun 2023Reading the note…
- 5.x
5.1.6
27 Mar 2023Reading the note…
5.1.5
21 Mar 2023Reading the note…
5.1.4
29 Nov 2022Reading the note…