# Deprecated Methods

These methods were available in finix.js v1 and are no longer supported in v2. Replace them with [Finix.PaymentForm()](https://docs.finix.com/js/payment-form). 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](https://docs.finix.com/guides/online-payments/payment-tokenization/finix-js-migration-guide-v1-to-v2).

## Method Replacements

- **Finix.TokenForm** → **Finix.PaymentForm**  
  `Finix.TokenForm` accepted both card and bank account payments. Replace it with `Finix.PaymentForm` — no additional options are required to match the default behavior.

- **Finix.CardTokenForm** → **Finix.PaymentForm**  
  `Finix.CardTokenForm` accepted card payments only. Replace it with `Finix.PaymentForm` and set `paymentMethods: ["card"]`.

- **Finix.BankTokenForm** → **Finix.PaymentForm**  
  `Finix.BankTokenForm` accepted bank account payments only. Replace it with `Finix.PaymentForm` and set `paymentMethods: ["bank"]`.

## Code Examples

```javascript
// 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,
});
```
