#Darby-credit-purchase

1 messages ยท Page 1 of 1 (latest)

jaunty fiber
#

Hi there! Can you explain a little bit more what you mean by that and exactly what you are trying to do?

gritty dock
#

So in our system we have users with credits, we want to apply this to a transaction. But they still need to taxed for the entire price. Is that a thing?

jaunty fiber
#

So you want to apply tax on top of the transaction amount?

gritty dock
#

errr, yes? OK so my user has $100 dollars in credits in my system. And they purchase something for $200. So I only want to charge them $100, and pay the taxes for the entire $200 purchase

jaunty fiber
#

How are you representing the $100 credits within Stripe? Are you taking that payment up front? Are you using customer balance?

gritty dock
#

I haven't gotten that far yet? The customer balance probably wont be in Stripe

jaunty fiber
#

Okay then you would need to calculate this yourself when you create the PaymentIntent to charge your customer.

gritty dock
#

That sounds right

#

I just dont know how to set it so that the tax should be on the entire amount, and not the subtotal

jaunty fiber
#

You likely want some conditional statements when you calculate the amount you want to charge.

gritty dock
#

sure, can you tell me what fields i should look into?

jaunty fiber
gritty dock
#

right, i just dont know how to set the tax for the full amount

jaunty fiber
#

To clarify... you wouldn't use the Stripe API to calculate amount here. You would write your own code to do so and then send that amount to the Stripe API

#

I think you are insinuating that you want Stripe to calculate the tax for you?

gritty dock
#

yeah

#

is there like a discount field or something? where i say the amount is 200, but there's a discount of 100, but the tax is for the entire 200?

jaunty fiber
#

Okay so yeah this isn't really how Stripe Tax works... the hacky workaround would be to preview an invoice for the amount that you want to charge tax on in order to see how much tax would be calculated. Then you would create the PaymentIntent based on that preview tax amount. I recommend reading through our docs on Stripe Tax to familiarize with how it works: https://stripe.com/docs/tax

gritty dock
#

OK

jaunty fiber
#

Ah yes, you could use coupons if you want to go that route

gritty dock
#

Maybe thats the route, I'll look into that

#

thanks bismarck ๐Ÿ™‚

jaunty fiber
#

Np!

#

"Question, how would I use a coupon while using stripe checkout?"

gritty dock
#

ty

jaunty fiber
gritty dock
#

are discounts applied pre or post tax?

jaunty fiber
#

Ah good question

#

I think pre-tax but I'd recommend testing

gritty dock
#

So it looks like i'll have to create a coupon before applying it as a discount?

#

OK, i can do that

jaunty fiber
#

Yes or you can provide promo codes

#

So your customers can enter the coupon themselves

gritty dock
#

gotcha

jaunty fiber
#

You can also apply coupons directly to customer objects

#

And then pass the customer object to the Checkout session

#

But don't think you really want to do that based on what you have stated so far

gritty dock
#

yeah that would cause issues if they dont complete the checkout

#

OK I'll do some testing, thank you again Bismarck