Skip to main content

BraintreePluginOptions

Options for the Braintree plugin.

Signature

environment

propertyEnvironment
Default:Environment.Sandbox

The Braintree environment being targeted, e.g. sandbox or production.

storeCustomersInBraintree

propertyboolean
Default:false

If set to true, a Customer object will be created in Braintree, which allows the secure storage ("vaulting") of previously-used payment methods. This is done by adding a custom field to the Customer entity to store the Braintree customer ID, so switching this on will require a database migration / synchronization.

Since v1.8, it is possible to override vaulting on a per-payment basis by passing includeCustomerId: false to the generateBraintreeClientToken mutation.

extractMetadata

property(transaction: Transaction) => PaymentMetadatav1.7.0

Allows you to configure exactly what information from the Braintree Transaction object (which is returned by the transaction.sale() method of the SDK) should be persisted to the resulting Payment entity metadata.

By default, the built-in extraction function will return a metadata object that looks like this:

Example

Ts

merchantAccountIds

propertyBraintreeMerchantAccountIds

An optional mapping of currency codes to Braintree Merchant Account IDs. When set, the corresponding Merchant Account ID will be used for transactions in the given currency.

Was this chapter helpful?
Report Issue
Edited Mar 31, 2026ยทEdit this page