#jessa2323
1 messages · Page 1 of 1 (latest)
Hi there! Not sure I follow the question. The payment_method.updated payload will be a PaymentMethod object. It's not possible for customers to add metadata to objects so the object you'll receive with this event won't contain any metadata.
to clarify, we want to programmatically add the metadata to the object, not have the customers add it
Right but I'm not sure I follow when that metadata would be added
if a customer changes a payment method on their subscription, is a new payment method object created, or is an existing payment method object updated?
Have you tested this out yet?
What you probably want to do is add metadata to the customer object. When you receive payment_method.updated , it'll include a customer ID as well. If you've stored some mapping file in your database that maps customers to websites, you can make a separate call to update this PaymentMethod's metadata to add the website details