Skip to content

collana pay JS Docs v0.1.0


collana pay JS Docs / BraintreePayPalExpressOptions

Interface: BraintreePayPalExpressOptions

Defined in: types.ts:862

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

Remarks

Uses the Braintree JS v3 SDK (client + paypal-checkout modules) with the modern PayPal Buttons API. The tokenizationKey field is a static credential from the Braintree Control Panel — no server request is needed before rendering the button.

Per-order payment details (amount, currency, line items, etc.) are provided dynamically through the onClick callback return value in checkoutData.paymentOptions. These are forwarded to paypalCheckoutInstance.createPayment().

Example

ts
const braintreePayPal: ProviderButtonConfig<'Braintree:PayPalExpress'> = {
  providerProtocolType: 'Braintree',
  paymentMethodType: 'PayPalExpress',
  container: '#braintree-paypal-container',
  style: { color: 'gold', shape: 'rect' },
  options: {
    tokenizationKey: 'sandbox_g42y39zp_348jhnfdew59qi3c',
    intent: 'authorize',
    currencyCode: 'EUR',
    locale: 'de_DE',
  },
};

Properties

currencyCode?

optional currencyCode?: string

Defined in: types.ts:874

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


enableBillingAddress?

optional enableBillingAddress?: boolean

Defined in: types.ts:882

Whether to enable the billing address in the PayPal flow.


enableShippingAddress?

optional enableShippingAddress?: boolean

Defined in: types.ts:878

Whether to enable the shipping address in the PayPal flow.


intent?

optional intent?: "capture" | "authorize"

Defined in: types.ts:872

Payment intent — 'capture' settles immediately, 'authorize' holds funds.


locale?

optional locale?: string

Defined in: types.ts:876

BCP 47 locale for the PayPal button (e.g. 'de_DE', 'en_US').


shippingAddressEditable?

optional shippingAddressEditable?: boolean

Defined in: types.ts:880

Whether the shipping address can be edited by the buyer.


tokenizationKey

tokenizationKey: string

Defined in: types.ts:870

Braintree tokenization key from the Braintree Control Panel.

Remarks

A static credential (e.g. sandbox_xxx_yyy) that requires no server-side request before rendering the button.

CollanaPay SDK Documentation