Deprecated Methods | Finix.js Reference
Deprecated Methods
These methods were available in finix.js v1 and are no longer supported in v2. Replace them with Finix.PaymentForm(). Only set the paymentMethods option if you need to restrict payment methods beyond the default experience.
For a full overview of what changed between v1 and v2, see the finix.js Migration Guide.
Method Replacements
Finix.TokenForm → Finix.PaymentForm
Finix.TokenFormaccepted both card and bank account payments. Replace it withFinix.PaymentForm— no additional options are required to match the default behavior.Finix.CardTokenForm → Finix.PaymentForm
Finix.CardTokenFormaccepted card payments only. Replace it withFinix.PaymentFormand setpaymentMethods: ["card"].Finix.BankTokenForm → Finix.PaymentForm
Finix.BankTokenFormaccepted bank account payments only. Replace it withFinix.PaymentFormand setpaymentMethods: ["bank"].
Code Examples
// Before (v1):
Finix.TokenForm(element, options);
// After (v2):
Finix.PaymentForm(element, environment, application, options);
// Before (v1):
Finix.CardTokenForm(element, options);
// After (v2):
Finix.PaymentForm(element, environment, application, {
paymentMethods: ["card"],
...options,
});
// Before (v1):
Finix.BankTokenForm(element, options);
// After (v2):
Finix.PaymentForm(element, environment, application, {
paymentMethods: ["bank"],
...options,
});