#KarlS
1 messages · Page 1 of 1 (latest)
Hi, can you add more details here? Where are you looking? Can you share the request id here? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
I'm using Strip.PromotionCodeService and sending a PromtionCodeListOptions with my PromotionCode.
So when I call, service.List(options) I get back 0 results. OK, looking for the API request.
I recommend that you follow this 'Retrieve a promotion code' endpoint: https://stripe.com/docs/api/promotion_codes/retrieve
What is the item I'm looking for /v1/what
it would be /v1/promotion_code/
OK, I don't see that.
Can you use this, https://stripe.com/docs/api/promotion_codes/retrieve endpoint and look at the sample request and try making the call again?
hold on.. trying to copy/past code here.
what is the syntax for code?
` var client = new Stripe.StripeClient(_key);
var service = new Stripe.PromotionCodeService(client);
var options = new Stripe.PromotionCodeListOptions()
{
Code = PromotionCode
};
var codes = service.List(options); `
Looking at your resource now..
This ^^^ has worked for me in other projects.
SEUDO:
using user promo code, find the promotion code id that matches, attach this ID to the Invoice request
var options = new PromotionCodeListOptions
{
Limit = 3,
};
var service = new PromotionCodeService();
StripeList<PromotionCode> promotionCodes = service.List(
options);
Does the above work?
*pseudo
If you just list and limit it to 3?
You mean, just get every promo code (limit 3)?
I'll need to compile and try... a few secs
yeap, just trying to rule things out
I'm trying the same calls on my end, it's in Node though
do you only have 2 coupons?
Do you have two accounts?
Did you create these coupons in live mode vs test mode?
Are you using your test or live mode key?
What is the id of the promo code you're expecting?
OK, I should be in TEST mode... and I only see a single coupon. I wonder if I accidently created this in PROD (checking)
Yep, "some-beach" motha-trucker
I'm looking for the promotion code object id: https://stripe.com/docs/api/promotion_codes/object?lang=dotnet
It would start with promo_
I think everything is going to work here now.. just added the coupon and promo code in TEST and now testing.
YEP!!! Thanks.
Glad to hear!
In the words of Paul Harvey, "Good day"