#akii
1 messages · Page 1 of 1 (latest)
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I have the promo code here promo_1MPmr0ELLM3Jv5QRqJx6NtyT
No, I mean the ID of the GET request you made that return empty result
req_if3vJBewrVRCKH
OK, so you are trying to list the promo codes, not products. Is this the correct understanding?
I was trying to get the applicable products from the response im getting
coupon.getAppliesTo()
Do you mean the applies_to field of the coupon object (https://stripe.com/docs/api/coupons/object#coupon_object-applies_to)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes i mean this
As explained in the API reference, This field is not included by default. To include it in the response, expand the applies_to field.
Oh okY
gOT IT
Trying this out
Hi Can u check this one?
Im getting error in this req_NZFEcPu6zh3Ux7
"This property cannot be expanded (applies_to). You may want to try expanding 'data.applies_to' instead.",
Have you tried the suggestion in the error message
You are making a request to /v1/promotion_codes
for coupons, the request should be sent to /v1/coupons
I didnt get it
Show me your code
Map<String, Object> params = new HashMap<>();
params.put("code", code);
PromotionCodeCollection promotionCodes = PromotionCode.list(params);
You should use Coupon.list, not PromotionCode.list
okay trying