#fdc8cd4cff2c19e0d1022e78481ddf36
1 messages ยท Page 1 of 1 (latest)
Hi! Let me help you with this.
Is the question how to charge an application fee with direct charges?
We can start with that ๐ Right now I cant even generate the link
I have used "stripe_account" as in https://stripe.com/docs/connect/direct-charges, but it does not work
Actually, we don't recommend using Direct charges with Express accounts, because then the connected account is responsible for refunds and all, which an Express account can't do on its own.
Some cross-border transfer are possible with destination charges, what's your use case?
We would have to register the entities in the destination countries, isnt that correct?
We would like to avoid that and have only one (domestic) entity
This is what is throws right now ๐
Since we are the ones who will be responsible for the refunds (not connected account) I think direct charges suits our usecase
Why you don't want to use the on_behalf_of?
It throws:
Can only apply an application_fee_amount when the PaymentIntent is attempting a direct payment (using an OAuth key or Stripe-Account header) or destination payment (using transfer_data[destination]).
payment_intent_data={
"setup_future_usage": "off_session",
"application_fee_amount": round(setup_fee / 10 * 100),
"on_behalf_of": "xxx",
},
You still need the transfer_data property
payment_intent_data={
"setup_future_usage": "off_session",
"application_fee_amount": round(setup_fee / 10 * 100),
"transfer_data": {"on_behalf_of": "xxx"},
},
like this?
on_behalf_of just applies the "looks" as if the customer is paying to the connected account, but under the hood it has to be a normal destination charge.
No, no:
payment_intent_data={
"setup_future_usage": "off_session",
"application_fee_amount": round(setup_fee / 10 * 100),
"transfer_data": {"destination": "acct_xxx"},
"on_behalf_of": "acct_xxx"
},
These are 2 separate settings so you have to specify the account ID 2 times
Hmm that seems to work ๐ Thank you!
How about the taxes / application fees?
When I look at the connected account, it seems like his balance is 111 $ (121$ - 10$ stripe fees). I would assume he should have 80 $ instead? (121$ - 21$ tax - 10$ stripe fee - 10$ application fee amount)?
Tax is not withheld by Stripe so it gets to the account balance.
You will have to manage it yourself then.
Ok and how about the balance? Shouldnt it be 101$ then? 121$ - 10$ stripe fees - 10$ application fee amount?
Could you please share the PaymentIntent ID pi_xxx?
Maybe if I rephrase it a little:
- user pays 121$ (100$ + 21$ tax)
- application fee is 10$, his balance shows 111$ (121$-10$ application fee)
However on the payment detail I can clearly see Stripe processing fee - 3.81$ and I am not sure who is paying for that ๐
Main account (showing the stripe fees): pi_3NXOIUCMZ0g3rTwO1N2zCuTN
Connected account: py_1NXOIVCDj9usVOHC8mhK32bI
Hi there ๐ jumping in as my teammate needed to step away. When working with Destination Charges, you as the Platform are paying Stripe fees:
https://stripe.com/docs/connect/charges#stripe-fees
Those fees are not automatically passed along to your Connected Accounts. If that is something you wish to do, and are permitted to do so in the regions where you're operating, then you will need to add custom logic to adjust the application fee amount that is being set to include those fees.
Hmmm, according to https://b.stripecdn.com/docs-statics-srv/assets/direct_charges.a2a8b68037ac95fe22140d6dde9740d3.svg I assumed connected account is paying for that?
"For example, if you make a charge of 10 USD with a 1.23 USD application fee (like in the previous example), 1.23 USD is transferred to your platform account. 8.18 USD (10 USD - 0.59 USD - 1.23 USD) is netted in the connected account (assuming standard US Stripe fees). "
That's a picture of funds flow for Direct Charges, you're using Destination Charges.
vanya helped me modify my code so it uses direct charges?
payment_intent_data={
"setup_future_usage": "off_session",
"application_fee_amount": round(setup_fee / 10 * 100),
"transfer_data": {"destination": "xxx"},
"on_behalf_of": "xxx",
},
I was told ^ is for direct charges
Nope, that's not a direct charge, those use the stripe-account header. Destination charges use the transfer_data.destination parameter.
You stop using transfer_data.destination and on_behalf_of, then you use stripe-account instead.
- I cant seem to find the 3.81$ anywhere, the main account says it collected 10$ in fees + the connected account says it has balance 111$, therefore stripe fees are gone ๐
If I go for your suggestion, it throws "No such customer: 'cus_xxx'" even tho I have been using this customer_id for destination flow
That's expected, Direct Charges happen directly on the Connected Account, so all objects they reference need to also be on the Connected Account. You can't use Customers or Payment Methods that are on your Platform account.
Check the Balance Transaction associated with the Payment Intent's Charge, it should show you the fee:
https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-fee
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So I would have to create a new customer for each connected account, even though such customer is already present on Platform account?
Same goes for taxes, products etc?
I cant seem to reuse tax rates from Platform account on the checkout session while using the direct charge flow
Whats strange is that the connected account could reuse a product from the main Platform account
Correct, everything needs to be on the Connected Account. That's why Direct Charges are typically recommended to only be used with Standard Connected Accounts, because the owners of those type of Connected Accounts can log into the Stripe dashbaord for their account and set up all of their details/settings. Express accounts do not have full access to the dashboard for that reason.
There is a process for cloning payment methods created on your Platform account to your Connected Accounts, but you will need a process to recreate all the other objects that need to be referenced.
So products from Platform account are available for the Connected Express account?
Because I could use them and I did not create them specifically on the Connected account
Not with Direct Charges, the Product will need to be on the Connected account. With Destination Charges everything resides on the Platform, so you would be able to use Products that reside on your Platfrom with that flow.
I have no products on such connected account
yet I made the purchase with product_id from platform account ๐ค
Can you share the ID of the request where you believe you used a Product from the Platform while making a request from a Connected Account?
Connected account ID: acct_1NXNbVCDj9usVOHC
Here is the ID of payment: pi_3NXOtkCDj9usVOHC1ZHyktPv
The request to create that Checkout Session didn't use an existing Product, it used product_data to create one in an adhoc fashion:
https://dashboard.stripe.com/test/logs/req_NPa8ZQLUyV4rze
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Hmm that sounds like a mistake on my end, thanks ๐
How about the TaxRates tho? My platform can have thousands of connected accounts, how can I manage the tax rates for them?
I can only create TaxRates on my platform account and I cant find it on the connected account
This is why we recommend using Destination Charges with Express accounts, so you only have to manage those objects one time, on your Platform account.
How can we ensure we can have customer from the whole world? If we have only one platform account?
Lets suppose we go with the destination charges you are suggesting ๐
Because according to the destination flow diagram the stripe fees are on us, but we dont know them until the end ๐ Not sure how reliable is the formula 0.3$ + 2.9% ? I have tried that and the stripe fees were different. Is there any way we can calculate those fees correctly and add those to the application fee?
What do you mean the fees were different, can you elaborate on that and how you're currently doing the math to calculate those fees?
I have found the formula 2.9% from transaction + 0.3$ fixed fee was slightly less than the Stripe fees shown in the dashboard.
IE transaction amount: 30.44
Stripe fees from dashboard: 1.29$
Based on the formula: 1,18276$
Not saying the dashboard is wrong, I just feel like I am missing out some variable in the calculation
pi_3NXNJ9CMZ0g3rTwO0F5euN8j
I see. Took a look, and my best guess is that because the Payment Method was created with a non-US country, the fee incurred was for an international card rather than a domestic one. Fees are something we aren't too familiar with in this forum though, and I would recommend double checking that with our Support team who is more knowledgable on this topic:
https://support.stripe.com/?contact=true
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Ok I will get in touch with them ๐
Maybe one more thing - how can I add tax rate to the subscription which I am creating on behalf of a connected account?
subscription = stripe.Subscription.create(
customer="cus_customer_from_connected_account",
items=[
{
"price": "price_id_from_connected_account",
#"tax_rates": [],
},
],
description="...",
payment_behavior="default_incomplete",
default_payment_method="pm_default_payment_method_of_customer_from_connected_account",
stripe_account="acct_connected_account",
trial_end=date_to_seconds(get_first_day_month_after_next_month()),
)
Because as far as I can see, taxes are the only issue with the direct charges, the rest is pretty much managable even tho you discourage me from this flow
You will need to create the Tax Rates that you need to use on each of your Connected Accounts.
How can I create them tho? I can only create them on the platform account like this:
tax_rate = stripe.TaxRate.create(
display_name=f"VAT {instance.name}",
inclusive=False,
percentage=instance.tax,
country=instance.code,
jurisdiction=instance.code,
description=f"VAT {instance.code}",
)
What am I missing out? ๐
You use the stripe-account header to make the request for your Connected Account:
https://stripe.com/docs/api/connected_accounts
It seems like it created such tax rate, however I cant see any of tax rates on such connected account?
How are you trying to do that?
Judging by the platform account, taxes were displayed next to the products back there?
THis is what I see on the connected account:
Sorry, I don't know what that means. We work more with the API than the dashboard, so we aren't as familiar with the dashboard view of things.
Ah, and it looks like you are seeing two different versions of the dashboard UI.
ok so apparently I can see them when I log in as them: