#default_user_Bq67qllUp5l4mHuk0ao

1 messages · Page 1 of 1 (latest)

junior fulcrumBOT
fading bear
#

A fix for what exactly?

copper jay
#

when redeem one time coupon - the coupon returned from the customer update api was valid = false

#

now its valid = true

#

the flow is same as used to be

#

and the results are different

fading bear
#

There's no valid field on a Promotion Code object

#

The valid field denotes whether the Coupon is valid/applicable to the object (i.e. Subscription) it has been applied to. It's automatically computed based on the properties on the Coupon/Promotion Code

#

Can you provide a specific example where you expect an applied code to result in valid: false but it's actually true?

junior fulcrumBOT
copper jay
#

thanks for explaining

#

{
"id": "sg1K9mHI",
"object": "coupon",
"amount_off": null,
"created": 1689841734,
"currency": null,
"duration": "once",
"duration_in_months": null,
"livemode": false,
"max_redemptions": null,
"metadata": {},
"name": "hilat-once2",
"percent_off": 100,
"redeem_by": null,
"times_redeemed": 1,
"valid": true
}

#

yesterday same case exactly vlaid was flase

#

i asked the support here why and the answer was unclear

fading bear
#

Where is that JSON from?

copper jay
#

this is one time coupon - and it used to retun the valid false after redemption succesded

#

its the returned object from customer.update:
it has inner object .coupon

fading bear
#

What's the cus_xxx ID?

copper jay
#

second

#

cus_OI9VuZrYgubPbK

fading bear
#

Ok, so you applied the promo_xxx here: https://dashboard.stripe.com/test/logs/req_YuhKxk4e3b1UA8

In the response we can see discount[coupon][valid]: true

It's a single use Promotion Code, so after the application made above the Promotion Code is now considered 'used' and we mark it inactive

However the application of the code on the Customer is deemed valid as it has not been applied to a payment/invoice yet

#

I expect the valid field on the Customer object will be false when the coupon/discount is actually applied to a payment

copper jay
#

i agree!

#

but - for the past week you had issue the valid was flase

#

(maybe you can see my previous threds?)

#

and all of a sudden valid is true like we both undersand should be

#

my question was did you change something?

fading bear
copper jay
#

just a sec

#

i cant load the logs before yesterday 15:39

#

im tryin other ways

#

req_IH9wLf0gEZ1igO

#

req_dliL2lB3hryNhr

#

req_Wit8bUVVJBCBUr

#

the last one is classiic - i have tried to redeem the coupon
and it succeded:
the coupon object returned :
valid = flase

#

even though it worked!

fading bear
#

Yeah, does seem like the behaviour is different in that case

copper jay
#

how come?

#

what have you chnaged?

fading bear
#

In any case, it's not something we can resolve here right now. I'm going to file an internal report the team to look at this. In the meantime, you can write in to us for updates: https://support.stripe.com/contact/email?topic=api_integration

fading bear
copper jay
#

agreed

#

its very weird since from sunday - it was very consistent

#

only this morning have i seen the chnage

#

can you please update me?

fading bear
#

This is not something that will be looked at/addressed immediately, so we will do updates async

copper jay
#

thanks.