# Migrate payment methods to the Dashboard

Learn how to turn on payment methods for your Payment Intents integration in the Dashboard.

You can update your integration to use your payment method preferences from the Dashboard. This allows Stripe to display all compatible payment methods to your customers when using Elements, depending on the chosen currency, location, or any payment method restrictions, such as maximum transaction amounts.

Elements shows payment methods known to increase conversion for your customer’s location, and hides other payment methods in an overflow menu. Customers can still choose from the payment methods in the overflow menu.

## Update your integration

For existing Payment Intents integrations, you must remove the `payment_method_types` parameter to migrate payment methods preferences to the Dashboard. Doing so allows some payment methods to turn on automatically, including cards and wallets. The `currency` parameter restricts the payment methods your customers see in Elements.

> When you upgrade your integration, non-default payment methods (such as bank redirects) are initially disabled. You must enable any payment methods you added to your Payment Intents integration from the payment methods settings page in the Dashboard.

#### Ruby

```ruby

# Don't put any keys in code. See https://docs.stripe.com/keys-best-practices.
# Find your keys at https://dashboard.stripe.com/apikeys.
client = Stripe::StripeClient.new('<<YOUR_SECRET_KEY>>')

client.v1.payment_intents.create({
  amount: 2000,
  currency: 'eur',
  metadata: {
    order_id: '12345',
  },
})
```

## View available payment methods in the Dashboard

You can view the payment methods that you currently accept from the [payment methods settings](https://dashboard.stripe.com/settings/payment_methods) in the Dashboard. The list includes payment methods that Stripe enables by default, such as cards.

You can also enable or disable individual payment methods, such as Apple Pay or Google Pay. With the Payment Intents API, Stripe evaluates the currency and any restrictions, then dynamically presents the supported payment methods to the customer.

For example, Apple Pay is enabled and Google Pay is disabled, by default. In some cases, Stripe might not show these payment methods, even if you enabled them. Stripe doesn’t show Google Pay if you [enable automatic tax](https://docs.stripe.com/tax/checkout.md) without collecting a shipping address.

To see how Stripe displays your payment methods to customers, enter a transaction ID or set an order amount and currency in the Dashboard.

## Add or remove payment methods in your integration

Enable payment methods for your integration from the [payment methods settings](https://dashboard.stripe.com/settings/payment_methods) in the Dashboard. You can select **Turn on** to enable some payment methods. For payment methods that require additional steps, select **Set up** or **Review terms**.

Learn about which payment methods are right for your business from our [payment methods guide](https://stripe.com/payments/payment-methods-guide).

## (Recommended) Handle delayed notification payment methods

If you set up *webhooks* (A configurable endpoint that executes when it receives certain event notifications from an event destination) to [automatically fulfill](https://docs.stripe.com/events/set-up-events.md) orders, then adding any payment methods with delayed payment confirmation might require you to update your Payment Intents integration.

Listen for the `payment_intent.succeeded` event to handle successful payments. For payment methods with delayed notifications, also listen for `payment_intent.payment_failed` to handle failed payments that might occur after the initial confirmation.

```javascript
// Handle the event
switch (event.type) {
  case 'payment_intent.succeeded':
    const paymentIntent = event.data.object;
    // Fulfill the order
    console.log('PaymentIntent was successful!');
    break;
  case 'payment_intent.payment_failed':
    const failedPaymentIntent = event.data.object;
    // Handle the failed payment
    console.log('PaymentIntent failed:', failedPaymentIntent.last_payment_error?.message);
    break;
  default:
    console.log(`Unhandled event type ${event.type}`);
}
```

## Test your integration

#### Cards

| Card number | Scenario | How to test |
| --- | --- | --- |
| 4242424242424242 | The card payment succeeds and doesn’t require authentication. | Fill out the credit card form using the credit card number with any expiration, CVC, and postal code. |
| 4000002500003155 | The card payment requires *authentication* (Strong Customer Authentication (SCA) is a regulatory requirement in effect as of September 14, 2019, that impacts many European online payments. It requires customers to use two-factor authentication like 3D Secure to verify their purchase). | Fill out the credit card form using the credit card number with any expiration, CVC, and postal code. |
| 4000000000009995 | The card is declined with a decline code like `insufficient_funds`. | Fill out the credit card form using the credit card number with any expiration, CVC, and postal code. |
| 6205500000000000004 | The UnionPay card has a variable length of 13-19 digits. | Fill out the credit card form using the credit card number with any expiration, CVC, and postal code. |

#### Wallets

| Payment method | Scenario | How to test |
| --- | --- | --- |
| Alipay | Your customer successfully pays with a redirect-based and [immediate notification](https://docs.stripe.com/payments/payment-methods.md#payment-notification) payment method. | Choose any redirect-based payment method, fill out the required details, and confirm the payment. Then click **Complete test payment** on the redirect page. |

#### Bank redirects

| Payment method | Scenario | How to test |
| --- | --- | --- |
| Bancontact, EPS, iDEAL, and Przelewy24 | Your customer fails to authenticate on the redirect page for a redirect-based and immediate notification payment method. | Choose any redirect-based payment method, fill out the required details, and confirm the payment. Then click **Fail test payment** on the redirect page. |
| Pay by Bank | Your customer successfully pays with a redirect-based and [delayed notification](https://docs.stripe.com/payments/payment-methods.md#payment-notification) payment method. | Choose the payment method, fill out the required details, and confirm the payment. Then click **Complete test payment** on the redirect page. |
| Pay by Bank | Your customer fails to authenticate on the redirect page for a redirect-based and delayed notification payment method. | Choose the payment method, fill out the required details, and confirm the payment. Then click **Fail test payment** on the redirect page. |
| BLIK | BLIK payments fail in a variety of ways—immediate failures (for example, the code is expired or invalid), delayed errors (the bank declines) or timeouts (the customer didn’t respond in time). | Use email patterns to [simulate the different failures.](https://docs.stripe.com/payments/blik/accept-a-payment.md#simulate-failures) |

#### Bank debits

| Payment method | Scenario | How to test |
| --- | --- | --- |
| BECS Direct Debit | Your customer successfully pays with BECS Direct Debit. | Fill out the form using the account number `900123456` and BSB `000000`. The confirmed PaymentIntent initially transitions to `processing`, then transitions to the `succeeded` status 3 minutes later. |
| BECS Direct Debit | Your customer’s payment fails with an `account_closed` error code. | Fill out the form using the account number `111111113` and BSB `000000`. |
| SEPA Direct Debit | Your customer successfully pays with SEPA Direct Debit. | Fill out the form using the account number `AT321904300235473204`. The confirmed PaymentIntent initially transitions to processing, then transitions to the succeeded status three minutes later. |
| SEPA Direct Debit | Your customer’s payment intent status transitions from `processing` to `requires_payment_method`. | Fill out the form using the account number `AT861904300235473202`. |

#### Vouchers

| Payment method | Scenario | How to test |
| --- | --- | --- |
| Boleto, OXXO | Your customer pays with a Boleto or OXXO voucher. | Select Boleto or OXXO as the payment method and submit the payment. Close the dialog after it appears. |

See [Testing](https://docs.stripe.com/testing.md) for additional information to test your integration.
