#xXstonerXx-taxrates-list
1 messages · Page 1 of 1 (latest)
hello, you need a secret key to list TaxRates and you cannot do that from your frontend as that means your secret key is public. You need to make the request from your frontend to your backend, and your backend talks to Stripe
@teal citrus Understood. I will do as suggested, thanks.
Also, when I have the tax-id and the product-id, can you share the best practices of how to send request from front-end to back-end about checkout metadata?
There isn't really a "best practice". Not entirely sure what part is blocking/confusing you
I am just not able to find a good flow of connecting the front-end stripe js, containing tax-id and product-id , with back-end to eventually create a payment @ember wagon
payments don't take a tax rate at all
What are you really trying to do? Where does the TaxRate id come from? Why is your customer choosing this client-side?
i will explain you the flow I am trying to achieve
So I have products created on the stripe dashboard, and also the tax rates for various provinces (Canadian context).
What I want is, on the front-end when the payment form is rendered, I want to fetch all the tax rates from stripe dashboard, which I believe is achievable using this docs piece - https://stripe.com/docs/api/tax_rates/list. The payment form is rendered only after the product has been selected (only one product checkout scenario). Now, since I have all the tax rates, I will bind these to a dropdown which will make it dynamic according to the selected province. The province changes, so does the displayed taxes to the user
What I want to know is the aftermath of this. I have the product-id and tax-id along with rest of the info like card number and stuff on the front-end. Now what?
@ember wagon
You write code to submit those values to your server in Javascript. It's the same way you would if you built a login screen, or anything really
Yes, but which stripe api to use to complete the payment?
can you please link the stripe completing payment for subscriptions and for one time payment as well?