Introduction
The Mobile Checkout SDK allows you to accept card payments and payments via Apple Pay directly in a native iOS app. The library ensures secure card data entry, protects the data during processing, and communicates with the Comgate payment gateway, including full support for 3D Secure authentication.
Features
- Card payments - secure entry of card number, expiry date, and CVV/CVC code using Secure Fields components
- Apple Pay - integrated button with automatic availability check and payment token processing
- 3D Secure - complete support for 3DS authentication, including the challenge screen with fully customizable appearance
- Card data protection - sensitive data never leaves the library in unprotected form
- Validation - automatic input validation (Luhn card number check, expiry validation, CVV length)
- Card network detection - automatic card brand recognition (Visa, Mastercard) with corresponding formatting
Security model
The library is designed so that the host application never has access to unprotected card data:
- Input fields (
SecurePanField,SecureExpiryField,SecureCvvField) handle sensitive data in protected mode and securely clear it after use - Data and transport protection are handled internally by the library and do not need to be implemented manually in the application
Supported card networks
| Card network | PAN lengths | CVV length |
|---|---|---|
| Visa | 16, 19 | 3 |
| Mastercard | 16 | 3 |
Requirements
| Requirement | Value |
|---|---|
| Minimum iOS version | 15.0 |
| Swift | 5.9+ |
| Xcode | 15+ |
| Distribution | Swift Package Manager |
Information
To use the Mobile Checkout SDK, you must have Checkout API activated in the Comgate client portal and have a checkoutId value available. The activation process is described in Activate Checkout API.