#deamoner_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/1299311909157212175
๐ 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.
- deamoner_api, 3 days ago, 22 messages
๐
Could you please share a Stripe Object Id that showcase that calculation ?
pm_1QCe25R8V1frYHNtrurW0cSP
Could you please share rather a Payment object? like payment_intent Id ?
that id is a payment object
Nope, that's a PaymentMethod Id
which can be used in multiple Charges/PaymentIntents Id
sorry - pi_3QDk7fR8V1frYHNt1di6A2l2
Thanks, checking..
I see this PaymentIntent was created from this Subscription sub_1QDk7fR8V1frYHNtsal8kpwn
(299+150) X 35.56 = 159.664 ~160
What is the issue here exactly ?
oh wait i'm adding the convience fee and perctage on to the total price
but application fee comes off without the fee adding on
wait 2.99 * 5% = 15 cents, and I have a flat convience fee of 1.50
Sorry, I'm not understanding your latest follow up here.
console.log("calculatedFees", calculatedFees);
console.log("tier.price", tier.price);
const applicationFeePercent = (
(calculatedFees.total / (tier.price + calculatedFees.total)) *
100
).toFixed(2);
console.log("calc1", tier.price + calculatedFees.total);
console.log(
"calc2",
(calculatedFees.total / (tier.price + calculatedFees.total)) * 100
);
console.log("applicationFeePercent", applicationFeePercent);
console.log("number percent", Number(applicationFeePercent));
console.log(
"totalcalc with number",
(Number(tier.price) + Number(calculatedFees.total)) *
(Number(applicationFeePercent) / 100)
);
In my platform I add a 1.5 convience fee passed on to the customer, plus a 5% transaction fee
The fees should be calculated at 1.64
but I guess because I am adding the fees on total to the final price that is where I am off
yea, that fixed it, thanks