Last updated: 30 October 2025 | Change log
Validate your customer's CVC before processing it.
The validation does not check if your customer's CVC are correct. The validation only checks the format of the entered CVC.
- you have added the 
AccessCheckoutSDKto your project as a Cocoapods dependency - you have added an 
import AccessCheckoutSDKat the top of your swift file 
The four basic components for this integration are as follows:
- Your AccessCheckoutUITextField for the CVC
 - An 
AccessCheckoutCvcOnlyValidationDelegateis designed to receive events pertaining to validation - An instance of 
CvcOnlyValidationConfigcontains all the information required for the initialization of the validation flow, including references to the view component to enable validation for - An 
AccessCheckoutValidationInitialiseris responsible for initializing the validation flow 
You can see an example of the CVC validation integration here.
To display your checkout form, you must create your layout first using your storyboard.
Here's an example of how you would reference your UI components using unique identifiers.
import AccessCheckoutSDK
class ViewController: UIViewController {
  @IBOutlet weak var cvcAccessCheckoutView: AccessCheckoutUITextField!
  ...This ensures you are notified of validation events.
extension ViewController: AccessCheckoutCvcOnlyValidationDelegate {
  // This event handler is notified when the CVC becomes valid or invalid
    func cvcValidChanged(isValid: Bool) {
      // You might want to change the text color
        cvcAccessCheckoutView.textColor = isValid ? nil : UIColor.red
        
        if !valid {
            // You might want to disable a submit button which would normally be clicked on when all fields are valid
            submitButton.isEnabled = false
        }
    }
    
    // This is complimentary to cvcValidChanged() and is notified only when the CVC is valid
    func validationSuccess() {
        // You might want to enable a submit button
        submitButton.isEnabled = true
   }
}Here's an example.
We recommend to do this in the viewDidLoad() handler of your UIViewController.
override func viewDidLoad() {
    ...
    let validationConfig = try! CvcOnlyValidationConfig.builder()
                                    .cvc(cvcAccessCheckoutView)
                                    .validationDelegate(self)
                                    .build()
    AccessCheckoutValidationInitialiser().initialise(validationConfig)
}Once validation is in place you can request sessions to implement your payment flow.
Next steps