#tymm
1 messages · Page 1 of 1 (latest)
Hi there,
When creating an Invoice you can enable automatic tax
https://stripe.com/docs/tax/invoicing?dashboard-or-api=api
https://stripe.com/docs/api/invoices/create#create_invoice-automatic_tax
Not sure if this what you are looking for.... if not what do you mean by "add tax/Default tax to an invoice"?
no i want to create an invoice with tax incurred
for subscription i can do something like this :
SubscriptionCreateParams.Builder paramsBuilder = SubscriptionCreateParams
.builder()
.setCustomer(customer.getId())
.setProrationBehavior(proration)
.setBillingCycleAnchor(anchor)
.setPaymentBehavior(SubscriptionCreateParams.PaymentBehavior.DEFAULT_INCOMPLETE)
.setDefaultTaxRates(taxList)
.setPaymentSettings(
SubscriptionCreateParams.PaymentSettings.builder()
.setSaveDefaultPaymentMethod(SubscriptionCreateParams.PaymentSettings.SaveDefaultPaymentMethod.ON_SUBSCRIPTION)
.build()
)
.addAllExpand(Arrays.asList("latest_invoice.payment_intent"));
to add tax onto the invoice. however i cannot find a way to add that into invoice with non subscription items
Ah you are talking about tax_rates.
You can use default_tax_rates property when creating an Invoice:
https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates
oh, didnt expect the name to be different. thanks