#ClaireBF-payment-link
1 messages ยท Page 1 of 1 (latest)
So you're hoping to use a webhook for order fulfillment. Is that correct?
usually we recommend using the payment_intent.succeeded Event to fulfill orders: https://stripe.com/docs/api/events/types#event_types-payment_intent.succeeded
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes I got it and it works, but is it possible then to link it to the products ?
Or at least with the payment link id ?
Do you have a request ID for a successfully paid Payment Intent?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Ah, you know what? I think checkout_session.succeeded will actually be a better option, as you can retrieve its corresponding line items (https://stripe.com/docs/api/checkout/sessions/line_items). If you want Product information, you would just need to get the Invoice ID and retrieve its line items (https://stripe.com/docs/api/invoices/invoice_lines), which will have an object for the product that's attached to the underlying purchase
Alright I will test it now and I come back to let you know if it works ๐
How can I retrieve an invoice from a checkout_session ?
I can't see the id link
You will have to expand line_items.data.price.product and the data should be there (if it exists).
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
How can I expand it ?
In your retrieve request (e.g. when you retrieve the Checkout Session via its ID), you pass the expand parameter and include line_items.data.price.product as one of the elements of the array/list.
I'm using integromat, I have added expand[]=line_items.data.price.product in the body but it doesn't work
Is there another way to retrieve all payments from a unique payment link ? Cause the payment link is for a unique product so it would be sufficient
Hello ๐
Taking over and catching up
Give me a moment please ๐ Thanks
Thanks ๐ Tell me if you need any screen or anything else !
Integromat seems like a third party integration so we don't have much insights into how its built unfortunately. You'd likely want to talk to their support team about this.
Integromat is just a way to make an api call but it works exactly the same
My problem is just to list the payments from a payment link, there is no other way ?
ah gotcha. let me see if there are any workarounds
Thanks a lot ๐
I have added expand[]=line_items.data.price.product in the body but it doesn't work
what error are you getting exactly when you do this?
let's try one step at a time
Can you set expand[]=line_items and see if line items are showing up?
Unfortunately it doesn't appear neither
gotcha seems like payment link sessions are created differently
let's try setting expand[]=payment_link
It doesn't work neither
what are you seeing in the response though? Can you share the screenshot?
huh
I feel like something is wrong with the request syntax itself
as payment_link is expandable and is working on my end
hum