Android Client-Side Encryption SDK
This SDK is used to encrypt card data on the client side. In this case on the iOS device itself. The crypted data that is created by CSE can be transferred to the Buckaroo API through you own server.
Client side
On the client side you have to make a form in which the consumer can enter its card data (like card number, expiry date, cvc and cardholder name). This data has to be fed to the ecrypt method (for cards that do not have a cvc code, like Maestro and Bancontact, you can provide the empty string) alongside with a function which sends the encrypted card data to the server side. We also have provided some validation functions to validate the consumer's input. You can find examples of how to use this SDK below.
Server side
With the received encrypted card data you can create a Creditcard or Bancontact PayEncrypted (or AuthorizeEncrypted) request (see respectively the Creditcard or Bancontact documentation on how to make such a request). After this request, the flow will continue like the consumer has entered its card data on our checkout, so we will return an URL when the consumer has to perform 3DSecure or we will return a success (or failed) status of the transaction.
Next steps
Once you have performed some successful test transactions you can fill out the SAQ-A from PCI and Buckaroo will enable Client Side Encryption on your live channel.
Download the SDK here:
Github - Buckaroo CSE SDK for Android
Encrypt card data example
This code example shows how the Encrypt method can be used for card data.
import nl.buckaroo.cse.CSE;
String encryptedData = CSE.encrypt("5386860000000000", "2020","12","123","A DE GROOT");
System.out.println("encryptedData: " + encryptedData);
Encrypt security code example
This code example shows how the Encrypt method can be used for just the security code.
import nl.buckaroo.cse.CSE;
String encryptedData = CSE.encrypt("123");
System.out.println("encryptedData: " + encryptedData);