#binayak
1 messages ยท Page 1 of 1 (latest)
Hi
We are charging 15% on each transaction, but on payments log, where should we track the same?
Hello ๐
Fees are listed under the balance transaction object
https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-fee_details
@rocky hemlock let's chat here
Like, shall I send you the function code snippet? just to get checked if it is the right way?
you can, sure. Easiest way to know if its right would be to just test it and see if you find the fees ๐
const createHold = async( amount,currency, userEmail, customerId,nonce) =>{
try {
let platformFee = amount*0.15; // 15% to be sent to AskMe
const stripe = require('stripe')('sk_test_^38473Q');
const paymentIntent = await stripe.paymentIntents.create({
amount: amount,
currency: currency,
payment_method_types: ['card'],
payment_method_options: {
card: {
capture_method: 'manual',
},
},
confirm: true,
customer:customerId,
payment_method: nonce,
application_fee_amount:platformFee
});
I am unable to find the fees, as the transactions are getting captured later. Not immediately.
am I doing it the right way>
As far as I know a balance transaction is created when the funds are captured.
So the only other alternative would be to calculate the application fee on your end since you'd know what the final amount would be, you can calculate 15% of that.
ya, then how to add it to our account?
can you help me with any documentation or some snippet?
I don't know what you mean by add it to your account?
Fees will be calculated automatically when the charge is captured
thanks mate
NP! ๐ Good luck