braintree-web/data-collector

Members

(static) VERSION :string

The current version of the SDK, i.e. 3.101.2.

Source:

Methods

(static) create(options, callbackopt) → {Promise|void}

Creates a DataCollector instance and collects device data based on your merchant configuration. We recommend that you call this method as early as possible, e.g. as soon as your website loads. If that's too early, call it at the beginning of customer checkout. Note: To use your own Kount ID, contact our support team (support@braintreepayments.com or 877.434.2894).

Parameters:
Name Type Attributes Description
options object

Creation options:

Properties
Name Type Attributes Description
client Client <optional>

A Client instance.

authorization string <optional>

A tokenizationKey or clientToken. Can be used in place of options.client.

useDeferredClient boolean <optional>

Used in conjunction with authorization, allows the Data Collector instance to be available right away by fetching the client configuration in the background. When this option is used, GooglePayment#getDeviceData must be used to collect the device data.

kount boolean <optional>

Kount fraud data collection will occur if the merchant configuration has it enabled. Note: the data sent to Kount is asynchronous and may not have completed by the time the data collector create call is complete. In most cases, this will not matter, but if you create the data collector instance and immediately navigate away from the page, the device information may fail to be sent to Kount.

paypal boolean <optional>

Deprecated: PayPal fraud data collection will occur when the DataCollector instance is created.

riskCorrelationId string <optional>

Pass a custom risk correlation id when creating the data collector.

clientMetadataId string <optional>

Deprecated. Use options.riskCorrelationId instead.

correlationId string <optional>

Deprecated. Use options.riskCorrelationId instead.

callback callback <optional>

The second argument, data, is the DataCollector instance.

Source: