- iOS 15
- Xcode 16
- Swift 6
For detailed integration steps, refer to our
official documentation
🔐 3DS authentication can be enabled by setting it to true
during Configuration
initialization.
threeDS: .init(enabled: true, attemptN3D: true)
attemptN3D You can choose to automatically downgrade your payment to a non-3DS payment if there are any technical issues during the 3DS authentication process that would otherwise cause the payment to fail. To do this, set the attemptN3D field in your request to true and we'll automatically attempt to process the payment without 3DS authentication More info
↗️
Swift Package Manager
If you've never used it before, get started with Apple's step by step guide into adding package dependencies
-
After cloning the repository, navigate to
SampleApplication/SampleApplication/Configuration
. You will find the following files:-
env-example.xcconfig
: A template file containing dummy environment variables, which is tracked in source control. -
EnvironmentVars.stencil
: A code generation template used by Sourcery↗️
-
-
Open a terminal and navigate to the repository’s root folder:
cd path/to/repository
-
Run the initialization script:
bash .github/scripts/init-env-vars.sh
-
Locate the newly created
env.xcconfig
file (excluded from version control) and update it with your Checkout.com public and private keys. -
Generate the required Swift environment variables:
bash .github/scripts/codegen-env-vars.sh
-
This script will generate
EnvironmentVars.generated.swift
, which will be used in the project. -
Open the Sample Application in Xcode and run it.
-
After completing the setup, your configuration files should resemble the structure shown below:
⚠️ Important
The secret key is embedded in the Sample Application only for demonstration purposes. Never include a secret key in your production application. Instead, always use your backend API to generate a payment session securely.
Ensure the Sample Application includes the NetworkClient
package dependency:
- Repository: NetworkClient-iOS
↗️ - Branch:
main
Find our CHANGELOG