#yanni_code
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/1339779779456532544
📝 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.
- yanni_code, 3 hours ago, 10 messages
example of a transaction
const stripeAccount = await stripe.accounts.create({
country: 'US',
email: user.email,
capabilities: {
transfers: { requested: true },
card_payments: { requested: true },
},
business_type: 'individual',
controller: {
stripe_dashboard: {
type: 'none',
},
fees: {
payer: 'account', // Connected account pays Stripe fees
},
losses: {
payments: 'stripe',
},
requirement_collection: 'stripe',
}
});
Rest of the code that got cutoff.
Example of the connected seller account POV
I am expecting to see that in the seller POV they have the application fee + stripe processing fees charged to them
I did change the code and create a new Seller account through my onboarding system to retest, In that account I do see the following permissions
So it's different on how you create the transaction, not how you created the account
There is Direct Charges and Destination Charges. Direct Charges will take stripe fee from your Connected Account. Destination Charge takes from you
But even with Destination Charge, you can calculate the total amount and the application fee to cover it, but requires a bit of math
https://docs.stripe.com/connect/charges for the fund flows
Would I be able to modify my payment intent creation to do a direct charge so that the connected seller is charged the fee from their portion of the sale?
public async createPaymentIntent(data: {
amount: number;
currency: string;
platformFee: number;
creatorStripeAccountId: string;
metadata: any;
email: string;
}) {
const { amount, currency, platformFee, creatorStripeAccountId, metadata, email } = data;
return await this.stripe.paymentIntents.create({
amount,
currency,
payment_method_types: ['card'],
application_fee_amount: platformFee,
on_behalf_of: creatorStripeAccountId, // Add this line
transfer_data: {
destination: creatorStripeAccountId,
},
metadata: {
...metadata,
original_amount: amount,
platform_fee: platformFee
},
receipt_email: email,
});
}
Since it seems my application functions more like a destination charge service
Alternatively like you mentioned would I just be able to calculate the (stripe fee + myplatformfee) and subtract it from the sellers sale so that the math balances?
Am I understanding this correctly?
Sure can, but first what is your Stripe Account type?
Are you asking what type of account is the sellers account?
actually i believe this one i am using has a type of none, that might be a bug in my code I think i accidentally deleted the type from the account creation. Previously I was creating accounts with type of 'custom'
it might be none because of my combination of controller values:
controller: {
stripe_dashboard: {
type: 'none',
},
fees: {
payer: 'account', // Connected account pays Stripe fees
},
losses: {
payments: 'stripe',
},
requirement_collection: 'stripe',
}
in the api doc it says some combinations arent supported
Oh I see your setup. Sorry overlooked this part. Could you share the account Id (acct_xxx) and the PaymentIntent Id (pi_xxx)?
acct_1QsDdOGb1wH5yJjZ pi_3QsDjFGjCeWYtHwE14lAqFqR
looking at some previous accounts I had created, they had a type of custom but that was before I modified my code to use the controller variables
Hey sorry gimme a few mins. Being in a MTG
Hi, Can you retrieve the Balance Transaction txn_1QsDjLGjCeWYtHwEmzDVgDzW and tell what fee breakdowns it has? https://docs.stripe.com/api/balance_transactions/object#balance_transaction_object-fee_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I believe it shouldn't have the Stripe processing fee
yeah let me take a look
{
"id": "txn_1QsDjLGjCeWYtHwEmzDVgDzW",
"object": "balance_transaction",
"amount": 2000,
"available_on": 1740096000,
"created": 1739496608,
"currency": "usd",
"description": "Application fee from application Relevé for yguenov7@gmail.com (acct_1QsDdOGb1wH5yJjZ)",
"exchange_rate": null,
"fee": 0,
"fee_details": [],
"net": 2000,
"reporting_category": "platform_earning",
"source": "fee_1QsDjIGb1wH5yJjZEvP360BL",
"status": "pending",
"type": "application_fee"
}
that looks like my platform fee
which looks correct
the transaction i processed looked like this
total: $100
platform fee 20% : $20
stripe fee: $3.20
i expected to see a balance of $20 coming to my main account, but instead i saw 20-3.20 = $16.80
because the stripe fee got offloaded onto me instead of the sellers account
Yeah I see that. This part, correct?
correct
Um I think this is just meaning -$3.2 was taken from the Transaction, but it still be taken from ($100-$20) on the Connected Account, and you still receive the full $20
But let me confirm
im just seeing in my main account balance that the values are like this and not round numbers of 20
Yeah saw that too.. Looking
I hope i explained what i am trying to accomplish correctly. Im just trying to route the stripe fee to the Connect account belonging to the seller, but right now it seems my code is configured in some way that its taking the fee from my platforms stripe connect accounts balance instead.
Yes yes it's totally clear, it's just that we are taking time to confirm it. Sorry!
No worries I appreciate the help!
Hey @small flame if you can test quickly, can you create another account with payee = "application", then do a Destination Charge On Behalf Of?
Then please provide me the Account Id and the Payment Intent Id again
I would like to compare
Sure! Takes me a second to create and run everything
just to clarify you want me to create the account like so:
controller: {
stripe_dashboard: {
type: 'none',
},
fees: {
payer: 'application', <-- payer = application
},
losses: {
payments: 'stripe',
},
requirement_collection: 'stripe',
}
yes!
ok give me a few moments
Sorry, I think this fee.payer is only possible in case of Direct Charge. You are using a Destination Charge
https://docs.stripe.com/connect/direct-charges-fee-payer-behavior
Any activity occurring at the platform account level is billed to your platform regardless of the controller.fees.payer value on your connected accounts