#riptired

1 messages ยท Page 1 of 1 (latest)

chrome violetBOT
dusky quarry
#

Let's use this new thread. Can you sum up what that thread was about?

vague dust
#

Hey Pompey, I need to supply a checkout session with a shipping cost so that it shows up as a line item / as shipping cost as shown in this screenshot

#

Like underneath the subtotal

#

@dusky quarry

dusky quarry
#

Gotcha thank you. Checking in to how to do this and will get back to you

vague dust
#

Also regarding the last image from the previous thread

dusky quarry
#

Putting that here for my reference

vague dust
#

Thanks

dusky quarry
#

A python example would look like

    {
      "shipping_rate_data": {
        "type": "fixed_amount",
        "fixed_amount": {"amount": 1000, "currency": "usd"},
        "display_name": "Shipping",
        "delivery_estimate": {
          "minimum": {"unit": "business_day", "value": 1},
          "maximum": {"unit": "business_day", "value": 2},
        },
      },
    },
  ],
vague dust
#

Ah okay great, I missed that

vague dust
#

Another question -- if i am not registered in a state for sales tax can i prevent that checkout from being available?

dusky quarry
#

As in limit where shipping can go? Checking in to that...

vague dust
#

thanks

dusky quarry
vague dust
#

Okay sounds good, yeah I have seen the countries params

chrome violetBOT
dusky quarry
#

Hey apologies for the delay. It looks like we don't support restricting by state at the moment. If you write in to our support team with your use case they can put in a feature request for it though.

A colleague had two potential workarounds that may help you here:

  1. You can collect shipping info on your own page before the Checkout Session, validate it is a state that you can work with there, and then pass that info in to the Checkout Session when creating it.
  2. You can use payment methods that support manual capture and then decide to cancel or capture the payment on the server after their Checkout Session is completed. This one would be trickier because the Checkout Session would appear successful so you would have to try to be very clear in communicating which states you ship to before the session and would probably want to notify them that their order was cancelled after
#

Also in that case you could set custom_text[shipping_address] to say "We don't ship to X Y and Z" for extra clarity on the page itself

vague dust
#

No worries thanks for the writeup here

#

1 seems like the best solution for us, was trying to see if there was a different way

#

One more question @dusky quarry do I need to specifically file my actual state registrations in stripe tax or just enable them

#

when I modified my tax settings it just asks if I am registered or not, not for the actual registration number am I missing a follow up step?

silent hill
#

๐Ÿ‘‹ stepping in as Pompey needed to step away

#

You need to handle registration outside of Stripe