#vishal4799-quote-discount

1 messages ยท Page 1 of 1 (latest)

fickle wind
#

@minor pebble I think at that point we still consider the coupon redeemed really

minor pebble
#

Thanks for the quick response. So I understood that even if the transaction with a coupon is never completed still it consider the coupon used to create the transaction is redeemed. Could you help me with the scenario where/how can I keep track of redeemed coupons without any payment?

fickle wind
#

We don't really have any solution for this in the API today unfortunately. You'd have to keep track of all redemptions yourself and track them after the quote's invoice is paid

minor pebble
#

no problem. Also, I had another query about my scenario. I am not 100% sure of the way I use Stripe APIs for my use case. Could please go through the below and let me know what I am doing is correct or there is an optimized way using other APIs?

#

For example, one time payment of 100$ with tax (using customer's billing address) and coupon:

  • Create a customer with a billing address
  • Create a quote (I really dont need a quote but I use "create a quote" API to calculate tax with a customer created in the above step)
  • Create a paymentIntent using the total amount return in a quote (which includes the tax amount too).
  • Ask for payment details on UI using card element.
  • Confirm the paymentIntent using the card details entered in the above step.
fickle wind
#

oh boy

#

I would definitely never recommend hacking the Quotes API just to get tax calculation, though I understand the appeal

minor pebble
#

I actually explored the checkout. My client doesn't want any redirection as we cache so much data in the client browser and it's hard to deal with when we use checkout.

#

I also tried to find a UI component that can be embedded in the Angular app and does everything (asking calculating tax, applying coupon and card details) but found only Card component that I am using to collect the card details.

#

Please let me know if there is a component in Stripe and I missed it.

fickle wind
#

there is no such UI right now, Checkout does all of that and that's highly recommended but otherwise you have to build all of this yourself

minor pebble
#

I see. Checkout is not an option for me :(.
What I am doing is not the optimum way so apart from a little more work in terms of implementation, do you see any major problem with my design?

#

especially security concerns

fickle wind
#

no major problem or security concerns!

minor pebble
#

Thanks for your answers. I believe my use-case is very common and there are many applications out there in the market that want to implement payment using APIs only so my feedback to Stripe is, have some APIs that fulfill all the tasks checkout offers.

fickle wind
#

We are directly working on this right now. We're rebuilding the Orders API to support automatic tax calculation (like Quote does) and it's in private beta! Hopefully more info next year!

minor pebble
#

Great. Glad to know. Bye for now. Is it ok to keep this thread open as I am going to have some heck design to implement discounts?

fickle wind
#

We can keep it open for now though we usually close it after a couple hours of inactivity. But you can always ask follow up questions in #dev-help

minor pebble
#

Sure thanks. It's just that I dont want to explain my use case again to someone else. ๐Ÿ™‚

fickle wind
#

yeah you will have to, we rotate across my team (we have people around the world) and reading a long backlog isn't really efficient ๐Ÿ™‚

#

your summary above was great, you should keep it in a file and just share this to explain the context ๐Ÿ™‚