Global

Methods

(static) tokenize(options, callbackopt) → {Promise.<(tokenizePayload|error)>}

Parameters:
Name Type Attributes Description
options object

All options for intiating the SEPA payment flow.

Properties
Name Type Attributes Description
accountHolderName string <optional>

The account holder name.

customerId string <optional>

The customer's id.

iban string <optional>

The customer's International Bank Account Number.

mandateType string <optional>

Specify ONE_OFF or RECURRENT payment.

countryCode string <optional>

The customer's country code.

merchantAccountId string <optional>

The merchant's account id.

callback callback <optional>

The first argument is an error object, where the second is a tokenizePayload

Source:
Example
button.addEventListener('click', function () {
  var tokenizeInputs = {
    accountHolderName: "some-accnt-holder-name",
    customerId: "a-customer-id",
    iban: "a-full-iban",
    mandateType: "ONE_OFF",
    countryCode: "LI",
    merchantAccountId: "a-merchant-account-id"
  }
  sepaInstance.tokenize(tokenizeInputs).then(function (payload) {
     // Submit payload.nonce to your server
  }).catch(function(tokenizationErr) {
    // Handle errors in the flow
  })
})

Type Definitions

callback(erropt, nullable, dataopt, nullable) → {void}

The Node.js-style callback pattern used throughout the SDK.

Parameters:
Name Type Attributes Description
err BraintreeError <optional>
<nullable>

null or undefined if there was no error.

data any <optional>
<nullable>

The successful result of the asynchronous function call (if data exists).

Source: