#bruno224466

1 messages · Page 1 of 1 (latest)

scenic pebbleBOT
pallid grail
#

Hi, looking forward to your input, thanks!

dense nymph
pallid grail
#

Yes, second.

#

Here's the info from the logs:

[Billing] [API] [Stripe] message="Request to Stripe API" api_version=2022-08-01 idempotency_key=40e3e2ff-ed15-4235-9a6c-04e150c93482 method=post num_retries=0 path=/v1/subscriptions [Billing] [API] [Stripe] message="Stripe API error" status=400 error_code=customer_tax_location_invalid error_message="The customer's location isn't recognized. Set a valid customer address in order to automa tically calculate tax." error_type=invalid_request_error idempotency_key=40e3e2ff-ed15-4235-9a6c-04e150c93482 request_id=req_ixrKvIUZ44iXza [Billing] [API] [Stripe] message="Response from Stripe API" api_version=2022-08-01 elapsed=0.717382000759244 idempotency_key=40e3e2ff-ed15-4235-9a6c-04e150c93482 method=post path=/v1/subscriptions request_id= req_ixrKvIUZ44iXza status=400

#

Sorry for the noise above, the request id is: req_ixrKvIUZ44iXza

dense nymph
#

thanks for sharing, checking...

#

You need to set an address for the customer cus_OnAazRGXbzfE0N in order to use Stripe Tax

pallid grail
#

Thanks for confirming that.
Is there a way for the customer address to be applied from payment_method.billing_details address when doing stripe.confirmCardPayment() via JS?

dense nymph
#

First, why you are using ConfirmCardPayment and not confirmPayment ?

pallid grail
#

I could be mistaken, but I think this method was used in the tutorials or video guides at the time I was implementing this. This was about 1.5 years ago.

dense nymph
#

You should use confirmPayment if there is no explicit reason for that

#

Now back to your question, you need to collect the customer's address

pallid grail
#

Ok, I think I can make the transition to confirmPayment(). Other being the recommended method, does it somehow change the Stripe Tax flow we were discussing?

#

Any chance I can use the address submitted along with card details?

scenic pebbleBOT
pallid grail
#

I was looking at the "address element" you linked. Thanks for that.
So, my subscription checkout flow only has "Country" field in addition to Card payment element field. (screenshot added)

Would this be a good flow then:

  • After the user sets (or changes) country value - update Stripe Customer. I think I can do this using Address Element too, need to investigate more.
  • Now that Stripe Customer has an address (Country) Stripe Tax should work.

Does the above sound correct?