Question

How to add custom meta-data to webhook after success purchasing?

  • 24 March 2023
  • 1 reply
  • 206 views

Badge +4

After i do purchasing using function : 

final result = await Purchases.purchaseProduct(  "skuID",  type: PurchaseType.inapp,);

after successing do payment, revenueCat will trigger webhook and retrieve data just like : https://www.revenuecat.com/docs/webhooks#events-format

 

what if i want to adding new key-value such as meta-data into webhook response

just like : 

{

key1: value1

. . .

meta-data: {

   recipe_id: id_recipe_1

  }

}

do you have any idea with this case team?


1 reply

Userlevel 5
Badge +9

Hello,

In this case I would recommend setting the metadata using subscriber attributes before making the purchase. That way you will get the subscriber attributes in the webhook event.

Reply