#clyqe
1 messages · Page 1 of 1 (latest)
Hi
How are you accepting payment from your customers ?
checkout_session = stripe.checkout.Session.create(
payment_method_types=['card'],
line_items=[
{
'price_data': {
'currency': 'eur',
'product': stripe_product_id,
'unit_amount': prices[item.plan],
},
'quantity': 1,
},
],
mode='payment',
success_url = f"/purchase-success?session_id={{CHECKOUT_SESSION_ID}}&token={token}",
cancel_url='purchase-cancelled',
metadata={
'username': item.username,
'plan_id': item.plan,
},
)
I use python for my backend and already configured my products in stripe itself but the automatic tax does not seem to take effect
everything works except for the automatic tax
Can you share a sample Checkout Session ?
how can i do that?
You share a Checkout Session Id that didn't collected Tax
cs_live_a1v9P9GbyPS5voUCZNcqseyeGXEiypPfJ2hkuDWJKdCztksBA2sHK00CHD
from what I can see it says automatic tax enabled false, even though I already enabled it in my product
Yes Stripe tax is disbaled for this Checkout Session
Here how you can activate Stripe Tax:
https://stripe.com/docs/tax/set-up#integrate
And here is more detailed guide for integrating Stripe Tax with Checkout:
https://stripe.com/docs/tax/checkout
I did not have a tax registration set up but now I do
For any low-code products add the tax parameter: automatic_tax[enabled]=true. Checkout, Invoices, Subscriptions, Quotes, and Payment Links
should i add this piece to my code to finish it up?
it should work now?
What piece of code exactly ?
I added this to my checkout session code
automatic_tax={'enabled': True},
and i see VAT on my checkout session now so I assume when someone purchases it they will pay the tax now
Yes correctly
alright that's it, thanks for the help, the second url you sent helped me figure out the problem