#Cookie-TaxRate
1 messages · Page 1 of 1 (latest)
yeah
Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
https://stripe.com/docs/api/checkout/sessions/create?lang=python#create_checkout_session-line_items-tax_rates you can pass the tax rates here
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
its not working
Can you show me your code? I don't see the tax_rate in the request.
stripe.TaxRate.create(
display_name="Sales tax",
percentage=8.75,
inclusive=False,
)
@app.route('/create-checkout-session-difo-pack', methods=['POST'])
def create_checkout_session():
if db['dimensionstock'] == "0 left":
return redirect('/outofstock')
else:
try:
checkout_session = stripe.checkout.Session.create(
line_items=[
{
'price': "price_1LI1xeL4D9X9MODjA1kSr5KN",
'quantity': 1,
},
],
shipping_address_collection={
'allowed_countries': ['US'],
},
shipping_options=[
{
'shipping_rate_data': {
'type': 'fixed_amount',
'fixed_amount': {
'amount': 0,
'currency': 'usd',
},
'display_name': 'Free shipping',
# Delivers between 5-7 business days
'delivery_estimate': {
'minimum': {
'unit': 'day',
'value': 7,
},
'maximum': {
'unit': 'day',
'value': 12,
},
}
}
},
{
'shipping_rate_data': {
'type': 'fixed_amount',
'fixed_amount': {
'amount': 400,
'currency': 'usd',
},
'display_name': 'USPS Tracking + Fast Shipping',
# Delivers in exactly 1 business day
'delivery_estimate': {
'm
Please remove your api_key in this chat
oh shii, can other people see it?
Yes
oop
ok
You should specify the tax_rates in the checkout session creation request, something like this.
line_items=[
{
'price': "price_1LI1xeL4D9X9MODjA1kSr5KN",
'quantity': 1,
'tax_rates': ['txr_1LI2yYL4D9X9MODjUGkkjngM']
},
],```
got it
how do i roll ?