#DaanVDH
1 messages ยท Page 1 of 1 (latest)
Hi ๐ I don't readily recognize those names, so I'm suspecting you may be referring to storing non-Stripe data that is relevant to your flows, in which case metadata is what you're looking for:
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-metadata
https://stripe.com/docs/api/metadata
But please let me know if it seems I've misunderstood your ask.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yeah I'm referring to my own application data
so MetaData is the way to go?
type Params struct {
Metadata map[string]string `form:"metadata"`
``` I'm guessing this is what you are referring to right?
Yup, metadata is perfect for that. It allows you to store up to 50 key/value pairs on Stripe objects. The key thing to note about it, is that metadata values typically don't transfer from one object to another, so you need to be consistent with the type of object that you use when adding/referencing it.
Alright, I'm just setting it as a map of strings in the go driver like this:
Params: stripe.Params{Metadata: map[string]string{"orderId": o.OrderId.String()}},
Did you reference the code snippet shown in the metadata section that I linked to earlier? It shows how to leverage AddMetadata() for this.
Ahhh, yeah i see now. Thanks
Any time!
Follow up question, what parameters can I use to set the transaction name/message/reference?
I'm not sure what you're referring to by name/message/reference, could you elaborate?
I mean the recipient that is shown on the charge in your banking app and the message for like in an iDeal transaction.
Statement Descriptors are the part that influence what shows on customers statements (I intentionally used "influence" rather than "control" because some banks will make their own modifications to the values provided)
https://stripe.com/docs/account/statement-descriptors
Ahh i see, thanks!
Happy to help!