#MadMac

1 messages ยท Page 1 of 1 (latest)

sterile ospreyBOT
somber gorge
#

The payment integration doc you shared is only for payment without tax rate

worthy citrus
#

Is it possible to use tax rates with Stripe Elements?

somber gorge
#

It's not possible to use Stripe Element with PaymentIntent created directly from API.

It's only possible to use Stripe Element with PaymentIntent created via invoice.

worthy citrus
#

Ok so if I create an invoice via the API then I can use the payment intent from this and somehow use this with Stripe Elements?

#

Does there happen to be any examples onthis?

somber gorge
#

We don't have an example for this. I'd recommend following docs:

  1. Create a tax rate: https://stripe.com/docs/billing/taxes/tax-rates
  2. Create an invoice: https://stripe.com/docs/invoicing/integration
  3. Add tax rate before finalizing an invoice: https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates
  4. Get and expand payment intent from the invoice to obtain the payment intent client secret: https://stripe.com/docs/api/invoices/object#invoice_object-payment_intent
  5. Pass the payment intent client secret to the Payment Element and the rest of steps remain the same
#

Alternatively, you can just calculate the tax in your system internally, then set the final amount with tax in PaymentIntent. In this case, tax rate won't be used and tax calculation is within your system

worthy citrus
#

Ok thanks I will take a look at that. I want the GST on the receipt and any invoices so the alternative option will not work

somber gorge
#

No problem! Happy to help ๐Ÿ˜„

worthy citrus
#

One last question

#

Is it possible to just put some text on the receipt? e.g. "Total includes GST"

#

and 2. Is a receipt sent if I add a customer to the paymentIntent creation or do I need to add receipt_email?

somber gorge
worthy citrus
#

Ok thanks. Maybe I can solve this by continuing to use payment intents and just adding the "(inc GST)" to the end of the description. That way it will appear in the receipt and invoice.

somber gorge
#

No problem ๐Ÿ˜„