#fdc8cd4cff2c19e0d1022e78481ddf36

1 messages ยท Page 1 of 1 (latest)

quasi ravenBOT
pulsar breach
#

Hi! Let me help you with this.

#

Is the question how to charge an application fee with direct charges?

regal badger
#

We can start with that ๐Ÿ™‚ Right now I cant even generate the link

pulsar breach
#

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?

regal badger
#

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

pulsar breach
#

Why you don't want to use the on_behalf_of?

regal badger
#

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",
},

pulsar breach
#

You still need the transfer_data property

regal badger
#

payment_intent_data={
"setup_future_usage": "off_session",
"application_fee_amount": round(setup_fee / 10 * 100),
"transfer_data": {"on_behalf_of": "xxx"},
},

like this?

pulsar breach
#

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

regal badger
#

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)?

pulsar breach
#

Tax is not withheld by Stripe so it gets to the account balance.

#

You will have to manage it yourself then.

regal badger
#

Ok and how about the balance? Shouldnt it be 101$ then? 121$ - 10$ stripe fees - 10$ application fee amount?

pulsar breach
#

Could you please share the PaymentIntent ID pi_xxx?

regal badger
#

Maybe if I rephrase it a little:

  1. user pays 121$ (100$ + 21$ tax)
  2. 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

hasty linden
#

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.

regal badger
#

"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). "

hasty linden
#

That's a picture of funds flow for Direct Charges, you're using Destination Charges.

regal badger
#

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

hasty linden
#

Nope, that's not a direct charge, those use the stripe-account header. Destination charges use the transfer_data.destination parameter.

regal badger
#

Oh ok. How can I use direct charges in session?

#

if this is not the way?

hasty linden
#

You stop using transfer_data.destination and on_behalf_of, then you use stripe-account instead.

regal badger
#
  • 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

hasty linden
regal badger
#

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

hasty linden
#

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.

regal badger
#

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

hasty linden
#

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.

regal badger
#

I have no products on such connected account

#

yet I made the purchase with product_id from platform account ๐Ÿค”

hasty linden
#

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?

regal badger
#

Connected account ID: acct_1NXNbVCDj9usVOHC
Here is the ID of payment: pi_3NXOtkCDj9usVOHC1ZHyktPv

hasty linden
regal badger
#

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

hasty linden
#

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.

regal badger
#

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?

hasty linden
#

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?

regal badger
#

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

hasty linden
#

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

regal badger
#

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

hasty linden
#

You will need to create the Tax Rates that you need to use on each of your Connected Accounts.

regal badger
#

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? ๐Ÿ™‚

hasty linden
regal badger
#

It seems like it created such tax rate, however I cant see any of tax rates on such connected account?

hasty linden
#

How are you trying to do that?

regal badger
#

Judging by the platform account, taxes were displayed next to the products back there?

#

THis is what I see on the connected account:

hasty linden
#

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.

regal badger
#

ok so apparently I can see them when I log in as them: