#krishna-awate_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/1292817628074872835
๐ 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.
- krishna-awate_api, 4 hours ago, 4 messages
hi there!
I'm not sure I understand.
what do you mean by "transaction charge deducta for stripe"?
from stripe side you charge on each transaction i.e. fee
you want to find the Stripe fee for a PaymentIntent?
if so, it's explained here: https://docs.stripe.com/expand/use-cases#stripe-fee-for-payment
Yes how much stripe fee will be duducted for that transaction
got it, then check the link above
If I don't expand, does it show null?
And does I get all the other data if I expand expand: ['latest_charge.balance_transaction'],
If I don't expand, does it show null?
what would shows null exactly?
And does I get all the other data if I expand expand: ['latest_charge.balance_transaction'],
yes you get everything as usually, plus thelatest_charge.balance_transaction. I recommend testing this in test mode to see how this works.
you want to get the Stripe fee of a Subscription?
yes
then find the Invoices of the Subscription. each invoice has a PaymentIntent. and for each PaymentIntent use expand to retrieve the fee as explained above.
for one time payemnt I tried
paymentIntent = await stripe.paymentIntents.retrieve(
payment_intent_id,
{
expand: ["latest_charge.balance_transaction"],
stripeAccount: bank_info.stripe_account_id,
}
);
but still getting latest charge null
pi_3Q7FgfDBfYojrB0W1xURC0zw
well, you can only get the Stripe fee after the payment is successful. here the Paymentintent has status: "requires_payment_method".
so that's normal.
Do we have to collect that data after payment?
yes, you can only know the stripe fee after the payment, not beofre.
since the fee depends on the payment method used, the country, etc.
Okay I will check that.
latest_charge =
'ch_3Q7G0PDBfYojrB0W1CuKWboG'
I have got only this?
id =
'pi_3Q7G0PDBfYojrB0W14Pt9KQI'
what's your question?
I am not getting how much amount will be deducted as strope charge
did you retrieve the PaymentIntent with expand as explained above?
const paymentIntent = await stripe.paymentIntents.retrieve(
details?.payment_id,
{
expand: ["latest_charge.balance_transaction"],
stripeAccount: bank_info.stripe_account_id,
}
);
Yes
and what's the response you get from Stripe?
I want to have how much stripe paltform deduct its fee for that transaction
I have done transaction of $ 150
I found the request in the dashboard, but I don't see the expand parameter set:
const paymentIntent = await stripe.paymentIntents.retrieve(
details?.payment_id,
{
expand: ["latest_charge.balance_transaction"],
stripeAccount: bank_info.stripe_account_id,
}
);
did I do any styntax error? I did same from documentaion
Okay I did mistake.
const paymentIntent = await stripe.paymentIntents.retrieve(
details?.payment_id,
{
expand: ["latest_charge.balance_transaction"],
},
{
stripeAccount: bank_info.stripe_account_id,
}
);
now working
Hi there ๐ jumping in as my teammate needs to step away soon. Glad to hear you got that working! I'll be around if there are more questions.
krishna-awate_fees
Is it $ 0.465 strpe processing fee?
$4.65
Our amount fields are shown in the smallest unit for the currency used, so for usd that is cents.
The same way. You get the Invoice that is assoicated with the payment you're interested in getting the fee for, then you find the Balance Transaction associated with the Payment Intent for that Invoice:
The payment_intent field on an Invoice object contains the ID of the assoicated Payment Intent:
https://docs.stripe.com/api/invoices/object#invoice_object-payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is stripe processing fee same for all recurring cycle?
If the amount you charge remains consistent, then I believe so. But you can use Test Clocks to test the full lifecycle of one of your Subscriptions and make sure that's the behavior you see:
https://docs.stripe.com/billing/testing/test-clocks