I've implemented the new Stripe Checkout
on my NodeJS server
, but I cannot specify the Tax Rate for Invoicing.
As per my understanding Tax Rates should be specified in the Payment Intent API. Fact is that the new Checkout
automatically creates a Payment Intent
via its CreateSession (see payment_intent_data
), but I'm not able to insert a Tax Rate upon its creation.
How can this be done? What I want to achieve is to have the user know the Tax % both in the Checkout UI
and in the final email invoice
.
This is my code:
return stripe.checkout.sessions.create({ payment_method_types: [paymentMethod], line_items: [{ name: name, description: description, images: [imageUrl], amount: amount, currency: currency, quantity: 1 }], success_url: successUrl, cancel_url: cancelUrl, customer: stripeId, payment_intent_data: { receipt_email: email, metadata: { userId: userId, amount: amount, currency: currency, ref: ref, stripeId: stripeId, details: details } } }).then(session => { return res.send(session)
Yes, we charge the Stripe Tax fee even if the tax amount calculated is zero, for example, if: You have an active registration covering the customer jurisdiction. The products sold are exempt (from sales tax) or out of scope (of VAT) The customer is tax exempt or a reverse charge applies.
How to Calculate Sales Tax. Multiply the price of your item or service by the tax rate. If you have tax rate as a percentage, divide that number by 100 to get tax rate as a decimal. Then use this number in the multiplication process.
For Stripe users in Australia, Goods and Services Tax (GST) is included on Stripe's payment, foreign exchange, and dispute fees at the current rate of 10%.
Stripe Tax lets you calculate and collect sales tax, VAT, and GST with one line of code or the click of a button.
At the time of this answer, Stripe Checkout does not support Tax Rates.
One alternative is to collect payment details using "setup" mode Checkout [1], then create a PaymentIntent [2] from your server with the PaymentMethod collected in Checkout and the Tax Rate you'd like to use.
[1] https://stripe.com/docs/payments/checkout/collecting
[2] https://stripe.com/docs/api/payment_intents/create
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With