Packages

@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.

  1. 11.x · latest line
  2. 11.3.0

    20 Oct 2026
    • 7689364: Add v6 types for updateClientToken() on the SDK instance

    • 051a03e: Increase the v6 loadCoreSdkScript per-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.paypal no longer resolves loadCoreSdkScript after a failed or timed out load.

  3. 11.2.2

    9 Oct 2026
    • 89827ba: Resolve V6 core script loading when the SDK namespace is available but the script load event is not observed before the timeout.

  4. 11.2.1

    5 Oct 2026
    • adc91b9: Prevent V6 Core SDK timeout retries from evaluating two in-flight script responses. Explicit script errors still retry, while slow requests now wait up to 30 seconds on the original script instead of inserting another one.

  5. 11.2.0

    28 Sep 2026
    • 5f61e1d: Updates the v6 script loader with the following changes:

  6. 11.1.1

    23 Sep 2026
    • 934c705: Consolidate protype pollution proerty guard with a helper function.

  7. 11.1.0

    15 Sep 2026
    • d4bc19a: Add new fundingSource attribute to OnApproveData types for V6

    • cb9899e: Expand the v6 eligibility FundingSource type to include supported local payment methods.

    • a6997f0: Added name as a valid field to existing Card Fields types

  8. 11.0.1

    10 Sep 2026
    • security

      39f147e: Guard the environment option against prototype pollution in validateArguments().

      processOptions() already read environment via Object.prototype.hasOwnProperty.call(), but validateArguments() (v5 loadScript) and the v6 loadCoreSdkScript validator still destructured it directly, so a polluted Object.prototype.environment was picked up before those guards ran. On the v5 path a junk value would throw and break loadScript() 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 onApprove genuinely optional on PayPalOneTimePaymentSessionOptions (and its PayLaterOneTimePaymentSessionOptions / PayPalCreditOneTimePaymentSessionOptions aliases).

      The type intersected BasePaymentSessionOptions — where onApprove is required — and re-declared onApprove? without Omit-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 and onApprove was 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 require onApprove. It is now re-added as optional via Omit<BasePaymentSessionOptions, "onApprove">, mirroring SavePaymentSessionOptions.

    • eb54388: Emit a nested dist/v6/esm/package.json with {"type":"module"} so the v6 ESM bundle is correctly signaled as an ES module.

      The v6 build outputs ESM syntax into .js files, but the package has no root "type":"module" (it can't — that would relabel the v5 CJS bundles). Under Node's resolution rules those .js files therefore default to CommonJS, so a native ESM import of @paypal/paypal-js/sdk-v6 triggers a MODULE_TYPELESS_PACKAGE_JSON warning 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.

  9. 11.0.0

    26 Aug 2026
    • breaking

      6b10c2b: A breaking change that removes PayPal's homegrown ApplePaySession browser-global typing from the v6 types.

      @paypal/paypal-js/sdk-v6 no longer declares a stripped ApplePaySession class or augments the global Window interface with ApplePaySession. That augmentation conflicted with the community @types/applepayjs package (TS2717 / TS2687), and because it shipped through the sdk-v6 barrel 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.initiatePayerAction changes from the previous no-op
      placeholder to its real signature — initiatePayerAction(options: { orderId: string }): Promise<InitiatePayerActionResponse> — which resolves with the 3DS liabilityShift and
      rejects if the buyer cancels or authentication fails.

      Adds and exports three supporting types: LiabilityShiftType
      ("UNKNOWN" | "NO" | "YES" | "POSSIBLE"), InitiatePayerActionOptions, and
      InitiatePayerActionResponse.

    • be48634: Add TypeScript types for the v6 local payment methods (LPM) components. LPMPaymentsInstance and the LPMComponents union are now exported from @paypal/paypal-js/sdk-v6, and SdkInstance/Components/CreateInstanceOptions recognize LPM component names (e.g. "ideal-payments", "bancontact-payments") so createInstance returns the LPM methods when an LPM component is requested.

      SdkInstance now narrows the LPM methods it exposes to only the components actually requested — for example createInstance({ components: ["ideal-payments"] }) now types createIdealOneTimePaymentSession only, instead of surfacing all 50 LPM session-creation methods as optional. This is powered by a new single-source-of-truth LPMComponentToSessionMethod map (also exported) and an LPMInstanceFor<T> helper type, which replace the previous positionally-aligned LPMComponents/LPMSessionMethodName unions.

      Remove optional chaining (?) from LPMInstanceFor<T> methods since requested LPM components are guaranteed to exist at runtime on the SDK instance.

  10. 10.x
  11. 10.1.0

    27 Jul 2026
    • d9c0200: Narrow PayPalMessagesSession.fetchContent to return Promise<MessageContent> (previously Promise<MessageContent | null>). The evergreen SDK never resolves to null — on an API error it returns an empty sentinel MessageContent (empty messageItems) so the <paypal-message> element recognizes the error state and collapses. Existing === null checks against the result become dead code but continue to compile.

    • 09f2994: Fix incomplete prototype-pollution protection in processOptions. The environment option was still read via destructuring, which reads through the prototype chain, so Object.prototype.environment = "sandbox" could downgrade a production checkout to the sandbox SDK URL. environment is now read with a hasOwnProperty guard, matching the existing sdkBaseUrl protection.

  12. 10.0.3

    7 Jul 2026

    Reading the note…

  13. 10.0.2

    29 Jun 2026

    Reading the note…

  14. 10.0.1

    25 Jun 2026

    Reading the note…

  15. 10.0.0

    4 Jun 2026

    Reading the note…

  16. 9.x
  17. 9.8.0

    3 Jun 2026

    Reading the note…

  18. 9.7.0

    27 Apr 2026

    Reading the note…

  19. 9.6.0

    8 Apr 2026

    Reading the note…

  20. 9.5.0

    25 Mar 2026

    Reading the note…

  21. 9.4.1

    19 Mar 2026

    Reading the note…

  22. 9.4.0

    2 Mar 2026

    Reading the note…

  23. 9.3.0

    20 Feb 2026

    Reading the note…

  24. 9.2.0

    14 Jan 2026

    Reading the note…

  25. 9.1.0

    17 Dec 2025

    Reading the note…

  26. 9.0.1

    3 Oct 2025

    Reading the note…

  27. 9.0.0

    2 Oct 2025

    Reading the note…

  28. 8.x
  29. 8.4.2

    4 Sep 2025

    Reading the note…

  30. 8.4.1

    3 Sep 2025

    Reading the note…

  31. 8.4.0

    3 Sep 2025

    Reading the note…

  32. 8.3.1

    2 Sep 2025

    Reading the note…

  33. 8.3.0

    27 Aug 2025

    Reading the note…

  34. 8.2.0

    23 Jan 2025

    Reading the note…

  35. 8.1.3

    8 Jan 2025

    Reading the note…

  36. 8.1.2

    16 Sep 2024

    Reading the note…

  37. 8.1.1

    27 Aug 2024

    Reading the note…

  38. 8.1.0

    7 Jun 2024

    Reading the note…

  39. 8.0.5

    16 Apr 2024

    Reading the note…

  40. 8.0.4

    20 Mar 2024

    Reading the note…

  41. 8.0.3

    20 Mar 2024

    Reading the note…

  42. 8.0.2

    9 Feb 2024

    Reading the note…

  43. 8.0.0

    20 Dec 2023

    Reading the note…

  44. 7.x
  45. 7.1.1

    27 Nov 2023

    Reading the note…

  46. 7.1.0

    13 Nov 2023

    Reading the note…

  47. 7.0.3

    19 Sep 2023

    Reading the note…

  48. 7.0.2

    26 Aug 2023

    Reading the note…

  49. 7.0.1

    26 Aug 2023

    Reading the note…

  50. 7.0.0

    16 Aug 2023

    Reading the note…

  51. 6.x
  52. 6.0.1

    19 Jul 2023

    Reading the note…

  53. 6.0.0

    2 Jun 2023

    Reading the note…

  54. 5.x
  55. 5.1.6

    27 Mar 2023

    Reading the note…

  56. 5.1.5

    21 Mar 2023

    Reading the note…

  57. 5.1.4

    29 Nov 2022

    Reading the note…