iOS Client Side Encryption SDK
The iOS Client-Side Encryption (CSE) SDK is designed to securely encrypt card data directly on the client side, specifically on iOS devices. The encrypted data generated by the CSE can then be transferred to the Buckaroo API through your server.
Client Side Implementation
On the client side, you need to create a form where the consumer can enter their card details (such as card number, expiry date, CVC, and cardholder name). This data is then fed into the encrypt method. For cards that do not have a CVC code (like Maestro and Bancontact), you can provide an empty string for the CVC parameter. The SDK also includes validation functions to validate the consumer's input. You can find examples of how to use this SDK below.
Server Side Implementation
Once you have received the encrypted card data from the client, you can use it to create a Creditcard or Bancontact PayEncrypted (or AuthorizeEncrypted) request. Refer to the respective Creditcard or Bancontact documentation for details on making such requests. The process will continue as if the consumer entered their card data directly on our checkout page. Depending on the outcome, you will either receive a URL for 3DSecure authentication or a success/failure status for the transaction.
Next Steps
After conducting successful test transactions, you will need to complete the SAQ-A form from PCI. Once this is done, Buckaroo will enable Client-Side Encryption on your live channel.
Examples
Encrypt card data example
This code example shows how the Encrypt method can be used for card data.
do {
let encryptCardDataResult = try CSE.encrypt(cardNumber: "5386860000000000", year: "2020", month: "12", cvc: "123", cardholder: "A DE GROOT")
print("encryptedCardData: \(encryptCardDataResult)")
} catch {
print("encryptError: \(error)")
}
Encrypt security code example
This code example shows how the Encrypt method can be used for just the security code.
do {
let encryptCardDataResult = try CSE.encrypt(cvc: "123")
print("encryptedCardData: \(encryptCardDataResult)")
} catch {
print("encryptError: \(error)")
}
Updated 2 months ago