Anyway to attach custom metadata to a user's payment

  • 17 January 2022
  • 4 replies

Badge +4

We need to add some metadata (key-values) to user’s payments. As an example, we’d like to send workspaceId and other key-value parameters along with a payment that user is creating.

I understand that there is a Subscriber attributes which offers capturing custom metadata on the user object, however what we need is to attach metadata to individual payments and not users.

Anyway to acheive this functionality with RevenueCat APIs?


Best answer by sundeep 21 January 2022, 22:18

View original

4 replies

Badge +3

is there any update with this issue team? 

i also facing the same case, i need to send custom metadata when purchasing item, so i can receive the metadata on webhook

Badge +2

Any update on this? We also need to pass custom metadata attached to a payment we can retrieve in the webhook

Userlevel 3
Badge +8

This question was handled through our ticketing system, but posting the response here for visibility:

Unfortunately, passing metadata along with a purchase is not a use case currently supported by RevenueCat, but we’ve added this as a feature request. As a workaround, if you're keeping app user IDs in your own database, you could make a call to your backend to update a column for that particular user.

Badge +1

I’m also wanting this. I honestly would have thought this would be a key feature for RevenueCat as it adds a layer on the purchases not possible with native implementations. 

A very real example is gifting another user. The gifter makes an IAP to buy a gift, and all it would need is some meta data of the giftee id or likewise  to have this all processed on the server safely via the web hook. Right now, my implementation looks like I have to setup an intent on our server, which then has to be looked up via some fingerprinting when the revenue cat event comes to the server (whilst the client can (and does) send info, handling drop outs, or app crashes etc could mean lose of finalisation if not done properly, so I’m left with relying on receipt data only which is unsuitable)

Given the apple server events go via rev cat, surely you can just add an optional meta property to the purchase option or a new purchase method, even if it’s limited to 256 characters, we could at least encrypt id’s and attach.

Be interested though if you have any docs on handling such a common payment feature in an app (gifting / tipping etc) using RevCat ;-)