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
      Accept in-app payments
      Add custom payment methods
      Customize look and feel
      Finalize payments on the server
      Save payment details during payment
      Set up future payments
      Filter card brands
    Embedded Payment Element
    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 integrationPayment Sheet

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 PaymentSheet.CardBrandCategory:

  • .Visa
  • .Mastercard
  • .Amex
  • .Discover

Note

The Discover value encompasses all of the cards in 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 steps in Accept in-app payments to integrate with the Mobile Payment Element.

Filter card brands

When you create PaymentSheet, 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 { useStripe } from '@stripe/stripe-react-native'; export default function CheckoutScreen() { const { initPaymentSheet } = useStripe(); const initializePaymentSheet = async () => { const { error } = await initPaymentSheet({ // ... other configuration options cardBrandAcceptance: { filter: PaymentSheet.CardBrandAcceptanceFilter.Allowed, brands: [PaymentSheet.CardBrandCategory.Visa, PaymentSheet.CardBrandCategory.Mastercard], }, }); if (error) { // handle error } }; }

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