#moanie-checkout-metadata
1 messages · Page 1 of 1 (latest)
Hello, do you have an example id of a checkout session (cs_123) or the request for its creation (req_123) where you saw this behavior?
Thank you
It looks like that Session has metadata on it. Are you saying you want the metadata on the related PaymentIntent?
Then you will want to set that as payment_intent_data.metadata https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Try that out and let me know if it helps
You will need to modify that call slightly. One moment.
success_url=config.PAYMENT_SUCCESS_URL,
cancel_url=config.PAYMENT_CANCEL_URL,
payment_method_types=["card"],
line_items=[
{
"price": price_id,
"quantity": 1,
},
],
mode="payment",
metadata={"discord:user_id": user_id},
payment_intent_data={
'metadata': {
"discord:user_id": user_id
},
})```
Try that
Note the payment_intent_data param that contains another metadata param
Because data isn't copied we give you a way to tell us what to set the metadata to