#ask4clarity

1 messages · Page 1 of 1 (latest)

devout fossilBOT
faint fjord
#

Hello! Are you talking about using Stripe's hosted Checkout? Or is this your own UI?

dapper gyro
#

I am using the hosted checkout. This is a part of checkout session object currently:

          {
            shipping_rate: 'shr_12345abcd12345abcd',
          },
          {
            shipping_rate_data: {
              type: 'fixed_amount',
              fixed_amount: {
                amount: 0,
                currency: 'usd',
              },
              display_name: 'Free shipping',
              delivery_estimate: {
                minimum: {
                  unit: 'business_day',
                  value: 5,
                },
                maximum: {
                  unit: 'business_day',
                  value: 7,
                },
              },
            },
          },
        ],
faint fjord
#

What kind of workaround were you hoping for? If you're using Stripe's hosted checkout there isn't really much you can do to work around that apart from charging for shipping separately after the fact, or maybe refunding the customer some amount if you overcharged for shipping

shut plover
#

hi all

dapper gyro
#

Well I guess I was hoping to do something similar to receiving an event at another endpoint (which I currently have set up with checkout.session.completed) but during user interaction so I can access their address in real time to create some sort of calculation. Are you saying if I create custom UI something like that would be possible?

faint fjord
#

Yeah if you were to create your own UI then yes, all of this would be under your control and you could calculate the shipping from the address provided

#

But if you're using our Checkout page, the really your best option is the fixed shipping

dapper gyro
#

Okay thats more clear. Thank you.

#

Oh I have one more quick question actually. Are taxes not calculated by default in test mode? I have automatic_tax enabled but its still coming out to 0 during testing.

faint fjord
#

If you have automatic tax enabled it should be calculating, but it does depend a lot on the actual address used during shipping/whether you're registered correctly

#

For example - some product types may be considered nontaxable in certain countries/jurisdictions

dapper gyro
#

Okay great to know. Thanks for pointing me in the right direction.