Consumer Level Lending

Card Object

Refered from Bank card payment method type.

object
primary
boolean

Defines if this is the account primary payment method

required
name
string

Name as it appears on the card

required
pan
string

Payment card number

required
panEncryptionMethod
object

Encryption method identifies which encryption method to use encoding or decoding referred information.

Code Name Instructions
101 Raw No encryption
102 AES-256-CFB Content is encrypted using SSL library
103 Tokenization Service Content is tokenized using front-end JavaScript library

102

First, set up your encryption key. The encryption key is the SHA1 value of your API access token.

Then, acquire the initialisation vector length by subtracting the MD5 checksum of your encryption key by the length of the “AES-256-CFB” SSL cipher initialisation vector length.

Then, assign a password element by hashing your encryption key using the Adler32 algorithm.

Once you have the initialisation vector and password elements generated, request the SSL encryption by providing the raw data as your source, the “AES-256-CFB” as your method, the password and the initialisation vector.

PHP example

function encode($content, $apiAccessKey)
{
	$encryptionKey = SHA1($apiAccessKey);
	$iv = substr(md5($encryptionKey), 0, openssl_cipher_iv_length('AES-256-CFB'));
	return openssl_encrypt($content, 'AES-256-CFB', hash('adler32', $encryptionKey), false, $iv);
}

103

Include our tokenization service library into your source code by adding script tag to your page:

<script type="text/javascript" src="https://s3.eu-west-2.amazonaws.com/onboarding-api/lib/js/card-tokenizer.min.js"></script>

Call it once you acquire full card pan from the customer as follows:

const rawPanValue = '1234123443214321';
const tokenizedValue = tokenizeService(rawPanValue);
expiry
object
required