#jayvir_code
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/1356556347403014237
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
need help in application fee percent in subscption
i have passed application fee as 2.82
@fresh thistle
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
const subscription = await stripe.subscriptions.create(
{
customer: customerId,
items: [
{
price: priceId,
},
],
payment_behavior: 'allow_incomplete',
proration_behavior: 'none',
default_payment_method: paymentMethodId,
cancel_at: cancelAtTimestamp,
application_fee_percent: applicationFeePercent,
billing_cycle_anchor: billingCycleAnchor,
collection_method: 'charge_automatically',
payment_settings: {
payment_method_options: {
card: {
request_three_d_secure: 'automatic',
},
},
},
metadata: metadata,
},
{
stripeAccount: connectedAccountId,
},
);
Payment amount
US$265.50 USD
Fees
- US$15.49 USD
Stripe processing fees - US$8.00 USD
abc Interactive, Inc. application fee - US$7.49 USD
Net amount
US$250.01 USD
need help in issue - fees should be 15.50
abc Interactive, Inc. application fee
- US$7.50 USD
@fresh thistle hope you got issue
Hi, let me help you with this.
265.50 * 0.0282 = 7.4871 -> 7.49
The calculation seems to be correct.
It was rounded up.
let feePercent = Number(((skFee / installmentTotal) * 100).toFixed(2));
i need it to be 7.50 for amount - 265.50
what changes should i make as
stripe support upto 2 decimal only
Yes, using percentages won't give you an exact number you're looking for.
You could try 2.83% and collect a slightly smaller fee.
Otherwise, you can update the exact fee amount on each new Invoice. For that, you need to listen to the invoice.created webhook event, and make a request to update the Invoice directly to set the application_fee_amount=750: https://docs.stripe.com/api/invoices/update#update_invoice-application_fee_amount
@fresh thistle
thats not good solution
need more concrete solution
Why is it not good exactly?
What do you mean by "concrete"?
@fresh thistle provide me better solution then this
Please answer my questions above.
i just want directly manage when i create/update subscprition
not during invoice like u mentioned
It's not possible, unfortunately.