#andrew_rundoo-customer-metadata
1 messages · Page 1 of 1 (latest)
For context, I'd like to e.g. attach the ID of the customer in my database to the Stripe customer
In case it's helpful, here's the section of the docs: https://stripe.com/docs/api/customers/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
And here's the relevant type in Go: https://github.com/stripe/stripe-go/blob/2641d54f7804b895b0da83abc9a6aad05db23bcd/customer.go#L105-L149
Metadata isn't in CustomerParams - it's in the common Params struct which is meant to be used for properties that are common to all requests (see https://github.com/stripe/stripe-go/blob/6be0c4f6f5da607d7e6482d5925ee16c471aa6a6/params.go#L193)
You can see an example of how add metadata to your request here: https://stripe.com/docs/api/metadata?lang=go
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.