#KarlS

1 messages · Page 1 of 1 (latest)

rose driftBOT
hearty folio
stable cave
#

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.

hearty folio
stable cave
#

What is the item I'm looking for /v1/what

hearty folio
#

it would be /v1/promotion_code/

stable cave
#

OK, I don't see that.

hearty folio
stable cave
#

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

hearty folio
#

var options = new PromotionCodeListOptions
{
Limit = 3,
};
var service = new PromotionCodeService();
StripeList<PromotionCode> promotionCodes = service.List(
options);
Does the above work?

stable cave
#

*pseudo

hearty folio
#

If you just list and limit it to 3?

stable cave
#

You mean, just get every promo code (limit 3)?

#

I'll need to compile and try... a few secs

hearty folio
#

yeap, just trying to rule things out

stable cave
#

trying now..

#

I get back 2

hearty folio
#

I'm trying the same calls on my end, it's in Node though

#

do you only have 2 coupons?

stable cave
#

Neither of which are my specific PROMO code.

#

No, I have (checking)

hearty folio
#

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?

stable cave
#

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

hearty folio
#

It would start with promo_

stable cave
#

I think everything is going to work here now.. just added the coupon and promo code in TEST and now testing.

#

YEP!!! Thanks.

hearty folio
#

Glad to hear!

stable cave
#

In the words of Paul Harvey, "Good day"