#imox29
1 messages · Page 1 of 1 (latest)
👋 How can we help?
when i create checkout I get this error "StripeInvalidRequestError: 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."
{
"metadata": {
"uid": "54c6ffdb71878a8f4b0aa17a",
"quantity": "9",
"newPlanId": "price_1MtVU6COWnEzn9o8z2DrFel4",
"stripeCid": "cus_EBCRtZgIpvDX5R"
},
"customer_update": {
"shipping": "auto"
},
"automatic_tax": {
"enabled": "true"
},
"customer": "cus_EBCRtZgIpvDX5R",
"line_items": {
"0": {
"quantity": "9",
"price": "price_1MtVU6COWnEzn9o8z2DrFel4"
}
},
"allow_promotion_codes": "true",
"cancel_url": "http://localhost:8080/api4/users/stripe-handler/failure",
"mode": "subscription",
"success_url": "http://localhost:8080/api4/users/stripe-handler/success"
}
Can you share the request ID (req_xxx) where you faced this error? 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.
sure
req_AxeNHNz44U6LmJ
the error does not make sense
although the customer may not have address but i am passing "customer_update": {
"shipping": "auto"
},
"automatic_tax": {
"enabled": "true"
},
Can you also add to enable shipping_address_collection to check if it works? For example:
shipping_address_collection: {
allowed_countries: ['US'],
},
trying
still same error
req_s2PmJJVDkpozRy
StripeInvalidRequestError: Automatic tax calculation uses fields saved on the Customer. To collect a shipping address with automatic_tax enabled, set customer_update[shipping] to 'auto' to save the shipping address back to the Customer.
scratching my head over this for 2 days
Let me double check and get back to you
🙏
Oh wait! I noticed your request set to customer_update.address=auto instead of customer_update.shipping=auto in https://dashboard.stripe.com/test/logs/req_s2PmJJVDkpozRy
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Can you try setting to customer_update.shipping instead?
it worked with customer_update.shipping
i think the stripe needs to update docs that says : shipping_address_collection field is rrequired for automatic_tax collection?
Thanks for sharing! The code example has shipping_address_collection, but it doesn't mention about it explicitly
right
also why not address instead of shipping address, as a sass product there is no shipping needed but we are asking customers for shipping address 🤔
There are a few types of addresses such as billing and shipping addresses. Stripe Tax uses shipping address to determine the tax on the customer.
ah! makes sense from stripe's pov but still a little odd for us
one last question:
if the user is from AS: American Samoa
CC: Cocos (Keeling) Islands
CX: Christmas Island
CU: Cuba
FM: Federated States of Micronesia
HM: Heard Island and McDonald Islands
IR: Iran (Islamic Republic of)
KP: Democratic People's Republic of Korea
MH: Marshall Islands
MP: Northern Mariana Islands
NF: Norfolk Island
PW: Palau
SD: Sudan
SY: Syrian Arab Republic
UM: United States Minor Outlying Islands
VI: Virgin Islands (U.S.)
stripe does not automatic tax or it does not support tax itself?
shipping_address_collection.allowed_countries
REQUIRED
An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI.
Could you share where you see this message from?