#unknowncat

1 messages · Page 1 of 1 (latest)

open oakBOT
worn agate
#

Hi there! PaymentIntents are more low level. Any logic to determine the amount should be done prior to creating the PaymentIntent.

gentle valve
#

Hi RoadRunner!

#

how to then tie the purchase to the product?

worn agate
#

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

gentle valve
#

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.

worn agate
#

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