#iodaniel

1 messages · Page 1 of 1 (latest)

odd duneBOT
sullen pecan
#

Are you talking about Application Fees that your platform collects? Or Stripe fees that you pay?

nimble berry
#

yes

deft umbra
#

Hi ! i'm also implementing it and i have an issue on the direct / inderect charge ! Do you have problem with platform fee or stripe fee ?

nimble berry
#

yes is the platform fee

sullen pecan
#

Please give a step-by-step explanation

nimble berry
#
  1. total_amount = int(json_data['amount']): Here, I'm taking the total amount of money to be charged, which comes in cents format in the provided JSON data. We are converting it into an integer for processing.

  2. fee = int(total_amount * fee_percentage): Next, we calculate the fee we want to charge. I multiply the total amount by a fee percentage (which is fee_percentage). This calculation gives us the amount of money that will be charged as a fee for the service.

  3. destination_amount = total_amount - fee: subtract the fee calculated in the previous step from the total amount. This gives us the final amount that the seller will receive after deducting the fee.

  4. charge = stripe.Charge.create(...): Finally, creating a transaction or charge in Stripe. We specify the total amount (amount), the currency (currency), the customer (customer), the description of the charge (description), and the amount that should be transferred to the seller (destination). The amount to be transferred is destination_amount, which is the total amount minus the fee.

do you prefer to see the code ?

sullen pecan
#

What API call are you making?

nimble berry
#

I used
stripe.Charge.create and stripe.Transaction.objects.create

sullen pecan
#

So you're using Stripe Issuing? That's what the Transactions API is for.

nimble berry
#

Thank you so much @sullen pecan for the documentation I'm reviewing, I hope be able to resolve this issue

sullen pecan
#

Sure thing!