Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Paypal Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-paypal-knowledge-patch)
---
name: paypal-knowledge-patch
description: PayPal
version: null
license: MIT
metadata:
author: Nevaberry
---
# PayPal Compatibility Guidance
Load this skill when updating PayPal SDK integrations, working with v6
eligibility or Braintree messaging, or adapting Orders and merchant integrations.
Use the quick references below for migration decisions and the linked files for
the corresponding API details and release attributions.
## Reference index
| Reference | Topics |
| --- | --- |
| [Eligibility and Braintree](references/eligibility-and-braintree.md) | Eligibility renames, server hydration, merchant origin, Braintree messaging, message content and logo types |
| [Orders and payment sources](references/orders-and-payment-sources.md) | Orders fields and limits, payment sources, shipping callbacks, billing agreements, Invoicing and Partner Referrals |
| [SDK v6 components and types](references/sdk-v6-components-and-types.md) | Package resolution, environment options, Apple Pay, Google Pay, local payment methods, Venmo, client tokens and script loading |
## Breaking changes and deprecations
### Eligibility function and type names
Replace `useFetchEligibleMethods` with `fetchEligibleMethods` and await it in
server code. Import it from the server entry point:
```ts
import { fetchEligibleMethods } from "@paypal/react-paypal-js/sdk-v6/server"
```
The client hook remains `useEligibleMethods`. Its types are now
`UseEligibleMethodsOptions` and `UseEligibleMethodsResult`, replacing
`UseFetchEligibleMethodsOptions` and `UseFetchEligibleMethodsResult`.
All three old names remain deprecated aliases until the next major release.
### Apple Pay button and native types
`ApplePayOneTimePaymentButton` removes its `disabled` prop in 10.1.2.
The native `<apple-pay-button>` controls its enabled state through
`canMakePayments()`. The integration can control visibility by deciding when
to render the React component.
The v6 types remove the ambient `ApplePaySession` declaration. If TypeScript
code directly uses that browser global, install `@types/applepayjs` and check
that the global exists before calling it. See the SDK reference for the command
and existence check.
### Direct Google Pay payer action
For direct v6 integrations,
`GooglePayOneTimePaymentSession.initiatePayerAction` takes `{ orderId: string }`
and returns `Promise<InitiatePayerActionResponse>` containing `liabilityShift`.
```ts
const { liabilityShift } = await session.initiatePayerAction({ orderId })
```
The promise rejects if the buyer cancels or authentication fails.
The SDK exports `InitiatePayerActionOptions`, `InitiatePayerActionResponse`,
and `LiabilityShiftType`.
### Required local payment method address fields
Include both `addressLine2` and `adminArea2` when constructing an
`LPMSessionFieldBillingAddress`; both fields are now required.
### Orders billing and seller onboarding
`charge_pattern` is deprecated in favor of `usage_pattern`. Use `usage_pattern`
when sending or reading order billing data.
Partner Referrals v1 is deprecated. Use Partner Referrals v2 for new seller
onboarding integrations and when upgrading an existing v1 integration.
## Eligibility and promotional messaging
### Server-fetched eligibility
Pass the server-fetched eligibility response to the v6 provider to hydrate the
SDK. When eligibility has already been hydrated from the server, the client
skips the eligibility request.
Server-side `fetchEligibleMethods` accepts an explicit merchant origin for
Eligibility API requests. Set it to prevent an overwritten request origin from
affecting Google Pay eligibility.
### Braintree messaging hook
Use `useBraintreePayPalMessages` for `<paypal-message>`. Check `isLoading`,
`isReady`, and `error` while the hook creates the messaging instance
asynchronously.
Once ready, await `handleFetchContent(options)`. To change the displayed amount
without fetching again, call `content.update({ amount })` on the returned
content.
Provider errors carry the `Braintree PayPal context error: ` prefix,
distinguishing them from instance creation and content fetch errors.
The public messaging types are listed in the eligibility and Braintree reference.
### Direct messaging creation
The React v6 SDK exposes `createMessages` on the shared
`BraintreePayPalCheckoutInstance` from `useBraintreePayPal`.
Await `createMessages` to create a messaging instance directly.
### Message content and logo types
`PayPalMessagesSession.fetchContent()` returns `Promise<MessageContent>`;
callers can remove obsolete `null` checks. On an API error it resolves with a
`MessageContent` object whose `messageItems` array is empty, causing
`<paypal-message>` to collapse.
React SDK 10.1.2 expands the `logoType` enum for `<paypal-message>` by one value.
Check any hard-coded allowlist against the upgraded type.
## Payment sessions and component types
### Automatic Google Pay 3D Secure
When `confirmOrder` returns `PAYER_ACTION_REQUIRED`,
`useGooglePayOneTimePaymentSession` and `GooglePayOneTimePaymentButton`
automatically open the 3D Secure modal after the Google Pay sheet closes.
For this flow, `onApprove` runs after successful authentication and includes
`liabilityShift` in `GooglePayOnApproveData`. Buyer cancellation or
authentication failure goes to `onError`.
### Local payment method factories
Pass local payment method names such as `"ideal-payments"` or
`"bancontact-payments"` in the `components` option of `createInstance`.
The returned `SdkInstance` exposes the session factories for the requested
local payment methods as required methods.
The `@paypal/paypal-js/sdk-v6` entry point exports `LPMPaymentsInstance`,
`LPMComponents`, and `LPMComponentToSessionMethod`.
### Venmo payment method saving
`@paypal/paypal-js` 10.0.3 adds v6 TypeScript support for Venmo's `SavePayment`
flow, which saves a payment method without a purchase.
## SDK configuration and loading
### Entry point and environment
The `./sdk-v6` package subpath has a `default` export condition. This lets
bundlers and dependency tracers resolve the v6 entry point in builds that
previously fell back to v5.
`processOptions` reads `environment` only when it is an own property of the
options object, matching `sdkBaseUrl`. Set `environment` directly on the
options object to select the SDK environment.
### Client tokens and core scripts
The v6 SDK instance exposes `updateClientToken` in its TypeScript types,
allowing typed integrations to call it to refresh the client token.
`loadCoreSdkScript` waits up to 60 seconds per script load attempt, up from 30.
It recognizes only a v6 SDK on the window namespace as an already-loaded v6
core script. When `window.paypal` holds v5 and the v6 script load fails or
times out, the loader follows its failure path.
## Orders and merchant APIs
### Request fields and checkout support
- Include the required `email_address` in the Trustly payment source in Orders requests.
- Orders supports experience context on both Apple Pay and Google Pay payment sources.
- Orders can send shipping callbacks to your server during checkout.
- The Orders card payment source accepts risk-related attributes.
- The PUI payment source accepts a buyer-specific ID in Orders requests.
- The Orders card object includes `merchant_customer_id` for the merchant's customer identifier.
### Responses, validation and endpoint declarations
- Orders responses can include `stored_credentials`; response models can retain it when decoding orders.
- The wallet response for the `paypal` payment source can include `business_name`.
- `EFTPOS` is a supported Orders network value; include it in network enum validation.
- An order item's `description` can contain up to 2,048 characters.
- The billing agreement `description` field can contain up to 255 characters.
- Orders Confirm, Capture, and Authorize endpoints now declare a `Content-Type` header.
### Invoicing merchant connections
E-commerce platforms and merchant service providers can use Integrated Sign-Up
(ISU) to connect merchants and perform authorized Invoicing v2 actions on their
behalf.