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.

Checksum

Hash the payment amount and customer details so they cannot be changed in the browser.

Last updated 13 September 2026

Introduction

When the customer pays from your frontend, include a payload_hash field. The hash is a SHA256 value of details that must not change, such as the amount. Flutterwave hashes the same details and compares the result with the value you sent.

Where to send the hash

Pass payload_hash on Inline, Checkout, and HTML Checkout requests.

To generate the hash, follow these steps:

  1. Retrieve the transaction data (amount, currency, customer_email, and tx_ref).
  2. Create a SHA256 value of your secret key.
  3. Concatenate the values of your transaction data and your hashed secret key in this exact order, with no separators.
  4. Generate a SHA256 hash of the concatenated string in step 3.
  5. Add the generated hash from Step 4 to the payload_hash field of the checkout object, and then render the checkout page.
  6. Prompt your user to complete the payment.
  7. After completing the payment, verify the transaction as you normally would before providing value to the user.
Tip

When generating a hash, make sure to use a secure backend server that utilizes your secret key. Do not fetch the data from the request body of your HTTP request. Instead, fetch it from a secure datastore.

Request with payload hash

Below is an example of how to generate and send a payload_hash using NodeJs and Python.

Javascript

1
2
3
4
5
6
7
8
const getDataForHash  = (reference_number) => {
// Retrieve data [customer_email, tx_ref, currency, amount] from your preferred data store using a reference number or identifier of your choice.
}
const hashedSecretKey = crypto.createHash("sha256").update(process.env.FLW_SEC_KEY, 'utf8').digest("hex");
const StringToBeHashed = amount + currency + customer_email + tx_ref + hashedSecretKey;
const payload_hash = crypto.createHash("sha256").update(StringToBeHashed, 'utf8').digest("hex");

console.log(payload_hash);

If any value in the payload is tampered with, causing it to be inconsistent with the generated hash, we will return an error message to the customer on the Flutterwave Checkout page once the payment is submitted.

Illustration

Before updating your customers' account value, make sure to verify the payment details by comparing the amount, currency, and reference on both receipts.



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