#binayak

1 messages ยท Page 1 of 1 (latest)

stoic zodiacBOT
rocky hemlock
#

Hi

#

We are charging 15% on each transaction, but on payments log, where should we track the same?

agile tendon
#

Hello ๐Ÿ‘‹

#

@rocky hemlock let's chat here

rocky hemlock
#

Like, shall I send you the function code snippet? just to get checked if it is the right way?

agile tendon
#

you can, sure. Easiest way to know if its right would be to just test it and see if you find the fees ๐Ÿ™‚

rocky hemlock
#

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>

agile tendon
#

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.

rocky hemlock
#

ya, then how to add it to our account?

#

can you help me with any documentation or some snippet?

agile tendon
#

I don't know what you mean by add it to your account?

#

Fees will be calculated automatically when the charge is captured

rocky hemlock
#

okay, so is my code correct?

#

will it be automatically added?

agile tendon
#

yes

#

it should

rocky hemlock
#

thanks mate

agile tendon
#

NP! ๐Ÿ™‚ Good luck