#benjamineugenewhite_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question. Thank you for your patience!
âąď¸ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1214655403963453541
đ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
To add a bit more detail: This doc says charges not deprecated (https://docs.stripe.com/payments/payment-intents/migration/charges) while this says charges deprecated (https://docs.stripe.com/payments/charges-api -- though only maybe directly making them). And the STripe API docs for payment intent object make no reference to .charges.data property (though i know that exists in practice).
My boss reviewed my code and he raised objection to referencing charges based on the source that says deprecated. Maybe it's not quite that simple?
Hello! Creating Charges directly is deprecated, but Charges themselves are not. Payment Intents create Charges as part of the optimal flow, for example.
You can list Charges by Payment Intent: https://docs.stripe.com/api/charges/list#list_charges-payment_intent
And you can also list Refunds by Payment Intent: https://docs.stripe.com/api/refunds/list#list_refunds-payment_intent
thanks. that's super helpful. is the payment_intent.charges property to be avoided since not officially documented?
No, you can use it. It's not documented because it's part of an older API verison, but if you're on an older API version you can use it. In newer API versions it's been replaced by latest_charge: https://docs.stripe.com/upgrades#2022-11-15
Thanks so much, @unkempt oak
Happy to help!