#maat

1 messages ยท Page 1 of 1 (latest)

glacial marshBOT
solar garden
#

๐Ÿ‘‹

icy quarry
#

not sure if we're on the same page here, I'm trying to get the coupon information highlighted below on the stripe dashboard from an exported csv with ids for charges and paymentintents. I've done this before for ongoing transactions using the checkout.session.completed object, but is there a way to find this coupon information retroactively? I had previously expanded total_details.breakdown.discounts for this information, but it looks like this isn't available from the information I have on the exported csv.

solar garden
#

I'm not sure what you are referring to with regards to "an exported csv". Do you mean a certain Dashboard export? We really only focus on the API so I'm not that familiar with the Dashboard.

Overall the way you do this through the API is get the Checkout Session and look at the line_items.data.discounts (https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-line_items-data-discounts) which is expandable as you noted

icy quarry
#

the export feature on the dashboard for payments:

#

I'd like to run a pandas script to append the csv export with coupon information, but the checkout session ID doesn't seem to be available here

solar garden
#

Yeah as far as I know this isn't possible via the Dashboard export

#

I don't believe any of those exports contain the Checkout Session ID

#

You will need to use the API for this

icy quarry
#

will think this through, thank you for all of your help!