#fedeb_api

1 messages ยท Page 1 of 1 (latest)

latent pastureBOT
#

๐Ÿ‘‹ 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/1352279555167223940

๐Ÿ“ 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.

fresh tendon
#

this case the user has a coupon. but its a coupon expired or redeemed past the limit.
why is throwing error when updating the phase? if its already redeem by the user.

does the phase update api tries to applied again? how I can avoid this? since its a merge endpoint I don't want to delete his cuopon but I cannot send the cupon ???
is confusing!!

bold creek
#

hey there, taking a look

fresh tendon
#

ok

latent pastureBOT
bold creek
#

Can you share more context here about what you're trying to do? The request doesn't include any coupons/discounts, and indicates a different error than you quoted

message: "You can only adjust the end date to a future date for the current phase.",

fresh tendon
errant elm
#

๐Ÿ‘‹ stepping in here as synthrider needs to step away

#

Taking a look

fresh tendon
#

hi bismarck

errant elm
#

I think the reason is that you applied the discount top-level on the Subscription in your creation request as opposed to as part of the items here.

#

What happens if you update the schedule without passing that coupon?

#

Does it stay associated to the Sub?

fresh tendon
#

I did't try but I think its stay.

the thing is programatically what I do is get current phases, loop them and send again the same data as it is , plus any other change I want to do.

since
https://docs.stripe.com/billing/subscriptions/subscription-schedules?lang=node#updating
"You need to pass in all current and future phases when you update a subscription schedule. You also need to pass in any previously set parameters that you want to keep. Any parameters that were previously set are unset for the existing phase unless you pass those in the update request. You still receive information in the response about past phases."

#

" pass in any previously set parameters that you want to keep"

errant elm
#

Hmm actually I see I see

#

That likely would work if you only have one item

#

But this should still work at the top level of the phase to cover multiple items if you want...

#

๐Ÿค”

fresh tendon
#

the particular of this coupon is that was set only 1 redemption, so its already "expired".

errant elm
#

Right

#

Yeah I think unfortunately you are going to have to check the coupon and remove it in this case.

#

I don't think our API just handles that gracefully here.

#

I'll file some feedback internally about this.

#

As I do think we should know to just ignore the coupon in this case, but I'm not seeing a way to accomplish this without just not passing it at the moment.

fresh tendon
#

Its because the cupon is at top level subscription and not specific item?
is there a way to check if the coupon its like that to ignore sending it?

errant elm
#

Ah actually

#

It should indicate in your Subscription retrieval request too

#

Within the discount hash

#

It will have the Coupon data

#

So no need to retrieve it again

#

It shows max_redemptions: 1 in that case

fresh tendon
#

ok..

other question sending in the Schedules API update a discount (the same that was in retrieve phases)
and if it does't fail.

it will redeem again and create -1 in the redemption max_redemptions ? like "using" again to the same user

errant elm
#

Afaik it should not do that if passed in Phase 0 and there is not an immediate update.

#

I have not tested that though so you would want to test to confirm.

fresh tendon
#

okay thanks.