#marvi

1 messages · Page 1 of 1 (latest)

vernal shaleBOT
unborn scroll
#

No that is where you will get it with the API

grand nymph
#

Okay. If i want to pass metadata to the charge object do i have to create the charge like i create the checkout session?

unborn scroll
#

If you're using checkout sessions, you can pass metadata to the payment intent here: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata on creation. We don't copy metadata across API objects (with a couple exceptions). One of those exceptions is that we do a one-time copy of a payment intent's metadata to a charge when the payment intent is confirmed.

#

So when the customer pays, you should then see that metadata on the charge

#

(That assumes you are using checkout in "payment" mode though)

grand nymph
#

I'm not quite understaing the syntax, like how should i write it

vague depot
#
  'metadata': {
    'your_key': 'some_value'
  }
}```
grand nymph
#

Thanks