Skip to main content
This page explains how to add cards to your existing iOS Components integration.

Requirements

Select the server-side flow that your integration uses:

API reference

You do not need to send additional fields for cards. To see optional fields that you can send for all payment methods, choose the endpoint you integrated: You can send additional fields for specific use cases. For example showing debit and credit cards separately and storing payment details.

Component configuration

Optional configuration

If your integration uses iOS Components v5.0.0 or later, you can optionally include the following when you configure the Component:

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 and Finland, many shoppers use combo cards that can make both debit or credit transactions. If you use separate forms for Debit Card and Credit Card the shopper can 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.
Choose which server-side flow your integration uses:
When you make a /sessions request from your server, include:The following example shows how to do this for a shopper in the Netherlands, making a EUR 47.00 payment./sessions request

Combo cards

For debit transactions, we highly recommend using 3D Secure and automatic capture due to some issuers’ restrictions.

Sweden

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-badged cards

Co-badged cards are rendered by the Component according to the co-badged card regulations for the applicable regions. This means that Components renders all supported brands, and allows the cardholder to choose their preferred brand.

Recurring payments

Cards support tokenization for one-click, subscription, and unscheduled card-on-file payments. Refer to Create tokens to integrate with our tokenization feature. We strongly recommend that you ask explicit permission from the shopper if you intend to make future recurring payments. Being transparent about the payment schedule and the charged amount reduces the risk of chargebacks. Choose which server-side flow your integration uses:
Supported from Components v5.0.0 and later.

Store card details

Refer to Create tokens to create a card token. You do not need to include any additional parameters for cards.Create a token for one-click payments
When a token is created, you receive a recurring.token.created webhook.

Checkout API v69 or earlier

When creating a token for cards using Checkout API v69 or earlier:
  • Use the enableStoreDetails configuration to show a checkbox for your shopper to choose to store their card details.

Make a one-click payment

Make a one-click payment using standard tokenization parameters. You do not need to include any additional parameters for cards.Make a one-click payment

Store card details

When creating a token for cards:
  • Use the standard tokenization parameters in your payment request. You do not need to include any additional parameters for cards.
  • Make sure that showsStorePaymentMethodField is set to true when adding the Card Component. This shows a checkbox for your shopper to choose to store their card details.
    When the shopper selects the checkbox to save their card details when making a payment, the didSubmit method from the Component will include the data.storePaymentMethod that you need for your payment request. Create a token for one-click payments

    curl

    Java

    PHP

    C#

    NodeJS (JavaScript)

    Go

    Python

    Ruby

    NodeJS (TypeScript)

When a token is created, you receive a recurring.token.created webhook. The webhook contains the storedPaymentMethodId that you can use to make subsequent payments using the stored payment details.

Show stored cards

To add available stored cards in your payment form:
  1. In your /paymentMethods request, include the shopperReference that you specified when creating the token to receive the stored payment details for the shopper.
  2. When you decode the /paymentMethods response, find the StoredCardPaymentMethod object in the stored array.
  3. When adding the Card Component, set paymentMethod to the StoredCardPaymentMethod object.

Make a one-click payment

Make a one-click payment using standard tokenization parameters. You do not need to include any additional parameters for cards. Make a one-click payment with a card token

Make a subscription payment

Make a subscription payment using standard tokenization parameters. You do not need to include any additional parameters for cards. Make a subscription payment with a card token

Make an unscheduled card-on-file payment

Make an unscheduled card-on-file payment using standard tokenization parameters. You do not need to include any additional parameters for cards. Make an unscheduled card-on-file payment with a card token

Accepting credit card installments

If you want to accept credit card installments, include in the /sessions request, include the installmentOptions object which includes the following fields:

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:
  1. Test your integration using our test card numbers. You can check the status of test payments in your Customer Area > Transactions > Payments.
  2. Add the cards that you want to accept in your live Customer Area.
  3. 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.

See also