#dineshkumar_docs

1 messages ยท Page 1 of 1 (latest)

sharp pulsarBOT
#

๐Ÿ‘‹ 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.

lapis quiverBOT
#

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.

shy pewter
#

Hi, let me help you with this.

#

What do you mean by "apply promocode subscription items" exactly?

forest mountain
#

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

#

is this work for my scenario?

shy pewter
sharp pulsarBOT
forest mountain
#

ok

#

// 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);

shy pewter
forest mountain
#

ok

gilded iron
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

forest mountain
#

from above two points which one i should use?

gilded iron
#

it depends on what you want to achieve

#

if you apply a discount on a subscription level it will get applied to all subscription items that are valid