#marvi
1 messages · Page 1 of 1 (latest)
No that is where you will get it with the API
Okay. If i want to pass metadata to the charge object do i have to create the charge like i create the checkout session?
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.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So when the customer pays, you should then see that metadata on the charge
(That assumes you are using checkout in "payment" mode though)
'metadata': {
'your_key': 'some_value'
}
}```
Thanks