0

To clarify, this is a question for Stripe (an online payment processing app) API.

I want to limit the max quantity of a product depending on the subscription. So, lets say I have sub_id_1 and sub_id_2. I want to limit sub_id_1 product quantity to have a maximum purchase of 3 items, while sub_id_2 to have a maximum purchase of 1 item.

I do not have any code to show since it is just a API problem, but from what I get from the docs, it is possible to alter the quantity of the product in a subscription. However, I am not sure if it is possible to limit the quantity instead.

I would appreciate any kind of answers, feedbacks, or suggestions!

4
  • Are you referring to limiting the quantity in a single transaction, or limiting the quantity that can be accumulated into a subscription across one or more transactions? Commented Mar 8, 2021 at 8:37
  • @ed2 Accumulated quantity. So, since I am using Stripe customer portal to let the customer update their subscription details, I want to limit that change so that the quantity of that subscription is lower than a set value. Is there any way to achieve this? Commented Mar 8, 2021 at 8:49
  • I don't know if the customer portable is customizable in that way. I would recommend connecting to #stripe on IRC to ask the devs there how they would recommend implementing your proposed restriction. Commented Mar 8, 2021 at 8:50
  • @ed2 I see, thanks a lot for the suggestion! Will try that Commented Mar 8, 2021 at 9:39

1 Answer 1

1

There is not a way to do this with Stripe's API, so you'd have to handle enforcing this limitation within your application.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.