I'm trying to set up a basic Stripe store to sell some t-shirts I silkscreened. I'm using this React setup. Each shirt has a limited quantity, about 12 of each size. I want to make it so when a size is sold out, the "add to cart" button disables.
Is there a way to track quantity with Stripe in this way? I can't seem to find any docs.
You client side app need to be aware of each client that buys a shirt.
There are several ways to achieve this.
x seconds
you check all displayed t shirts on the screen quantities. aka: setInterval(checkAvailability, x)
socket
or server side events
and each time a t-shirt is bought, you notify your client side app.