Accéder directement au contenu
Créez un compte
ou
connecter-vous
Logo de la documentation Stripe
/
Ask AI
Créez un compte
Connectez-vous
Démarrer
Paiements
Automatisation des opérations financières
Plateformes et places de marché
Gestion de fonds
Outils de développement
Démarrer
Paiements
Automatisation des opérations financières
Démarrer
Paiements
Automatisation des opérations financières
Plateformes et places de marché
Gestion de fonds
Aperçu
À propos des paiements Stripe
Mettre votre intégration à niveau
Analyses des paiements
Paiements en ligne
PrésentationTrouver votre cas d'usageManaged Payments
Utiliser Payment Links
Créer une page de paiement
Développer une intégration avancée
Développer une intégration dans l'application
    Présentation
    Payment Sheet
    Composant Payment Element intégré
      Accepter des paiements dans l'application
      Personnaliser l'apparence
      Ajouter des moyens de paiement personnalisés
      Filtrer par marque de carte bancaire
    Link out for in-app purchases
    Collecter les adresses
    Cartes bancaires américaines et canadiennes
Moyens de paiement
Ajouter des moyens de paiement
Gérer les moyens de paiement
Paiement accéléré avec Link
Interfaces de paiement
Payment Links
Checkout
Web Elements
Elements intégrés à l'application
Scénarios de paiement
Tunnels de paiement personnalisés
Acquisition flexible
Orchestration
Paiements par TPE
Terminal
Autres produits Stripe
Financial Connections
Cryptomonnaies
Climate
AccueilPaiementsBuild an in-app integrationEmbedded Payment Element

Remarque

Cette page n'est pas encore disponible dans cette langue. Nous faisons tout notre possible pour proposer notre documentation dans davantage de langues et nous vous fournirons la version traduite dès qu'elle sera disponible.

Filter card brands

Choose which card brands to accept

Copier la 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

Remarque

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.

Avant de commencer

  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
Cette page vous a-t-elle été utile ?
OuiNon
Besoin d'aide ? Contactez le service Support.
Rejoignez notre programme d'accès anticipé.
Consultez notre log des modifications.
Des questions ? Contactez l'équipe commerciale.
LLM ? Lire llms.txt.
Propulsé par Markdoc