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
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?
optionalcurrencyCode?:string
Defined in: types.ts:874
ISO 4217 currency code (e.g. 'EUR', 'USD').
enableBillingAddress?
optionalenableBillingAddress?:boolean
Defined in: types.ts:882
Whether to enable the billing address in the PayPal flow.
enableShippingAddress?
optionalenableShippingAddress?:boolean
Defined in: types.ts:878
Whether to enable the shipping address in the PayPal flow.
intent?
optionalintent?:"capture"|"authorize"
Defined in: types.ts:872
Payment intent — 'capture' settles immediately, 'authorize' holds funds.
locale?
optionallocale?:string
Defined in: types.ts:876
BCP 47 locale for the PayPal button (e.g. 'de_DE', 'en_US').
shippingAddressEditable?
optionalshippingAddressEditable?: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.
