#Zhi - checkout
1 messages · Page 1 of 1 (latest)
I don't use stripe to create product, instead I am dynamically pass in line items.
First I have a page to ask customer to choose the product, then create a checkout session to get payment. After redirect back successful-url, how can I link the paymentIntent with our own order?
You can still dynamically pass in line items: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data. I recommend using webhooks to get notified of successful payment and link the order: https://stripe.com/docs/webhooks. You could set metadata on the session object: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-metadata or payment intent object: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata to link. I also recommend setting the customer object to link.https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
got it, thank you very much