#adeel_api
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/1264897339202605100
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! well price_1PbcXHI0DGZ9CkPIfPw2aA3J is a one-time $100 item, not a subscription-related item, so that seems expected to me.
if you want to "preview of subscription before we actually purchase it on our devices" you should pass the actual parameters you'll pass to creating the Subscription(i.e. your recurring Price object ID).
return this.stripeClient.invoices.retrieveUpcoming({
subscription_items: [{
price: priceId
}],
discounts: couponCodes.map((e) => ({ coupon: e })),
})
my question will be how are our other flows working like coupons with forever and one are working
even on one time calculation
because ``duration=repeating` coupons only work with recurring Prices.
If you have a invoice with both recurring and one-time items like this, you should apply the discount/coupon directly at the item level: https://docs.stripe.com/api/invoices/upcoming#upcoming_invoice-subscription_items-discounts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.