#gesundheit-tax-subs

1 messages · Page 1 of 1 (latest)

jolly geyser
#

hello, sure ask away

lofty notch
#

hello!

#

Basically I asked the same question last night but there was little help during that time period, let me grab the previous conversation

#

so, the scenario is:

  • the prices of our products are before-taxes
  • a new customer, with no payment method attached, decides to buy a subscription of that product
  • then, they will see on the side of their screen the "invoice" they will be paying; on the other side, we prompt them to enter their billing information (guaranteed to be card)

what we want after this is that the user sees their invoice being updated with taxes based on their entered billing address
on the backend, when they initially press on checkout, we generate an invoice through the API endpoint subscriptionService.CreateAsync (using Stripe.NET)

then we return the client_secret to the frontend and let stripe elements take care of rendering the invoice.

#

so yeah. basically we wanted the invoice to be updated as the new user enters their credit card info.

lofty notch
#

hello?

jolly geyser
#

stretched across multiple threads! getting to yours in a sec

#

ok so before you create the Subscription, you want to show your customer their estimated total with tax, right?

lofty notch
#

yep

#

sorry, i was taken away as well

#

but here's the problem: we wanted to collect taxes based on our customer's billing address. That means technically everywhere Stripe supports.

jolly geyser
#

yeah so what you can do for that is try using the UpcomingInvoice endpoint to "preview" what creating a subscription for that customer would look like and preview taxes on that

lofty notch
#

hmm, does this affect the flow as mentioned above?

lofty notch
#

and if an upcomingInvoice's automatic_tax is set, where will it get the billing address?

jolly geyser
#

it should get billing address on the PaymentMethod attached to the Customer, that you pass as default_payment_method on the upcoming invoice

#

hmm, does this affect the flow as mentioned above?
does not affect that, you preview an upcomingInvoice to show what the customer is signing up for, before actually creating it

lofty notch
#

I'm reading the API on using UpcomingInvoice. It accepts either a customer or a subscription or subscription_items as parameters. What should I pass in when the subscription itself isn't created yet?

lofty notch
mighty swallow
#

If the subscription hasn't been created yet you should be passing in subscription_items along with customer

lofty notch
#

i thought subscription items are only created when a subscription is created

mighty swallow
#

Typically yes, but if you're specifically trying to preview the invoice for a subscription that hasn't been created yet we let you simulate it's creation with the upcoming invoices endpoint by passing in the fields you would set when you create a subscription (example: subscription_trial_end, subscription_cancel_at, etc).

lofty notch
#

so, i should specify

  • subscription_items (since i don't have the id for them because they don't exist, i guess i should supply price_ids instead?)
  • the start and end date of the intended subscription
  • customer_id
lofty notch
mighty swallow
#

If they don't have a payment method then this doesn't really work with automatic tax

lofty notch
#

so i guess we will have to collect the payment method first?

mighty swallow
#

Yeah, if your goal is specifically to test automatic tax with upcoming invoice, I think your only choice would be to collect the payment method first

lofty notch
#

we'll have to think about this for a bit

#

I'm going to jump out of this thread for now, since i have another question to ask

#

completely unrelated to this

mighty swallow
#

You can still ask it here!

lofty notch
#

mm oko

#

ok

#

so we are thinking about preview invoices (well yeah upcoming invoices)

#

long before the renew period

mighty swallow
#

When you say "long before the renew period" do you mean a different billing cycle, or is it the same billing cycle but the renewal date is just a ways off?

lofty notch
#

same billing cycle, same renewal date

#

but being able to have the invoice generated so that the user has a pdf to look at

mighty swallow
#

If you want to generate an invoice for the user to look at that would be something you need to make yourself, but upcoming invoice should still work perfectly fine with this

lofty notch
#

ok, got it. it's just a matter of how we generate the pdf using the info returned through upcoming invoice

mighty swallow
#

Yup! and that part would be up to you to implement

lofty notch
#

cool, thanks!