#phillip_estimate-fees
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.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ 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/1292835388259434496
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- phillip_api, 19 minutes ago, 22 messages
- phillip_api, 3 days ago, 28 messages
- phillip_ubb-upcoming, 4 days ago, 16 messages
- phillip_code, 5 days ago, 22 messages
Hi ๐ no, there isn't a way to get the Stripe fee that will be assess for a payment before making the payment. The best path there if you'd like to do this is to work with our Support team to fully understand the fee structure for your account, and then write your own logic to estimate those fees.
phillip_estimate-fees
Alright, thanks. Or is there a way to retrieve the fee after making the payment?
Yup, after making the payment the fee is shown in the Balance Transaction object that is created:
https://docs.stripe.com/api/balance_transactions/object#balance_transaction_object-fee
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
For Subscriptions, you get to that object by:
- Finding the Invoice you want to look at the fee for and find it's related Payment Intent
https://docs.stripe.com/api/invoices/object#invoice_object-payment_intent - Find the Charge associated with that Payment Intent
https://docs.stripe.com/api/payment_intents/object#payment_intent_object-latest_charge - Then get the Balance Transaction for that Charge
https://docs.stripe.com/api/charges/object#charge_object-balance_transaction
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can leverage expand to get all of those in objects returned inline in a single request:
https://docs.stripe.com/api/expanding_objects
This is already very helpful! Thank you very much and that's everything I needed ๐