After a charge is completed successfully, you should verify that the payment was successful with Flutterwave before giving value to your customers in your application. This serves as a failsafe, ensuring that the details of the payment is as expected. Here are some important things to check for when verifying the payment:Documentation Index
Fetch the complete documentation index at: https://flutterwaveinc.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Verify that the transaction reference matches the one you generated
- Verify that the status of the transaction is
successful. - Verify that the currency of the payment is as expected.
- Verify if the amount paid is greater or equal to the amount you expect. If the amount was greater, you can give the customer value and refund the rest.
data.id field that’s present in the response you get after creating a transaction and in the webhook payload you will receive for the transaction.
Here is an example of how you would verify a transaction in some of our backend SDKs.
data object. For instance:
-
The status of the transaction is in the
data.status. -
The details of the customer are in the
data.customerfield. -
The
data.charged_amountfield says how much the customer was charged whiledata.amount_settledtells you how much you will be receiving from the transaction.
card object will only be present for card transactions.