Skip to content
No description, website, or topics provided.
Swift Ruby Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Simplify iOS SDK

Build Status

The iOS SDK by Simplify allows you to create a card token (one time use token representing card details) in your iOS app to send to a server to enable it to make a payment. By creating a card token, Simplify allows you to avoid sending card details to your server. The SDK can help with formatting and validating card information before the information is tokenized.


  • Swift 5 or higher


The iOS SDK can be manualy included in your project by downloading or cloning the SDK project and adding it as a subproject in your project.

If you would like to use Carthage to integrate the sdk into your project, you can do so with the following line in your cartfile.

github "simpliftcom/simplify-ios-sdk"


Import the SDK

Import the Simplify SDK into your project

import Simplify

Initialialize the SDK

In order to use the SDK, you must initialize the Simplify object with your public api key.

let simplify = Simplify(apiKey: <#your public api key#>)

Your public api key can be found and managed under "Account Settings" > "API Keys" on the Simplify website.

Create a Card Token

Once you have inititalized an instance of Simplify, you can then construct a SimplifyMap containing the card information and pass that to the createCardToken function to create a card token.

var card = SimplifyMap()
card.number.value = "<#card number#>"
card.cvc.value = "<#security code#>"
card.expMonth.value = "<#expiration month#>"
card.expYear.value = "<#expiration year#>"

simplify.createCardToken(card: card) { (result) in
    switch (result) {
    case .success(let cardToken):
        // do provide the CardToken to your server to process the payment
    case .failure(let error):
        // handle the error

Sample App

This project includes a sample app to demonstrate SDK usage. To configure the sample app, add your public key to the PaymentViewController in the project.

You can’t perform that action at this time.