#wiiim
1 messages · Page 1 of 1 (latest)
Hi
Could you please share more details ?
I'm using python to update a subscription schedule like this:
stripe.SubscriptionSchedule.modify(
subscription_schedule.id,
phases=[{
'transfer_data': {
'destination': destination,
}
}]
)
When I do this, I get this error: "Error updating subscription schedule sub_sched_1Ng6CQBedPgr0Zv2FY36QrNw: Request req_httSDCf4YPa9QH: Missing required param: phases[0][items]."
I also tried to something like this:
phase = subscription_schedule['phases'][0]
phase['transfer_data']['destination'] = destination
stripe.SubscriptionSchedule.modify(
subscription_schedule.id,
phases=[phase]
)
but when doing this I get this error: "Error updating subscription schedule sub_sched_1Ng6CQBedPgr0Zv2FY36QrNw: Request req_gZjKcnZPWIDnlG: Invalid string: {:active=>"True", :description=>"ÖPNV incl.", :livemode=>"False", :id=>"txr_1LuvuRBedPgr0Zv2pAFUlmTI", :object=>"tax_rate", :display_name=>"VAT", :created=>"1666261411", :percentage=>"7.0", :inclusive=>"True"}"
When doing an update on subscription schedule, you need to pass the existing items:
https://stripe.com/docs/api/subscription_schedules/update?lang=python#update_subscription_schedule-phases
With the transfer_data
Thank you, I've got it working 🙂