#mike-mileiq

1 messages · Page 1 of 1 (latest)

jovial fossilBOT
glass hill
#

Hello! Give me a few minutes to take a look

glass hill
#

I'm still looking, but I think this is a combination of a few different things here - you're on a very old API version 2013-10-29 that was before we made some changes to how trialing work, so in order to maintain that behavior internally we re-pass in whatever trial_end was set on the subscription (even if it was in the past). For most subscriptions (that aren't tied to a subscription) this would work totally fine, but since your subscription IS tied to a schedule it hits an error

#

The best way to get around it would be to either remove the schedule from the subscription if you don't need it anymore, or to make the changes directly to the schedule instead of updating the subscription

slim otter
#

can you tell me more about :
make the changes directly to the schedule instead of updating the subscription

glass hill
slim otter
#

can we modify a specific schedule phase?

#

I always thought we needed to append a phase

glass hill
#

When you update a schedule and pass in phases we expect you to pass in ALL the phases for that subscription - there isn't a way to update a specific one

slim otter
#

ok right I see

glass hill
#

Yeah for this specific case you'd only need to pass in one phase though (since the schedule only has one phase and that's the one you want to modify)

slim otter
#

so in the example I sent you we only passed in this POST payload

{
  "proration_behavior": "always_invoice",
  "items": {
    "0": {
      "quantity": "10",
      "id": "si_LLOlc5TCs5D8wR"
    }
  }
}
#

basically we just wanted to change the quanity

glass hill
#

Right, so for the schedule instead of passing in the Subscription Item ID you'd just pass in the new quantity you want, and the price ID

slim otter
#

I think that is what we are doing....

#

but you said maybe this is an API version problem?

#

I'm wondering why it still references the expired free trial

glass hill
#

if you're still having trouble getting the subscription schedule update to work feel free to send me an example request!

#

and yeah, the api version is what's causing it to reference the expired free trial

slim otter
#

ok so mabye we if update our API version this error would go away?

glass hill
#

You could, but that's a LOT more work - you're on a very very old version (2013) and our most revent version is from 2022-11-15

slim otter
#

well can I reference the new API only for these subscription schedule calls?

glass hill
#

You can try it, but I'm not 100% sure it'll work - a lot of our subscriptions/schedules logic checks the default API version of the merchant because so many of those requests/changes are happening async (when the subscriptoin cycles for example)

slim otter
#

gotcha

glass hill
#

but definitely try it and see if it helps 👍

slim otter
#

awesome, thanks so much for the help