#alexelba
1 messages · Page 1 of 1 (latest)
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.
hello! can you share the request id [0] of the request to update the Subscription Schedule? it'd look like req_xxx
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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] =>
)
I don't see you passing in any parameters in the update? https://dashboard.stripe.com/test/logs/req_ylR2teOyn3J6uv
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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
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
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
you can see examples here : https://stripe.com/docs/billing/subscriptions/subscription-schedules#updating. The last code example in that section shows how to add an additional phase