Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

5282 articles

Filter card brands


Filter card brands

Choose which card brands to accept

Use Stripe In-app Payments to control which card brands you accept. Card brand filtering lets you specify allowed or disallowed card brands for:

  • The credit card form in In-app Payments
  • The cards customers can use with Apple Pay.

When you configure In-app Payments, you can specify one of two options:

  • allowed : Accept only the card brands you specify.
  • disallowed : Accept all card brands except those you specify.

For either of these options, pass an array with any of the following card brand values as defined on EmbeddedPaymentElement.CardBrandAcceptance.BrandCategory:

  • . visa
  • . mastercard
  • . amex
  • . discover

Note

The discover value encompasses all of the cards that are part of the Discover Global Network, including Discover, Diners Club, JCB, UnionPay, and Elo.

This guide demonstrates how to use card brand filtering to only accept card payments from Visa and Mastercard branded cards.

Before you begin

  1. Create a Stripe account or sign in .
  2. Follow the Payment Element Accept In-app payments guide to integrate with Mobile Payment Element.

Filter card brands

When you create a EmbeddedPaymentElement.Configuration object, specify the card brands you want to allow or disallow using the cardBrandAcceptance property. This example shows how to allow only Visa and Mastercard:

import StripePaymentSheet

class MyCheckoutVC: UIViewController {
 func createEmbeddedPaymentElement() async throws -> EmbeddedPaymentElement {
 // ...
 var configuration = EmbeddedPaymentElement.Configuration()
 configuration.cardBrandAcceptance = .allowed(brands: [.visa, .mastercard])
 // ...
 }
}

Test your integration

Stripe provides a set of test card numbers that you can use to test your checkout flow and verify that the Mobile Payment Element accepts or blocks your desired card brands.

Last verified 2026-09-25

Is this helpful?