#jarekdistro
1 messages · Page 1 of 1 (latest)
Hello
Sounds like you are using direct Charges with Express, which we really don't recommend.
This is how their store checkouts look:
const session = await stripe.checkout.sessions.create(
{
line_items: lineItems,
metadata: {
organizationId: config.public.orgId
},
success_url: 'https://example.com/success',
cancel_url: 'https://example.com/cancel',
allow_promotion_codes: true,
// Need to set up Stripe tax for our customers
// automatic_tax: {
// enabled: true
// },
billing_address_collection: 'required',
shipping_address_collection: {
allowed_countries: ['US', 'CA']
},
mode: 'payment',
},
{
stripeAccount: stripeConfig.account
}
);
return session;
Yeah, since you are creating the Session on the Connected Account it requires that the Connected Account's settings are set. Instead you should be using a destination charge here (using transfer_data.destination: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-transfer_data ) and potentially on_behalf_of
Then it would use your platform settings
I see, we set up Stripe Tax for the platform and our customers use those settings for their checkouts.
What's the difference between transfer data and on behalf of?
transfer_data indicates that funds should be moved immediately to your Connected Account. on_behalf_of determines the settlement merchant, see: https://stripe.com/docs/connect/destination-charges#settlement-merchant
Is the platform or the store owner the settlement merchant?
Is it who gets the money?
Ah actually it does look like right now using destination with on_behalf_of and automatic tax is in beta: https://stripe.com/docs/tax/connect#beta
Just fyi on that
In terms of "who is the settlement merchant", that depends on your business.
You mostly can think of the settlement merchant as who the customer is actually paying.
We are an ecommerce platform. Our customers open a store and website, and sell products.
Yep then your users would be the settlement merchant here
k
So you would want to use on_behalf_of in that case
Ok so we need
transfer_data: {
destination: '{{CONNECTED_ACCOUNT_ID}}',
},
oops
I see "When using destination[account], on_behalf_of is automatically set to the same value as destination[account]."
Yeah first I would make sure you can get access to the private beta so you can use auto tax with on_behalf_of
Ignore destination[account] -- that is legacy really.
ok
You want to just focus on transfer_data.destination
like the snippet above?
Yeah, for a Checkout Session it would be payment_intent_data: { transfer_data: { destination: 'acct_123' } }
great, and I just need to setup Stripe Tax for our platform?
since I want to get automatic_tax
sorry theres a lot going on just want to make sure i understand
Hmm I'm not actually positive if you are going to use on_behalf_of since that is a private beta feature. If you are going to not use on_behalf_of then yes, you would only need to set up registrations on your platform.
So you can request access to that private beta and then discuss with the beta team when they reach out about access.
So for now, if you are going to use Direct Charges (which again, we really don't recommend but I do understand this is a gap until using on_behalf_of is supported for Auto Tax) then you would want to take advantage of the Tax Registration API to configure your Connected Accounts: https://stripe.com/docs/tax/registrations-api
If you are able to wait until you get access to the beta then that would be my recommendation for the best path forward.
Honestly it's not urgent, we haven't even launched and from what i see, most states don't charge tax on you until you reach 100k in sales per state. Our customer will be smaller shops.
But the registration API is what I was looking for so thank you for that
Gotcha
Then yeah, really I'd recommend integating Checkout with destination + on_behalf_of and then adding Auto Tax once it is available.
You run into a lot of issues when using Direct Charges with Express Accounts -- that charge flow is really meant for Standard Connected Accounts
Got it. So to conclude, assuming I wont use the private beta, I can use
automatic_tax: {
enabled: true
}
payment_intent_data: {
transfer_data: {
destination: 'acct_123'
}
}
on checkouts
And I need to have stripe tax configured on our platform?
Well yes, but that would make your platform the settlement merchant
Then I should say, the destination account needs to have Stripe Tax configured, which we can do for them via the Tax registration API?
do you just recommend the private beta so we can avoid setting up the stripe tax for our customers?
oh i guess the tax reg api is also in private beta
I recommend first implementing without Auto Tax
The Tax Registration API is in public beta I believe
oh ok
But you would first implement Destination + on_behalf_of which would look like: payment_intent_data: { transfer_data: { destination: 'acct_123' }, on_behalf_of: 'acct_123' }
Got it, ok so I would use both.
Ok I'll go ahead with that and deal with the tax thing later, thanks for your help
👍
Actually one more question. is amount under transfer_data automatic based on the line items total?
If you don't set that then the entire amount is transferred