#dazzling_chipmunk_99376

1 messages · Page 1 of 1 (latest)

willow hatchBOT
ancient patrol
#

If you are updating some other way, let me know the details and I can look in to how to avoid prorations

calm vigil
#

yes i've done that but that doesn't seem to solve it

#

can i send a code example?

ancient patrol
#

Yes please

#

The text of the code please, pictures are harder to work with

calm vigil
#
      new_items  =  items_plan_data.collect do |item|
        {
         id: item.id,
         price_data: {
           currency: item.price.currency,
           product: item.price.product,
           recurring: {
            interval_count: 60,
            interval: "day",
            },
            unit_amount_decimal: item.price.unit_amount_decimal
          }
         }
      end
      Stripe::Subscription.update(@subscription_id, {items: new_items})
#

would this work?

ancient patrol
#

It should as far as I know. Can you run that code again and send me the request ID (req_123) if it does create prorations?

calm vigil
#

ok

#

req_QdFXU8IZA2zmKo

#

this seems to have created an invoice for the full amount of the subscription plan

ancient patrol
#

My apologies, I forgot that switching the billing cycle length inherently resets the billing cycle to now

#

With a subscription schedule, you can tell Stripe to upgrade at the end of the current cycle

calm vigil
#

there's no way to do this within the subscription by changing the price data or plan data?

ancient patrol
#

Not while directly modifying the subscription. You have to schedule the change

calm vigil
#

can i also pass a bililng date or trial period?

#

to the subscription

ancient patrol
#

You can't pass the date but you can set a trial period

#

That would also push off the next payment, though the user would get a $0 trial invoice I believe. To do it without an trial period you would need to use a subscription schedule

calm vigil
#

trial period invoice is fine. we just don't want the customer to be billed a partial amount when they change their schedule

#

this is for a product subscription

#

a physical product