Skip to content

Express Docs v0.1.0


Express Docs / PayPalOptions

Interface: PayPalOptions ​

Defined in: src/types.ts:398

SDK-level options for the native PayPal provider (PayPal:PayPalExpress).

Remarks ​

These values are forwarded to the PayPal JS SDK query parameters when the script is loaded. See PayPal SDK docs.

Example ​

ts
const paypalButton: ProviderButtonConfig<'PayPal:PayPalExpress'> = {
  providerProtocolType: 'PayPal',
  paymentMethodType: 'PayPalExpress',
  container: '#paypal-container',
  style: { color: 'gold', shape: 'rect' },
  options: {
    merchantId: 'MERCHANT_PAYPAL_ACCOUNT_ID',
    currencyCode: 'EUR',
  },
};

Extends ​

  • CheckoutFlowFlags

Properties ​

clientId? ​

optional clientId?: string

Defined in: src/types.ts:416

Your own PayPal client ID for direct authentication.

Remarks ​

Set this when you authenticate directly with your own PayPal developer app. When omitted the SDK falls back to partner mode: the SDK operator's partner credentials are used and only merchantId needs to be supplied.

Example ​

ts
// Direct mode — use your own PayPal app credentials
options: { clientId: 'YOUR_PAYPAL_CLIENT_ID' }

// Partner mode — SDK-managed credentials, identify the merchant
options: { merchantId: 'MERCHANT_PAYPAL_ACCOUNT_ID' }

currencyCode ​

currencyCode: string

Defined in: src/types.ts:427

ISO 4217 currency code (e.g. 'USD', 'EUR').


isBillingCustomerDataRequired? ​

optional isBillingCustomerDataRequired?: boolean

Defined in: src/types.ts:253

When true, billing address data is required from the customer.

Inherited from ​

CheckoutFlowFlags.isBillingCustomerDataRequired


isShippingCustomerDataRequired? ​

optional isShippingCustomerDataRequired?: boolean

Defined in: src/types.ts:251

When true, shipping address data is required from the customer.

Inherited from ​

CheckoutFlowFlags.isShippingCustomerDataRequired


merchantId? ​

optional merchantId?: string

Defined in: src/types.ts:425

PayPal merchant account ID.

Remarks ​

Required in partner mode (when clientId is omitted) to identify which merchant account processes the payment. In direct mode this field is ignored.


pspAutoCaptureEnabled ​

pspAutoCaptureEnabled: boolean

Defined in: src/types.ts:263

When true (default), the payment is captured immediately after authorization. When false, the payment is authorized only and must be captured separately.

Remarks ​

This flag is mapped to the provider-native concept:

  • PayPal / Braintree / Adyen PayPal → intent: 'capture' (true) / 'authorize' (false)
  • Stripe → captureMethod: 'automatic' (true) / 'manual' (false)

Inherited from ​

CheckoutFlowFlags.pspAutoCaptureEnabled


userAction? ​

optional userAction?: PayPalUserAction

Defined in: src/types.ts:439

User action for the PayPal review page — see PayPalUserAction.

Remarks ​

Must match the "UserAction" setting of the CollanaPay ProviderAccount. Must match the value used for PayPal:PayLater if both are configured together (only one PayPal SDK script per page).

Default Value ​

'PAY_NOW' — when omitted the SDK explicitly sets commit=true (the PayPal JS SDK default).

collana pay SDK Documentation