#iodaniel
1 messages · Page 1 of 1 (latest)
Are you talking about Application Fees that your platform collects? Or Stripe fees that you pay?
yes
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 ?
yes is the platform fee
Can you be more specific? What are you doing to create the charges? What is happening as a result?
Please give a step-by-step explanation
-
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.
-
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.
-
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.
-
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 ?
What API call are you making?
I used
stripe.Charge.create and stripe.Transaction.objects.create
So you're using Stripe Issuing? That's what the Transactions API is for.
As for Charges, you would need to use the application_fee_amount in order to get fees paid to your platform: https://stripe.com/docs/api/charges/create#create_charge-application_fee_amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thank you so much @sullen pecan for the documentation I'm reviewing, I hope be able to resolve this issue
Sure thing!