#angel785420

1 messages · Page 1 of 1 (latest)

forest matrixBOT
chilly wedge
#

This code looks right to me. Are you facing any issue?

lilac skiff
#

My website is like eBay so users can sell and buy items. So how I have it setup currently I get the total amount and collect my fee then I send the amounts owed to respected sellers. It currently doesnt tax anything not sure why, Im aware there are item category for taxes and would like to utilize that since users sell meat and clothing items, and I know taxes vary based on category state from state

chilly wedge
#

Are you using Connect?

lilac skiff
#

yes

chilly wedge
#

I see! What is the connected account type? Standard, Express or Custom?

lilac skiff
#

let me check

#

its Standard

chilly wedge
#

Thanks for sharing! Are you using Separate Charges and Transfers or Direct Charges?

lilac skiff
#

here is my transfers. if event.type == 'checkout.session.completed':
session = event['data']['object']
metadata = session.get('metadata', {})
seller_amounts = json.loads(metadata.get('seller_amounts', '{}'))
payment_intent = stripe.PaymentIntent.retrieve(session.payment_intent)
charge_id = payment_intent.charges.data[0].id
for stripe_id, amount in seller_amounts.items():
print(amount)
print(stripe_id)
stripe.Transfer.create(
destination=stripe_id,
amount=int(Decimal(amount) * 100),
currency='usd',
source_transaction=charge_id,

        )
chilly wedge
#

For Standard connected account, Direct Charges (https://stripe.com/docs/connect/direct-charges) should be used instead which you could set amount to transfer to in payment_intent_data.application_fee_amount of the Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-application_fee_amount

Then you'd need to follow this guide to set up the Automatic Tax for Direct Charges: https://stripe.com/docs/tax/tax-for-platforms

Separate Charges and Transfers, the one you're using now is strongly discouraged on Standard connected account.

lilac skiff
#

oh ok got it ill take a look at those

#

but with Direct Charges, I can charge the total amount with multiple sellers products in the checkout ?

#

thanks for the help. will need to look into those links more. I think Im figuring it out

chilly wedge
#

but with Direct Charges, I can charge the total amount with multiple sellers products in the checkout ?
Direct Charges is one payment to one connected account

lilac skiff
#

got it. really appreciate the help !