#mr_pablo - refunds
1 messages ยท Page 1 of 1 (latest)
We would be use the webhook for refunds
So refund made in Stripe, we get the data and I want to know what Price object was used for the Product they purchased
In both one off, and subscription, payments
Ok. How are you using Price objects for one-off payments? Still Invoicing?
I dont get what you mean sorry
We create a Product, with a default Price, maybe add more Prices. Can be one off or subscription. A user "buys" a Product using one of the Prices
Yeah I get that. What I mean is what API endpoint do you use to accept one-off payments with those Price objects?
We just use the checkout
Got it
Hello ๐ Taking over as codename_duchess needs to step away soon.
You can retrieve the checkout session using the PaymentIntent in this case.
https://stripe.com/docs/api/checkout/sessions/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The example response show any product/price data
It does accept a payment intent ID
https://stripe.com/docs/api/checkout/sessions/list#list_checkout_sessions-payment_intent
Ah line_items are not included by default
You'd need to expand it
ah yes
const sessions = await stripe.checkout.sessions.list({
limit: 3,
},{ expand: ['line_items'] });
so get the refund data, get the PI ID, get the checkout session using the PI ID, get the line items?
Yup