To secure payment on the client side, include a field calledDocumentation Index
Fetch the complete documentation index at: https://flutterwaveinc.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
payload_hash in your request with a hashed value.
This hash is created by encrypting some immutable values in your request. We will then compute the hash values at runtime and compare them with the value from your request to ensure your payment is indeed secure.
If you are making payments using any of the integration methods like Inline, Standard, or HTML Checkout, ensure you pass in the hash value in all your requests.
- Retrieve the transaction data (
amount,currency,customer_email, andtx_ref). - Create a SHA256 value of your secret key.
- Concatenate the values of your transaction data and your hashed secret key in this exact order, with no separators.
- Generate a SHA256 hash of the concatenated string in step 3.
- Add the generated hash from Step 4 to the
payload_hashfield of the checkout object, and then render the checkout page. - Prompt your user to complete the payment.
- After completing the payment, verify the transaction as you normally would before providing value to the user.
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 apayload_hash using NodeJs and Python.
Full Request
