#timx - taxes
1 messages ยท Page 1 of 1 (latest)
Hey, I am creating them with python
can i copy the code here ? then you maybe see my problem
For Sepa I use: stripe.Customer.create --> stripe.SetupIntent.create -->Subscription.create
but I dont know if I add the taxes in SetupIntent or in Subscription.create
since at creditcard I only have Customer.create and Subscription.create
What are you doing for the other case that you think should be different here?
Are you using manual tax rates or trying to use automatic tax?
manual tax
for cc i use:
checkout_session = stripe.checkout.Session.create(
success_url=mcs.site_url + '/success?session_id={CHECKOUT_SESSION_ID}',
cancel_url=mcs.site_url + '/canceled',
payment_method_types=['card'],
customer=customer.id,
mode='subscription',
metadata={"duration": duration},
line_items=[{
'price': price_id,
'quantity': 1,
'tax_rates':['txr_1JznaiBVyc30g9ZzDVbSVYyU'],
}],
)
for sepa:
stripe.Customer.modify(setup_intent['customer'], invoice_settings={'default_payment_method': setup_intent['payment_method']})
subscription = stripe.Subscription.create(
customer=setup_intent['customer'],
items=[{'price': setup_intent['metadata']['price_id'],'tax_rates':['txr_1JzoQLBVyc30g9ZzYOvYW0Vv']},],
expand=['latest_invoice.payment_intent'],
)
can i just add the tax_rates to the items in sepa ?
since i don`t have line_items
I'm not sure what you mean by "in sepa" here
how are you creating the actual payments?
Oh, in the subscription, paid by sepa?
yes ๐
so first code part is cc (creating subscription via python)
it works fine with taxes
but 2nd is code for creating subscription with sepa, but missing the location, where i put the tax_rates in cde
code
You need to set the tax rates on each item, or defaults for the entire subscription, as documented here: https://stripe.com/docs/billing/taxes/collect-taxes?tax-calculation=tax-rates#static-configuration
ahhh got it already ๐
did it differntly ๐
i missed a line ^^
but thanks for the quick support ๐ keep going
bye bye and thx again
no problem, you're welcome and you too!