#harry_api
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/1293481741084004393
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
You could reverse-calculate it, and the best way is to form a formula based on a test transaction on Test mode
How would I factor in the payment method for test mode transaction?
what I mean is what payment method would I use for this test mode transaction ? because stripe fee also depends on type of payment method. if its international or local card etc
I see what you mean, it's reversal calculate-able with card but not for other payment methods ๐ค
you can use an integration like https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web that lets you see the details of the PaymentMethod before charging it, and calculate the fee from those details
How would this work when I am creating subscriptions? Upcoming invoice doesn't come with the breakdown
will the above way give me the breakdown of stripe fee as well?
not sure what you mean/how that connects. At the point where you're ready to initiate the payment/start a subscription, you would have a PaymentMethod object and can do calculations
the only thing that gives you a breakdown of the fee is doing https://docs.stripe.com/expand/use-cases#stripe-fee-for-payment after a successful payment
the idea is you look at https://stripe.com/pricing, write code to predict what a charge on a certain payment method will be, and you can check in test mode that your code is doing the right thing for the various test cards from different countries etc https://docs.stripe.com/testing
Is there anyway to know if the card is an international card or a local one? to calculate the processing fee more accurately?
for example
https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web&type=payment#insert-custom-logic
-> https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-payment_method_preview-card-country
tells you the issusing country so you know if it's international or not