#karsh-pi-products

1 messages ยท Page 1 of 1 (latest)

ancient gazelle
#

Hey! Right now you can't pass product data/line items with Payment Intents. Just a flat amount value

distant slate
#

Hey thanks for the reply. So that means I'll just have to make my own logic parallel to the payment intent, am I right?

#

Or should I be using a different stripe flow

ancient gazelle
#

Are you using our Products/Prices APIs?

distant slate
#

(with my own logic I mean I simply send an array with the products being bought when submitting the payment form. Then save the id of that transaction (somehow?) so I can link the webhook back to that payment)

#

Hmm is that an or or question ๐Ÿ˜… ? I'm not sure to be honest

#

(using a low-code tool to integrate stripe, so I'm not coding everything from scratch)

ancient gazelle
#

Can you share a Payment Intent ID or something? I can check your account

distant slate
#

Sure hang on

#

req_go6q6ERwwOdfKZ
Does this work?

ancient gazelle
#

Yep, taking a look!

#

Seems like you just have your own product data elsewhere and you're calculating the amount value in your app?

distant slate
#

Hmm right now yes, but I literally just made an empty 'products' table. So I can consider to make them in stripe. Would that be helpful in my current situation?

ancient gazelle
#

You could use our Products and Prices APIs, but they aren't really compatible with Payment Intents right now. You'd instead use them with Checkout

distant slate
#

Oh okay in that case I think I got to stick with payment intents. As I want a custom check out flow

ancient gazelle
distant slate
#

Ahh that would be great. Looking at the link you sent me...
I can simply send something like
[customer_id: 503, productID_1: 53394, productID_2: 53233]

And then when I retrieve this webhook I know which customer bought + which products.

Correct?

ancient gazelle
#

Yep, exactly. Alternatively you could have an external orders object in your database that you create and use as a reference for the PaymentIntent

distant slate
#

That sounds interesting, could you expand on that a little bit? I don't grasp it completely yet

ancient gazelle
#

Some more work at your end but you'd create an order at checkout in your database which stores reference to the products, customer, etc. Then pass the ID of that object when creating the Payment Intent with Stripe as a reference

distant slate
#

Got it! Any advantage to that?

ancient gazelle
#

Well then you have an order history separate from Stripe

#

But this is really outside the remit of Stripe so it's up to you and your business! ๐Ÿ™‚

distant slate
#

Got it! Thanks, this should be enough to get me going ๐Ÿ™‚

ancient gazelle
#

Np!