#Rohit89

1 messages · Page 1 of 1 (latest)

normal rootBOT
old meadow
#

Hello! You want the specific tax calculated for a payment you mean?

tough arch
#

I have subscription ID in test mode - sub_1Me0FmLv5rdhLZWUFKPMvT4P
When I retrieve not able to see the tax being deducted

#

Tax is calculated already

#

I want to see that info in subscription object

#

When I try to fetch like this Stripe::Subscription.retrieve( sub_id)

old meadow
tough arch
#

So subscription won't have tax information?

#

How I can get to know how much tax is being applied to the subscription? As I want to show subscription to the user -- so I need to break down it

old meadow
#

No. The Subscription generates Invoices for each period, the Invoices deal with the actual payments for each period, including tax.

#

You need to retrieve the Invoice and get the data from there.

#

The tax may change from one period to the next, so you can't just show a static value for the whole Subscription.

tough arch
#

ok, So i need to get the invoice id from subscription

#

And then reterive the latest invoice

old meadow
#

Subscriptions have a latest_invoice property.

tough arch
#

Subscription can have multiple items. Our user is subscribed with Plan A. Later they can add seats in the same subscription. So we are going to create item with quantity in same subscription.

      Stripe::SubscriptionItem.create({
        subscription: subscription_id,
        price: seat_price,
        quantity: 4,
        proration_behavior: 'always_invoice'
      })

How I can make sure this subscription item charges same tax that is being charged for subscription?

#

Do I need to pass the tax information while creating the subscription item?

narrow egret
#

Hi there 👋 taking over, as my colleague needs to step away

Give me a few minutes to get caught up.

tough arch
#

ok

#

Is there parameter that can be passed while creating subscription item, that calculate the tax according to the address being saved for customer in stripe/?

#

Or tax being applied on subscription

narrow egret
#

I believe you just need to update the Price and Product to include tax: https://stripe.com/docs/tax/subscriptions#product-and-price-setup

This can be done when creating the Subscription as well, by creating a new Product and Price in-line with the Subscription. You can set tax_behavior and tax–rates on the line_items during creation: https://stripe.com/docs/api/subscriptions/create#create_subscription-items-price_data-tax_behavior
https://stripe.com/docs/api/subscriptions/create#create_subscription-items-tax_rates

Learn how to collect and report taxes for recurring payments.

tough arch
#

Right now on checkout we have this

#

automatic_tax: { enabled: true }

#

We dont have tax save for product/price

#

we are calculating when user type address while checkout due to this

#

automatic_tax: { enabled: true }

#

that calculate the tax

#

as we are passing

#

automatic_tax: { enabled: true }

#

on checkout

narrow egret
#

Ah, I didn't realize you were using Checkout. Can you elaborate on what your question is?

tough arch
#

So on checkout we are calculating tax as soon as user enter zip/address. Subscription is created /user is being charged including tax.

Later user can add more seats in the plan. So we are creating another subscription item with x quantity... There we also want the same tax to be charged that is charged on checkput when subscription is created

narrow egret
#

Do you have that system up and running right now? If so, is it not working?

I thought that tax carried over to the new Subscription items automatically if they were created with an automatically taxed Subscription

tough arch
#

Stripe::SubscriptionItem.create({
subscription: subscription_id,
price: seat_price,
quantity: 4,
proration_behavior: 'always_invoice'
})

Creating a subscription item like this... will only charge the price passing in price attribute. I guess....

#

Or will it charge the tax too that is charged while creating sub via checkout

#

I need to implement. So I am testing the stripe API calls

narrow egret
#

Yeah, the Subscription should still calculate tax on the new quantity if you're using the same taxable Price when you create the Subscription Item

tough arch
#

Subscription is already created with tax being paid.

But when I am creating subscription item, It will charge immediately including tax ? Or it will charge tax on next cycle when sub renew?

narrow egret
tough arch
#

Ok. Is there way to calculate prorated amount that we are going to charge user?

Example. Subscription is created on Feb, 1.

But subscription item is going to be created on Feb 20 with quantity 4. So there will be prorated amount from 20 feb to 28 feb. And then new cycle will start on March 1.

On March 1, User will be charged for subscription that include the item.

#

But we want to show the user when they add the item. How much amount being charged to them -- let's say they buy seats on 20 of feb and subscription is created on feb 1

narrow egret
tough arch
#

will it provide the prorate amount value that will be charged at the time of item creation?

narrow egret
#

No, that will just tell you what the amount would be on the next billing cycle. You can't get the proration amount before updating the Subscription unfortunately

tough arch
#

So there is no way to find the prorated amount. If I creating subscription item today and subscription is created on Feb1.

I just want to know the amount that stripe will charge today for that item from FEB 1 to today

narrow egret
#

Correct

tough arch
#

what about this - subscription_proration_date

narrow egret
#

That's the date of the proration, so I'm not sure how you would use that to do what you want to do

tough arch
#

for upcoming invoice

#

how dates can be passed

#

and get the amount