Encryption
Encrypt sensitive payloads (card details, OTP) for direct charge requests.
When using Direct Charge to send sensitive information, encrypt the payload with your encryption key from Settings > API using the 3DES algorithm. Encode the encrypted data in base64 before sending.
What to encrypt
Encrypt sensitive fields such as card details or OTPs. Include the requestID returned when you initiated the transaction:
{
"requestID": "13434jjfhd8ududfy82e324234234jkhjsfhdfhskdjfh89fjhduohdfjhsgkdfksjdfskldhfkjs",
"otp": "1234"
}Sample encrypted payload wrapper
After encryption, wrap the encrypted string in client:
{
"client": "<base64_encrypted_payload>"
}Encrypt helper (multi-language)
Below are language-specific examples to:
- Serialize the payload to JSON
- Encrypt with 3DES using your encryption key
- Base64-encode the result