#timx - taxes

1 messages ยท Page 1 of 1 (latest)

vagrant vortex
#

How are you creating these payments? WHat's not working like you expect?

leaden cave
#

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

vagrant vortex
#

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?

leaden cave
#

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

vagrant vortex
#

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?

leaden cave
#

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

vagrant vortex
leaden cave
#

ahhh got it already ๐Ÿ™‚

#

did it differntly ๐Ÿ˜„

#

i missed a line ^^

#

but thanks for the quick support ๐Ÿ™‚ keep going

#

bye bye and thx again

vagrant vortex
#

no problem, you're welcome and you too!