#mrdatabase-checkout-metadata
1 messages · Page 1 of 1 (latest)
Can you share an example reqeust where it's not correctly setting the metadata?
Sure
Create payment intent
payment_intent = stripe.PaymentIntent.create(
amount=final_total_price,
currency='gbp',
payment_method_types=['card'],
customer=get_webshop_customer_data[0]['stripe_customer_id'],
payment_method=default_payment_method,
off_session=True,
confirm=True,
stripe_account=get_business_data[0]['connect_id'],
metadata={
"unique_sale_id": unique_sale_id,
"online_sale": "1"
}
)
No, I need an example request ID or a Payment Intent ID where you're not seeing hte metadata being set
yup that works!
That Payment Intent is being created through a Checkout Session - If you want to set metadata on the Payment Intent created from a Checkout Session you need to be setting 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.
mrdatabase-checkout-metadata