#dineshkumar_error
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/1263413225878458368
๐ 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, 1 day ago, 24 messages
- dineshkumar_docs, 6 days ago, 18 messages
Hi, let me help you with this.
Have you tried options.AddExpand("data.coupon.applies_to.products")?
No, ok i will check ...
thanks
i trired above code i got this error: "This property cannot be expanded (data.coupon.applies_to.products)."
my code is
No need to share the code
ok
I guess products is not an expandable property. You will need to fetch them by ID: https://docs.stripe.com/api/products/retrieve
i want exapnd promocode applies_to.products, please
i got this response of promocode , in this object i want expand "applies_to"
PromotionCode
"<Stripe.PromotionCode@50358721 id=promo_1Pdp9dBUmBAZBIgtqSICEPwX> JSON: {
""id"": ""promo_1Pdp9dBUmBAZBIgtqSICEPwX"",
""object"": ""promotion_code"",
""active"": true,
""code"": ""Test100OffPromo"",
""coupon"": {
""id"": ""E3cHzmP4"",
""object"": ""coupon"",
""amount_off"": null,
""applies_to"": null,
""created"": 1721289213,
""currency"": null,
""currency_options"": null,
""duration"": ""once"",
""duration_in_months"": null,
""livemode"": false,
""max_redemptions"": null,
""metadata"": {},
""name"": ""Test100OffCoupon"",
""percent_off"": 100.0,
""redeem_by"": 1725163140,
""times_redeemed"": 0,
""valid"": true
},
""created"": 1721289213,
""customer"": null,
""expires_at"": 1725163140,
""livemode"": false,
""max_redemptions"": null,
""metadata"": {},
""restrictions"": {
""currency_options"": null,
""first_time_transaction"": false,
""minimum_amount"": null,
""minimum_amount_currency"": null
},
""times_redeemed"": 0
}"
๐ taking over for my colleague. Let me catch up.
You can't, sorry.
You will need to get the products array and fetch each Product individually.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i saw here expand
i want to get coupon's Applicable Products ? is this possible.
You can expand the coupon.applies_to, but not coupon.applies_to.products.
let me know if you need any more help