Skip to main content
With our card reader solution you can accept mobile in-person payments using a card reader as the payment interface, and process these payments on the Adyen payments platform. The card reader is connected with an iOS mobile device through Bluetooth, or through USB using a dock. On the iOS mobile device, payment requests are initiated from a POS app. On the card reader, the customer can tap, insert, or swipe their card, or use a digital wallet like Apple Pay.

Requirements

Before you begin, take into account the following requirements, limitations, and preparations.

How it works

Tutorial and app
Hit the ground running with our integration tutorial and iOS sample app.
To build a card reader solution:
  1. Add the iOS Mobile SDK to your project, using basic authentication. Note that for compatibility with Objective C, you need to prefix the public symbols with ADY.
  2. Implement a server-to-server API request to establish a secure communication session.
  3. In your POS app, enable the transaction functionality of the SDK.
  4. From your POS app, call the warm-up function to speed up initiating transactions.
  5. In your POS app, add permissions for pairing the mobile device with the card reader.
  6. Get an entitlement from Apple to suppress Apple Pay in your iOS POS app when your app is in the foreground. Configure your Xcode project accordingly.
  7. Optionally, you can configure the Mobile SDK to avoid reconnection delays between the card reader and the mobile device.
  8. You enable the device management screens built into the Mobile SDK or build a custom UI for device management.
  9. In your POS app, implement handling payments using the SDK.
    This creates the following flow:
    1. Your iOS POS app creates a Terminal API payment request, or receives a Terminal API payment request from your backend.
    2. The POS app passes the payment request to the iOS Mobile SDK.
    3. The SDK passes the request to the Tap to Pay on iPhone component.
    4. When the customer completes the payment by tapping their card or mobile device on the iPhone, the SDK passes the Terminal API payment response to the POS app.
  10. In your POS app, implement handling refunds and diagnosing the state of the SDK.
  11. If the same device will be used at multiple locations, implement clearing the communication session.

1. Add the SDK to your project

You can add the iOS Mobile SDK to your POS app using a Swift Package Manager remote package. To get access you need to have a basic authentication credential. You can share the basic authentication password with anybody in your team who needs to get the SDK or create multiple passwords for internal use. Do not share this password in any publicly accessible code or area where unauthorized users can find it. To add the iOS Mobile SDK to your project:
  1. In your Customer Area create a basic authentication credential with a password:
    1. Go to Developers > API credentials, and select Create new credential.
    2. Under Payments > Credential type select Web service user and then select Create credential.
    3. Under Server settings > Authentication select the Basic auth tab and then select Generate password.
    4. Select the copy icon **and save your basic authentication password in a secure location.
    5. Go to Permissions > Roles > POS, select Allow SDK download for POS developers, and deselect any other permissions and roles. Contact Support Team if you don’t see the Allow SDK download for POS developers role.
    6. Select Save changes.
  2. Save the basic authentication password in a .netrc file:
    1. Check if you already have a .netrc file in your home directory. If you do not have it, create a plain text file with that name in your home directory (~/.netrc).
    2. Add the following content to your .netrc file, where login is the API credential username, for example ws_12345@Company.[YourCompanyAccount], and password is the basic authentication password.
    .netrc content for TEST integration
    1. Make sure that the .netrc file has the following file system permission: 0600.
  3. Add the POS Mobile SDK as a package dependency to your Xcode project: It is not possible to use TEST and LIVE environments from a single app target. You need to setup your Xcode project to have separate app targets for Test and for Live. Each target needs to link to the respective AdyenPOS SDK version for its environment: AdyenPOSTest and AdyenPOSLive.
    1. In your Xcode project or workspace, go to File > Add Package Dependencies.
    2. Enter the URL https://github.com/Adyen/adyen-pos-mobile-ios-test and select your preferred Dependency Rule.
    3. Select Add Package, and after the SDK is loaded add AdyenPOSTEST to your app target that connects to the Adyen test environment.
    4. Select Add Package.
  4. In your code, add import AdyenPOS, or for Objective-C compatibility add #import "ADYPOS/ADYPOS.h".

Compatibility with Objective-C

If your POS app requires the iOS Mobile SDK to be compatible with Objective-C:
  • Link the ADYPOSTEST package product to your app target instead of AdyenPOSTEST.
  • Link the ADYPOSLIVE package product to your app target instead of AdyenPOSLIVE. It is not possible to use TEST and LIVE environments from a single app target. Each app target must connect to a specific environment.
The integration process is the same. The only difference is that the public symbols are prefixed with ADY. For example, PaymentService is called ADYPaymentService.

2. Establish a session

To ensure the Mobile SDK and the Adyen payments platform can collaborate in a secure way, you need to implement a server-to-server API request for establishing a communication session. Authentication flow To authenticate this API request, you need to have an Adyen API credential in your test Customer Area. This credential must have an API key with the following role:
  • Checkout webservice role. This role is assigned by default when the API key is created.
The credential also needs to have a client key. **

Create a client key

If you want to use an existing API credential that does not have a client key yet, create a client key as follows:
  1. Log in to your Customer Area.
  2. Go to Developers > API credentials, and select the credential username for your integration, for example ws@Company.****[YourCompanyAccount].
  3. Under Client settings > Authentication select the Client key tab.
  4. Select Generate client key.
  5. Select Save changes. The client key is part of the setup but is not used later on. Therefore, you do not need to specify allowed origins, and you do not need to save the client key in your system.

Implement the request

To establish a communication session:
  1. From your backend, make a POST request to the applicable test or regional /auth/certificate endpoint, specifying: The subMerchantData object includes the following parameters:
If you are not a registered payment facilitator, the /auth/certificate request to establish a communication session must include the store parameter, unless your account structure does not have stores and instead uses merchant accounts as stores.If previously you have used /checkout/possdk/v68/session test and live endpoints, we recommend you migrate to new endpoints./auth/certificate request with store to process payments for