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-nevaberry-plugins)
---
name: paypal-knowledge-patch
description: PayPal
version: null
license: MIT
metadata:
author: Nevaberry
---
# PayPal Knowledge Patch
Load this skill when updating PayPal Orders integrations, React and Braintree
checkout code, or v6 SDK integrations. Use the topic references for API fields,
type changes, payment flows, messaging, and SDK loading behavior.
| Reference | Topics |
| --- | --- |
| [Orders and API Reference](references/orders-api.md) | Orders fields and limits, experience context, shipping callbacks, Invoicing v2, Partner Referrals migration |
| [React and Braintree Reference](references/react-and-braintree.md) | Apple Pay button props, eligibility APIs and hydration, Google Pay authentication, Braintree messaging |
| [v6 Elements and Modules Reference](references/v6-elements-and-modules.md) | SDK resolution and loading, environment options, client tokens, messaging content, native Apple Pay types, direct Google Pay sessions, local payment methods, Venmo types |
## Breaking changes and deprecations
### Replace the deprecated eligibility names
Replace `useFetchEligibleMethods` with `fetchEligibleMethods` and await it in
server code. The client hook `useEligibleMethods` uses
`UseEligibleMethodsOptions` and `UseEligibleMethodsResult` in place of
`UseFetchEligibleMethodsOptions` and `UseFetchEligibleMethodsResult`.
```ts
import { fetchEligibleMethods } from "@paypal/react-paypal-js/sdk-v6/server"
```
All three old names remain available as deprecated aliases until the next
major release.
### Remove the Apple Pay button's disabled prop
`ApplePayOneTimePaymentButton` removes its `disabled` prop in 10.1.2.
The native `<apple-pay-button>` controls its enabled state via
`canMakePayments()`. Control visibility by deciding when to render the React
component.
### Supply the native Apple Pay typings
The v6 types remove their ambient `ApplePaySession` declaration. If TypeScript
code uses the native browser global directly, install the community typings
and check that the global exists before calling it.
```sh
npm install --save-dev @types/applepayjs
```
```ts
const canMakePayments =
typeof ApplePaySession !== "undefined" && ApplePaySession.canMakePayments()
```
### Update direct Google Pay payer-action calls
`GooglePayOneTimePaymentSession.initiatePayerAction` takes `{ orderId: string }`
and returns a `Promise<InitiatePayerActionResponse>` containing `liabilityShift`.
The promise rejects if the buyer cancels or authentication fails.
```ts
const { liabilityShift } = await session.initiatePayerAction({ orderId })
```
### Include required payment-source fields
Include both `addressLine2` and `adminArea2` when constructing an
`LPMSessionFieldBillingAddress`; both fields are now required.
Include `email_address` in the Trustly payment source when constructing an
Orders request. The field is required.
### Update Orders billing and seller onboarding
Use `usage_pattern` in order billing requests and responses; `charge_pattern`
is deprecated in its favor.
Partner Referrals v1 is deprecated. Use Partner Referrals v2 for new seller
onboarding integrations and when upgrading an existing v1 integration.
## Eligibility and payment sessions
### Hydrate eligibility from the server
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.
The 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.
### Handle automatic Google Pay authentication
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 the new `GooglePayOnApproveData` type. Buyer cancellation
or authentication failure goes to `onError`.
### Request local payment method components
Pass names such as `"ideal-payments"` or `"bancontact-payments"` in
`createInstance`'s `components` option. The returned `SdkInstance` exposes
the session factories for the requested local payment methods as required
methods.
```ts
const sdk = await createInstance({
...instanceOptions,
components: ["ideal-payments"],
})
// sdk.createIdealOneTimePaymentSession is available.
```
## Promotional messaging
### Fetch and update Braintree messaging
Use `useBraintreePayPalMessages` for `<paypal-message>`. Check `isLoading`,
`isReady`, and `error` while the hook creates the messaging instance
asynchronously. Once ready, await `handleFetchContent(options)` and call
`content.update({ amount })` on the returned content to change the displayed
amount without fetching it again.
Provider errors carry the `Braintree PayPal context error: ` prefix, which
distinguishes them from instance creation and content fetch errors.
For direct creation, await `createMessages` on the shared
`BraintreePayPalCheckoutInstance` from `useBraintreePayPal` in the React v6 SDK.
### Treat fetched content as non-null
`PayPalMessagesSession.fetchContent()` returns `Promise<MessageContent>`, so
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 hard-coded allowlists against the upgraded type.
## SDK configuration and loading
### Set the environment directly
`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.
### Resolve and load the v6 SDK
The `./sdk-v6` package subpath has a `default` export condition, letting
bundlers and dependency tracers resolve the v6 entry point in builds that
previously fell back to v5.
`loadCoreSdkScript` waits up to 60 seconds per script load attempt, up from
30 seconds. It only recognizes 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.
### Refresh client tokens in typed integrations
The v6 SDK instance exposes `updateClientToken` in its TypeScript types,
so typed integrations can call it to refresh the client token.
## Orders integration quick reference
Orders supports experience context on Apple Pay and Google Pay payment
sources and can send shipping callbacks to your server during checkout.
Orders responses can include `stored_credentials`, so response models can
retain it when decoding orders. The wallet response for the `paypal` payment
source can include `business_name`.
An order item's `description` can contain up to 2,048 characters. The billing
agreement `description` field can contain up to 255 characters.
`EFTPOS` is a supported Orders network value; include it in network enum
validation. The Orders Confirm, Capture, and Authorize endpoints now declare
a `Content-Type` header.
Consult the Orders reference for card risk attributes, merchant customer IDs,
the PUI buyer-specific ID, and Invoicing v2 Integrated Sign-Up.