#sqarf

1 messages · Page 1 of 1 (latest)

nova anchorBOT
inner vigil
#

what part of it doesn't work specifically, do you get some error message?

scarlet kestrel
#

Yes

#

Automatic tax calculation in Checkout requires a valid address on the Customer. Add a valid address to the Customer or set either customer_update[address] to 'auto' or customer_update[shipping] to 'auto' to save the address entered in Checkout to the Customer. {"exception":"[object] (Stripe\Exception\InvalidRequestException(code: 0): Automatic tax calculation in Checkout requires a valid address on the Customer. Add a valid address to the Customer or set either customer_update[address] to 'auto' or customer_update[shipping] to 'auto' to save the address entered in Checkout to the Customer.

#

But for US we shouldn't apply any taxes

#

The object (in php) I try to create, looks like this:

#

return $this->stripe->customers->update(
$user ? $user->stripe_id : $request->user()->stripe_id,
[
'address' => [
'country' => $request->country,
'city' => $request->city,
'line1' => $request->line1,
'line2' => $request->line2,
'postal_code' => $request->postal_code,
'state' => $request->state,
],
'tax_exempt' => $taxExempt,
]
);

#

$taxExempt variable contains a string 'none'

#

I guess the question is what should I pass to tax_exempt, so stripe knows that we shouldn't apply any tax

inner vigil
#

so to rephrase, the customer is updated just fine, but your belief is that because the customer is marked tax exempt you want Checkout to not ask for an address?

scarlet kestrel
#

It can ask address on stripe checkout, but it doesn't create Stripe Checkout object

inner vigil
#

also what is the request ID req_xxx associated with the exception you posted so I can look ?

scarlet kestrel
#

Oh one minute

#

req_yVXY6dpRV2DzFa

#

For example this one

inner vigil
scarlet kestrel
#

Is it mandatory to have full address?

inner vigil
#

so as the error message implies, you either need to make sure the customer has an address set before calling that API, or use the parameters it mentions so that Checkout will collect+use an address

inner vigil