#Webhook & subscriptions metadata behaviour

1 messages ยท Page 1 of 1 (latest)

shadow lantern
#

Hi all ๐Ÿ‘‹

I'm using Mollie with .NET for subscriptions and I currently have a system where it charges the user โ‚ฌ0.00 for a mandate and then later creates a subscription with the new mandate, I'm using metadata on the subscription create and payment request to try and keep track of specific subscription data users have (whether its annual, what plan is it, etc.) and I was curious as to whether metadata set on subscriptions persists across future payments?

Thanks!

hasty trench
#

Hi! Good evening ๐Ÿ˜„

It's important to know that the metadata of a subscription will not be "forwarded" to the payment. If you need the metadata of the subscription, once you receive the webhook of the payment, then you should fetch the subscription at that time (using the subscriptionId on the payment object) to check the metadata.

shadow lantern
#

Ah I see, so setting the metadata on the subscription when creating it and then getting the subscription on the webhook will return the metadata. Great, thanks and have a good evening!