Codeigniter Snippet to save webhook payload to dB and update wallet field of user table

Please I need a very simple logic to read webhook notification payload, save the different parameters to dB and update user wallet field. The language is codeigniter. Thanks

HI @echelon_umeh

Thank you for choosing Flutterwave.

My name is Abraham and i would be helping you today.

You need to expose a route to receive notification on a payment event. hooks are sent as POST requests. More information regarding Webhooks can be found here. You can also look into using our PHP SDK


please how can i access the metadata from flutterwave payload in my code? the documentation does not show how to make use of metadata.

Hi @desphixs

you can add metadata to your payload using the snippet below

    meta: {
      consumer_name: John Doe,
      consumer_id: "92a3-912ba-1192a",

please also note that the metadata is returned on verifying the transaction and not the webhook sent.