#dineshkumar_docs
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1262690722591670414
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- dineshkumar_docs, 4 days ago, 18 messages
- dineshkumar_docs, 5 days ago, 30 messages
- dineshkumar_docs, 6 days ago, 16 messages
Hi, let me help you with this.
What do you mean by "apply promocode subscription items" exactly?
i created subscription with multiple iteams
but i want to apply promocde for one specific subscription item.
is this possible in .net ocde?
please give example link
i also checked link https://docs.stripe.com/billing/subscriptions/coupons?dashboard-or-api=api&lang=dotnet#stackable-coupons
is this work for my scenario?
You can only apply Coupons to Subscriptions. However, you can limit Coupons to work for specific Products, which will solve your problem: https://docs.stripe.com/api/coupons/create#create_coupon-applies_to-products
ok
can i control in this code? i also checked link https://docs.stripe.com/billing/subscriptions/coupons?dashboard-or-api=api&lang=dotnet#stackable-coupons
// Set your secret key. Remember to switch to your live secret key in production.
// See your keys here: https://dashboard.stripe.com/apikeys
StripeConfiguration.ApiKey = "sk_test_51OWKGRESdEyRtJkzdDI3KuPD3BpBXrA51Huo3iePv7VJjPlR8yK3GjqddXMJA1AhpONuQ2Uy4RmVnOugMhvzbtIi00MvmqtjxG";
var options = new SubscriptionCreateOptions
{
Customer = "{{CUSTOMER_ID}}",
Items = new List<SubscriptionItemOptions>
{
new SubscriptionItemOptions
{
Price = "{{PRICE_ID}}",
Discounts = new List<SubscriptionItemDiscountOptions>
{
new SubscriptionItemDiscountOptions { Coupon = "item-coupon" },
new SubscriptionItemDiscountOptions { PromotionCode = "item-promo" },
},
},
},
Discounts = new List<SubscriptionDiscountOptions>
{
new SubscriptionDiscountOptions { Coupon = "sub-coupon" },
new SubscriptionDiscountOptions { PromotionCode = "sub-promo" },
},
};
var service = new SubscriptionService();
service.Create(options);
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yes, it seems like you can add discounts to individual items now too: https://docs.stripe.com/api/subscriptions/object#subscription_object-items-data-discounts
ok
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
- You can only apply Coupons to Subscriptions. However, you can limit Coupons to work for specific Products, which will solve your problem: https://docs.stripe.com/api/coupons/create#create_coupon-applies_to-products
- Yes, it seems like you can add discounts to individual items now too: https://docs.stripe.com/api/subscriptions/object#subscription_object-items-data-discounts
from above two points which one i should use?