#soma-payments
1 messages ยท Page 1 of 1 (latest)
Hello Mr @glacial horizon
I need to be able to have a list of all the usage for a paymentlink
I mean:
date of use, who, that sort of things
an usage's log for a paymentlink
That's something you can get if you're listening for webhook events - are events something you have integrated akready?
no
I haven't
are you suggesting me to listen for events and store them into a local database?
I mean paymentlink related events?
You can listen for checkout_session.completed events and check payment_link to see which payment link the checkout session comes from, to know when customers complete payment through a payment link and then store that in the DB
so, payment intents arenot meant for this?
I thank you for your time... I think I will dig a little more in the docs and will run some more "test and try". I refuse to believe the only way is to hook this to an event listener.
an event listener is not the only way, but it is the most fool proof way - what were you hoping for instead?
payment intents have such a suggestive name
I need to head out, but @candid marten can help you out
fine
For context, payment intents are what power our payments under the hood - by using payment links, a payment intent is automatically created.
But Checkout Sessions are better for linking usage directly to a Payment Link, since the Payment Intent has to go through a couple of levels to be directly linked to it's associated Payment Link
Hi there ๐ taking over for karbi
Give me a second to get caught up
Sure! hello Mr. @candid marten
Mr. karbi just told me something that was unclear to me in the docs, it is that launching a paymentlink will create automatically a payment intent
Getting any amount of Payment Link data from the Payment Intent requires traversing many different objects to get to it, whereas you can get that info from the Checkout Session itself without having to make any additional calls: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_link
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I see