#unknowncat
1 messages · Page 1 of 1 (latest)
Hi there! PaymentIntents are more low level. Any logic to determine the amount should be done prior to creating the PaymentIntent.
If you're building a custom integration (and not using Stripe Checkout, Payment Links or Subscriptions), you'll need to have some client-side way for customers to select any number of products/prices, calculate how many they've chosen, and send this to your backend code. Your backend code would then calculate the amount based on what has been selected
Doing integration with Elements. So just charge an amount then and not sell this product for instance? prod_NPi1ItZHQRfl8e I don't see how a product id fits anywhere.
Technically, there's no need to create Products and Prices on Stripe if you're using Elements only. Any mapping from a PaymentIntent/charge to an underlying product would need to be done on your end
Products and Prices are only used for Stripe-hosted surfaces (e.g. Checkout, Billing, Links, etc.): https://stripe.com/docs/products-prices/how-products-and-prices-work