#maria_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1311654999910125579
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
Hi Tarzan! thank you
Taxes are calculated based on the customer location
always?
so I guess you would need to create a tax rate for non-UK customers
so the workaround is to add tax registrations for any other country?
that wouldnt' work as we are not actually registered in all the countries
Stripe calculates tax on a transaction taking into account some or all of the following factors:
The location of the seller
The location of the customer
The type of the product sold
Whether the transaction involves a reverse charge
The status of the customer (for example, whether theyโre a VAT-registered business, private person or an exempt organization)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok I can see I can create a tax rate, but then for products, I can only assign a tax_code, not a tax_rate
so how do I link that tax rate to the product I'm selling?
it's on prices that you need to pass the tax rates and not on products
hi! I'm taking over this thread. let me know if you have other questions.
yes, still, the price only takes the tax behaviour but not a tax rate
API documentation is great as invididual models but it is not great explaining how models are related
I'm not sure I understand your question. can you share more details? a concrete example would help.
sure, sorry.
https://docs.stripe.com/api/tax_rates I can create a tax rate of the 20%, as that is what I need for every invoice we generate
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
my problem is I don't know how to assign that tax rate to product, prices or payment links for it to take effect
as I can see in the api docs: https://docs.stripe.com/api/prices/create that I can create a price with tax_behaviour, but I cannot link it to a created tax_rate
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
how are you accepting payments? Checkout Session, Payment Element, something else?
Payment links
Payment Links don't support Tax Rates.
but you could use Checkout Session: https://docs.stripe.com/api/checkout/sessions/create?lang=php#create_checkout_session-line_items-tax_rates
can checkout sessions be shared with customers?
Do they have a url with UI the same as a payment link?
yes it's the same. but you will need to write code to create each Checkout Session
here's our guide on Checkout Session: https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=stripe-hosted
ah ok, It hought these were to build embedded stripe payments in your website
where will I be able to track how many checkout sessions are created? I cannot see that in the Dashboard
and I cannot see the url that the checkout session has once it has been created, so how do I share it?
where will I be able to track how many checkout sessions are created? I cannot see that in the Dashboard
you can track that with your own code. or by listing Checkout Session with the API: https://docs.stripe.com/api/checkout/sessions/list
and I cannot see the url that the checkout session has once it has been created, so how do I share it?
It's in theurlproperty: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-url
happy to help ๐
now that I have you here
is there any way to set up expiration datetime to these checkout sessions?
or only way to control that is by me running a cron job on my side and deactivating them once I need it?
by default the link expires after 24 hours. but you can change that here: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-expires_at
ahhh that's great