Releases: paypal/paypal-js
Release list
@paypal/react-paypal-js@10.1.2
Patch Changes
- 110a043:
ApplePayOneTimePaymentButtonno longer writes adisabledattribute to Apple's<apple-pay-button>, which ignored it and manages its own enabled/disabled state internally viacanMakePayments(). The non-functionaldisabledprop has been removed — merchants control presentation themselves. - a987b2e: Adds 1 enum value to the paypal messages element logoType property.
- Updated dependencies [4619c74]
- @paypal/paypal-js@10.0.3
@paypal/paypal-js@10.0.3
Patch Changes
- 4619c74: Adding v6 types for Venmo vault-without-payment (SavePayment)
@paypal/react-paypal-js@10.1.1
Patch Changes
- 6714f3f: Migrate the v5 React SDK Storybook from Storybook 6 to Storybook 10 (
@storybook/react-vite) and extract it out of this package into its own@paypal/react-paypal-js-storybook-v5workspace (mirroring the v6 storybook). This is a tooling/dev-dependency change only — the published package output is unchanged; it removes the Storybook toolchain from this library's devDependencies. - Updated dependencies [cfcb985]
- @paypal/paypal-js@10.0.2
@paypal/paypal-js@10.0.2
Patch Changes
- cfcb985: Add a
defaultexport condition to the./sdk-v6subpath so bundlers/tracers (e.g. @vercel/nft) resolve it correctly and don't fall back to the v5 entry.
@paypal/react-paypal-js@10.1.0
Minor Changes
-
0ae4e9d: Add Braintree PayPal Pay Later (BNPL) support and a companion eligibility hook for v6.
useBraintreePayPalPayLaterSession— manages a Pay Later session (error,isPending,handleClick), consistent with the existing one-time-payment, billing-agreement, and checkout-with-vault hooks.useBraintreeEligibleMethods— fetches eligibility viafindEligibleMethodsand caches it on the provider, deduplicating by checkout instance + options and refetching when either changes.- Provider-level failures are now surfaced separately and labeled (
Braintree provider error: …, with the original error ascause), distinct from "checkout instance not available", so consumers can tell which layer failed. - Add
shippingCallbackUrl,shippingAddressOverride(now typed asBraintreeShippingAddressOverrideinstead ofRecord<string, unknown>), andcontactPreferenceoptions to the one-time, Pay Later, and checkout-with-vault session types. BraintreeEligibilityResult.getDetailsis now strongly typed per funding source.
-
fba3cff: Add
BraintreePayPalPayLaterButton, a prebuilt v6 button that renders
<paypal-pay-later-button>and drives the Braintree PayPal Pay Later (BNPL) flow via
useBraintreePayPalPayLaterSession, sourcingcountryCode/productCodefrom provider
eligibility.Docs: clarify that the Pay Later and Credit buttons require eligibility to be fetched first —
viauseEligibleMethods(client) oruseFetchEligibleMethods(server) — with updated JSDoc
and README examples.
Patch Changes
-
b6e0982: Fix jest-environment-dom package migration bug.
-
d4f6cdc: Type the
<paypal-basic-card-button>JSX element's buyer-country input as the kebab-casebuyer-countryattribute instead of a camelCasebuyerCountryprop. The element's observed attribute isbuyer-country, so a camelCase JSX prop is lowercased tobuyercountryon React <19 and never reaches it. Buyer country is normally determined by the SDK; this only corrects the JSX type for the case where a merchant sets the attribute directly. -
edf33ab: Raises an error when the Google Pay script has not loaded when the React component has mounted.
-
a648de2: Fix stale error and potential perpetual loader bug in useEligibleMethods.
-
3b84cd6: Fix:
useFetchEligibleMethodsnow requires theenvironmentoption, matching theloadCoreSdkScript/PayPalProviderchange in v10.0.0. Previously, omittingenvironmentsilently fell through to the sandbox eligibility API (https://api-m.sandbox.paypal.com), which could cause a production server-rendered checkout to hydratePayPalProviderwith sandbox eligibility data while the client loaded the production SDK — surfacing as missing or incorrect payment buttons. TypeScript users will now see a compile error ifenvironmentis omitted; runtime callers will see a thrownError. Passenvironment: "production"orenvironment: "sandbox"explicitly.// Before (silently used sandbox) const response = await useFetchEligibleMethods({ headers, payload }); // After (required) const response = await useFetchEligibleMethods({ environment: "production", // or "sandbox" headers, payload, });
-
Updated dependencies [d7f697b]
-
Updated dependencies [983beb7]
-
Updated dependencies [7d44dcc]
- @paypal/paypal-js@10.0.1
@paypal/paypal-js@10.0.1
Patch Changes
-
d7f697b: Migrates Vitest to v4.
-
983beb7: Add v6 web component DOM element types so non-React TypeScript integrations get strongly-typed access to the PayPal SDK custom elements.
HTMLElementTagNameMapis augmented for<paypal-button>,<venmo-button>,<paypal-pay-later-button>,<paypal-credit-button>,<paypal-basic-card-button>,<paypal-basic-card-container>,<paypal-message>, and<apple-pay-button>(registered by Apple's Apple Pay JS SDK).const btn = document.createElement("paypal-pay-later-button"); btn.countryCode = "US"; // typed: "AU" | "CA" | "DE" | "ES" | "FR" | "GB" | "IT" | "US" btn.productCode = "PAYLATER"; // typed: "PAYLATER" | "PAY_LATER_SHORT_TERM"
-
7d44dcc: Add
vaultSetupTokentoOnApproveDataand expandcreateVaultSetupTokenandonApproveJSDoc to cover Venmo vault-without-purchase flows.
@paypal/react-paypal-js@10.0.0
Major Changes
-
114d09c: BREAKING: The v6
environmentoption is now required in thePayPalProvider. Previously, omittingenvironmentsilently defaulted to sandbox, which could cause production builds to load the sandbox SDK with a liveclientId. Passenvironment: "production"orenvironment: "sandbox"explicitly. TypeScript users will see a compile error; runtime callers will see a thrownError.v6 PayPalProvider
Update the PayPalProvider to pass the environment property
<PayPalProvider clientId={clientId} environment="sandbox" // "production" components={["paypal-payments",]} pageType="checkout" > <CheckoutPage /> </PayPalProvider>
Patch Changes
- Updated dependencies [114d09c]
- @paypal/paypal-js@10.0.0
@paypal/paypal-js@10.0.0
Major Changes
-
114d09c: BREAKING: The v6
environmentoption is now required onloadCoreSdkScript. Previously, omittingenvironmentsilently defaulted to sandbox, which could cause production builds to load the sandbox SDK with a liveclientId. Passenvironment: "production"orenvironment: "sandbox"explicitly. TypeScript users will see a compile error; runtime callers will see a thrownError.v6 loadCoreSdkScript
Update usage of loadCoreSdkScript to pass the environment property correctly
const paypalGlobalNamespace = await loadCoreSdkScript({ environment: "sandbox", // "production" });
@paypal/react-paypal-js@9.3.0
Minor Changes
- 145d3c5: Adds the Braintree with PayPal Checkout with Vault button component.
- 2bcb79d: Add a new static UI component for braintree paypal one time payment.
- 63d8fca: Add the Braintree-PayPal Billing Agreement Hook
- 61ee8ca: Makes presentationMode optional for v6 buttons and hooks, and sets a default value for each hook.
- 3d3b60e: Add Braintree-PayPal integration documentation.
- 0ff45b7: Implementing GooglePay hook and the button component
- 82da8dd: Adds Braintree Checkout with Vault hook
- 1974cd9: Adds Braintree-PayPal Billing Agreement button component.
Patch Changes
- 6e97c29: Fix onError type intersection in ApplePayButtonElementProps by adding Omit<HTMLAttributes, "onError"> consistent with ButtonProps pattern
- 658db62: Fixing ApplePay styling issue
- ee72ab1: Update README with Apple component documentation.
- 5112bf2: Fix to prevent ApplePaySession completePayment twice
- Updated dependencies [9007a82]
- Updated dependencies [6e1de75]
- Updated dependencies [0ff45b7]
- Updated dependencies [164d373]
- @paypal/paypal-js@9.8.0