#alexelba

1 messages · Page 1 of 1 (latest)

brazen skyBOT
#

Hello! We'll be with you shortly. 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.

vivid oxide
spare meadow
#

sub_sched_1O6K0hHxrjf17jEDq6eRucfE

#

sub_1O4sSTHxrjf17jEDSwXIcbmF

#

req_ylR2teOyn3J6uv

#

here is output of the object right after save was called

#

Stripe\SubscriptionSchedule Object
(
[id] => sub_sched_1O6K0hHxrjf17jEDq6eRucfE
[object] => subscription_schedule
[application] =>
[canceled_at] =>
[completed_at] =>
[created] => 1698528335
[current_phase] => Stripe\StripeObject Object
(
[end_date] => 1729806497
[start_date] => 1698184097
)
[customer] => cus_OscvOyRTIFdRcJ
[default_settings] => Stripe\StripeObject Object
(
[application_fee_percent] =>
[automatic_tax] => Stripe\StripeObject Object
(
[enabled] =>
)
[billing_cycle_anchor] => automatic
[billing_thresholds] =>
[collection_method] => charge_automatically
[default_payment_method] => pm_1O4sSUHxrjf17jEDCMinqwPY
[default_source] =>
[description] =>
[invoice_settings] => Stripe\StripeObject Object
(
[days_until_due] =>
)
[on_behalf_of] =>
[transfer_data] =>
)
[end_behavior] => release
[livemode] =>
[metadata] => Stripe\StripeObject Object
(
)
[phases] => Array
(
[0] => Stripe\StripeObject Object
(
[add_invoice_items] => Array
(
)
[application_fee_percent] =>
[automatic_tax] => Stripe\StripeObject Object
(
[enabled] =>
)
[billing_cycle_anchor] =>
[billing_thresholds] =>
[collection_method] =>
[coupon] =>
[currency] => usd
[default_payment_method] =>
[default_tax_rates] => Array
(
)
[description] =>
[end_date] => 1729806497
[invoice_settings] =>
[items] => Array
(
[0] => Stripe\StripeObject Object
(
[billing_thresholds] =>
[metadata] => Stripe\StripeObject Object
(
)
[plan] => price_1O4rgiHxrjf17jEDKz1g5sAl
[price] => price_1O4rgiHxrjf17jEDKz1g5sAl
[quantity] => 933
[tax_rates] => Array
(
)
)
)
[metadata] => Stripe\StripeObject Object
(
)
[on_behalf_of] =>
[proration_behavior] => create_prorations
[start_date] => 1698184097
[transfer_data] =>
[trial_end] =>
)
)
[released_at] =>
[released_subscription] =>
[renewal_interval] =>
[status] => active
[subscription] => sub_1O4sSTHxrjf17jEDSwXIcbmF
[test_clock] =>
)

vivid oxide
spare meadow
#

this is exact code, I send to you. We execute, how do I add phase with save()

#

it works for subscription object, when changing quantity

#

does not work for subscription_schedule

#

I tried googling around, I didn't find any example of usage of subscription_schedule

#

and docs not clear how to add phase with the same product and different quantity

#

because it looks like keeps original quantity

vivid oxide
#

resource.save is actually considered as deprecated already : https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md#deprecated. I'd recommend that you stop using it and use update instead as documented in our examples : https://stripe.com/docs/api/subscription_schedules/update

GitHub

PHP library for the Stripe API. . Contribute to stripe/stripe-php development by creating an account on GitHub.

spare meadow
#

even with update, do you have working example how to add phase

#

difference between update and save one is static call

#

and other belongs to object

#

anyway we can change to update

#

but I still don't have working example for adding phase to change quantity

vivid oxide
brazen skyBOT
spare meadow
#

wen run this code I get error "You can not modify the start date of the current phase. "

#

if I remove start_date, I get error " The subscription schedule update is missing at least one phase with a start_date to anchor end dates to. "