AI agents: this site is available as Markdown at /llms.txt. Each page has a Markdown version at its URL with a .md suffix, and the full API is described in /api/v3/openapi.json.

Encryption

Encrypt card details before you call the direct card charge endpoint.

Last updated 13 September 2026

Introduction

When you call the direct card charge endpoint yourself, encrypt the card details before you send the request.

Please Note

You do not need to encrypt the payload yourself if you use a backend SDK. Pass your encryption key when you set up the library, and it encrypts the payload before sending the request.

To encrypt your payload manually, you will need an encryption key from the Settings > API section of your dashboard. This uses the 3DES algorithm to encrypt the payload.

Below is an example of an encryption function in different languages. In each case, the function takes the payload as a hash, converts it to JSON, encrypts and encodes it in base64:

Javascript

1
2
3
4
5
6
7
8
9
10
11
12
13
function encrypt(encryptionKey, payload) {
    const text = JSON.stringify(payload);
    const forge = require("node-forge");
    const cipher = forge.cipher.createCipher(
        "3DES-ECB",
        forge.util.createBuffer(encryptionKey)
    );
    cipher.start({iv: ""});
    cipher.update(forge.util.createBuffer(text, "utf-8"));
    cipher.finish();
    const encrypted = cipher.output;
    return forge.util.encode64(encrypted.getBytes());
}


FL.AI

Answers from the Flutterwave docs

Hi, I’m FL.AI

Ask anything about Flutterwave’s APIs, guides and coverage.

FL.AI can make mistakes. Check important details in the docs.

Get API Keys