3D Secure is a card industry authentication protocol for online payments, providing an extra layer of security for merchants selling online. Customers are sent through the card issuing bank's verification service when making a payment, before proceeding with the authorization request.


Ensure you follow the steps below to enable your Universal Checkout integration to leverage 3DS:

Contact your Primer representative to configure 3DS on your Primer account.
Setup a workflow with 3DS on your Dashboard.


With CocoaPods

  • Modify your Podfile like so:
source 'https://github.com/CocoaPods/Specs.git'source 'https://github.com/primer-io/primer-podspecs.git' use_frameworks! target 'PrimerSDK_Example' do  pod 'PrimerSDK'  pod 'Primer3DS'    // ...end

Then run pod install to install Primer3DS on your workspace!

With Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into Xcode. In order to add PrimerSDK with Swift Package Manager;

  1. 1
  2. Select your project, and then navigate to Package Dependencies
  3. 2
  4. Click on the + button at the bottom-left of the Packages section
  5. 3
  6. Paste https://github.com/primer-io/primer-sdk-3ds-ios into the Search Bar
  7. 4
  8. Press Add Package
  9. 5
  10. Let Xcode download the package and set everything up

Adding Primer 3DS


If Primer3DS is not installed, 3DS will fail. In the case of a 3DS triggered by the workflow, the primerDidFailWithError functions will be called.

If you notice a console warning "Failed to import Primer3DS" on the SDK initialization, go to Scheme settings and select Manual order.


Up Next