added support for metadata struct -- see https://stripe.com/blog/adding-context-with-metadata