#vibhav-charge-metadata

1 messages · Page 1 of 1 (latest)

willow basin
#

Hey! Depends what you mean by 'complex'? Are you running into a specific limitation?

#

Have you tested out what you'd like to do?

twilit fiber
#

so i am passing a value like this:

#

{

#

{"data": {"key1": "value1", "key2": "value2"}} something like this

willow basin
#

Yep, that should work:

You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long.
https://stripe.com/docs/api/metadata

twilit fiber
#

I think i am not clear here

#

let me give something else

#

{
...data,
metadata: {
name: 'vibhav',
address: {
city: 'bangalore',
country: 'india'
}
}
}

#

ll this work?

willow basin
#

No, you can't have nested fields. They need to be top level:

metadata: {
  name: 'vibhav',
  address_city: 'bangalore',
  address_country: 'india'
}
twilit fiber
#

Great thanks

#

👍

willow basin
#

Np!