#eloy-paymentintent-lineitems

1 messages · Page 1 of 1 (latest)

wintry pawnBOT
spark gulch
#

@untold ivy mostly that's impossible. PaymentIntent has no notion as an API about what is being bought at all.
You are likely using another product on top of it such as Checkout, Invoicing or Billing and that would have the right product information

#

eloy-paymentintent-lineitems

untold ivy
#

My intention is to distinguish the products so that I can handle them in my API, and the endpoint is when I receive the purchase confirmation for the product. Let's say I have 3 products in Stripe, where product 1 has id=1, product 2 has id=2, and product 3 has id=3. I need to save the id information in the database after the payment confirmation via 'payment.intent.succeeded.' However, as you mentioned, it cannot know, so who would I use beforehand to determine the product_id?

spark gulch
#

Can you explain if you are using another of Stripe products? Like do you use Checkout or Invoices or Subscriptions?

wintry pawnBOT
faint reef
#

Hi @untold ivy I'm taking over this thread

#

You can attach the product ID as a metadata to the PaymentIntent, so that you can retrieve the same when handling payment_intent.suceeded events

untold ivy
#

Ah, understood. So, I do this when I create the product, right?

#

I think I understand. Thank you very much