#Ken Wong-metadata

1 messages · Page 1 of 1 (latest)

lusty flax
leaden flint
#

correct.

#

i was digging why my response didn't have the metadata field.

lusty flax
#

Ahhh gotcha - I thought you were just asking about metadat in general

#

Do you have a request I can take a look at?

leaden flint
#

sure. let me get any random pi id for you

#

pi_3JsEnuATJTe4UrFz0tnzJogs

#

i looked at the data dictionary.. after livemode, it's next_action

lusty flax
#

So that payment intent was created as part of a checkout session and I don't see any metadata passed in when the Checkout Session was created - is that intentional?

leaden flint
#

i see the metadata field for charges too, so that's cool, but i guess the sources never bothered to pass anything in.

#

i'm not sure of the intentional part

#

because our team is separated by an ocean and 6 hours apart, it's difficult to get coding answers on what gets sent when it seems prudent to include information than to devise something ourselves to store a key that keys back to something in our system the customer is trying to pay for.

#

that metadata field is intended to store anything in JSON format, correct?

#

since i never see the stripe dashboard (our clients like it a lot) - is there a place that shows the metadata?

#

just want to cover that angle too.

lusty flax
#

our metadata field is just intended to store a series of key/value pairs - if you'd like it to specifically store a json formatted string that's totally fine, but it's not required

#

The metadata should also be displayed on the dashboard

#

and to clarify what I said earlier, if you want metadata to be passed down to the Payment Intent that is created as part of a Checkout Session, you should make sure you set payment_intent_data.metadata in your Checkout Session creation request (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata). I didn't see it in the request for pi_3JsEnuATJTe4UrFz0tnzJogs, so I wanted to specifically call that out

leaden flint
#

ok.

#

i will take note of this.

#

so that example i gave you... did we create a session?

lusty flax
#

Yup, the example Payment Intent you gave was created with a Checkout Session, and payment_intent_data.metadata wasn't set in the request so it's expected behavior that there's not metadata for it

leaden flint
#

i see

#

ok.

#

I'll do the needful on our side. there's a pile of keys to include that's meaningless if stolen, but would be helpful if something goes wrong on our side and we need to reconstruct the payment for posting.

#

thank you for all your help, as always