On this page, you can find additional configuration for adding cards to your Components integration.
Before you begin
This page assumes you have already:
You don't need to send additional fields for cards. To see optional fields that you can send for all payment methods, choose the endpoint you integrated:
- /sessions: This is the default with Components v5.0.0 or later.
- /payments: If you implemented an additional use case.
If your integration uses iOS Components v5.0.0 or later, configure and create an instance of the cards Component:
//Create a payment method object for cards. let paymentMethod = paymentMethods.paymentMethod(ofType: cardComponentPaymentMethod.self) //Create a configuration object for the cards Component. var cardComponentConfiguration = cardComponent.Configuration() //Set additional parameters on the configuration object. cardComponentConfiguration.localizationParameters = //Optional custom localization parameters.
There is no required cards-specific integration for Components.
If your integration uses iOS Components v5.0.0 or later, you can optionally include the following when you configure the Component:
||Set to true to show the field for the cardholder name.||false|
||Set to false to hide the security code (CVV/CVC) field.||true|
||Array of supported card types that you recognize.||Values from
||Set to true to collect the shopper's billing address and mark the fields as required.||false|
||Sets which billing address fields to show in the payment form. Possible values:
- full: show all billing address fields.
- none: don't show billing address fields.
- postalCode: show only the postal code field.
||Array of allowed country codes for the billing address. For example,
||nil: all country codes are supported.|
||For Korean cards, sets if security fields show in the payment form. Possible values:
- show: show the fields.
- hide: don't show the fields.
- auto: the field appears for cards issued in South Korea.
||For Brazilian cards, sets if the CPF/CNPJ social security number field shows in the payment form. Possible values:
- show: show the field.
- hide: don't show the field.
- auto: the field appears based on the detected card number.
Showing debit and credit cards separately
Components can show separate payment forms for debit cards and credit cards. Here are example use cases for this feature:
- In Brazil, Mexico, and Finland, many shoppers use combo cards that can make both debit or credit transactions. Separate forms for Debit Card and Credit Card lets the shopper choose the type of transaction.
- To accept card payments in Sweden, local legislation requires you to show the debit card payment options before the credit card ones.
To comply with local legislation, set
countryCode to SE in your request. Components shows the payment form for Debit Card before the one for Credit Card.
Card brand recognition
When the shopper is entering their card details, Components tries to recognize the card brand. When successful, Components renders the brand icon and the corresponding input field for the card security code (CVC, CVV, or CID).
Co-branded cards are rendered by the Component according to the co-branded card regulations for the applicable regions. This means that Components renders all supported brands, and allows the cardholder to choose their preferred brand.
Stored card payments
Adyen's tokenization service allows you to securely store shopper's card details for payments. You first need to create a token.
Supported from Components v5.0.0 and later.
Creating a token
storedPaymentMethodMode parameter in your /sessions request. Possible values:
|disabled (default)||Don't store payment details.|
If you or the shopper chooses to store payment details, your instance of
AdyenSession creates a token when the shopper pays.
Making a payment with a token
When the shopper pays, your instance of
AdyenSession includes the shopper's stored card details. You can also use tokens to make shopper-not-present payments for subscriptions or contracts.
Accepting credit card installments
||An array of the number of installments that the shopper can choose.|
||The preselected number of installments in the payment form.|
||An array that shows the types of installment plans that the shopper can choose.
Possible values: regular and revolving.
If not included, the default is regular.
Test and go live
If your client-side integration isn't ready, you can test API requests with encrypted card details by adding a
test_ prefix to the test card details.
Before making live card payments:
Before you can start accepting card payments in the live environment, you need to assess your PCI DSS compliance and submit the required Self-Assessment Questionnaire A document.