Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseManaged Payments
Use Payment Links
Build a checkout page
Build an advanced integration
Build an in-app integration
    Overview
    Payment Sheet
    Embedded Payment Element
      Accept in-app payments
      Customize look and feel
      Add custom payment methods
      Filter card brands
    Link out for in-app purchases
    Collect addresses
    US and Canadian cards
Payment methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
In-app Elements
Payment scenarios
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Other Stripe products
Financial Connections
Crypto
Climate
HomePaymentsBuild an in-app integrationEmbedded Payment Element

Filter card brands

Choose which card brands to accept

Copy page

Use the Stripe Mobile Payment Element to control which card brands you accept. Card brand filtering lets you specify allowed or disallowed card brands for:

  • The credit card form in the Mobile Payment Element
  • The cards buyers can use with Apple Pay.

When you configure the Mobile Payment Element, 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.Configuration.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 Embedded 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:

@_spi(EmbeddedPaymentElementPrivateBeta) 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.

The Mobile Payment Element when a card brand is disallowed
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc