#skammerens-datter_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1266348569820921887
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- skammerens-datter_api, 1 day ago, 10 messages
- skammerens-datter_api, 1 day ago, 125 messages
- skammerens-datter_api, 2 days ago, 16 messages
- skammerens-datter_api, 2 days ago, 35 messages
- skammerens-datter_api, 2 days ago, 17 messages
- skammerens-datter_api, 3 days ago, 11 messages
and 3 more
Can you share the ID (req_xxx) of the API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Sure; req_wdOM15YBdnSMY1
Looks like the tax rates were unset in this request to the schedule: https://dashboard.stripe.com/test/logs/req_m2pqYJHvLzbLZx
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
When you update a phase you need to re-apply all the relevant parameters. You omitted default_tax_rates: https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-phases-default_tax_rates
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You need to pass in all current and future phases when you update a subscription schedule. You also need to pass in any previously set parameters that you want to keep. Any parameters that were previously set are unset for the existing phase unless you pass those in the update request. You still receive information in the response about past phases.
https://docs.stripe.com/billing/subscriptions/subscription-schedules#updating
Okay, I do a lot of different API calls with the subscription. Do I need to set the parameters for any other call? Meaning, will I be good if I only add parameters again for the schedule call only?
Updates to sub items, like req_wdOM15YBdnSMY1, are implicit meaning that you don't need to pass all parameters
so doing this (php), won't require setting default_tax_rates, it'll just be inferred from what is already set?
$stripe->subscriptions->update($subscriptionId, [
'items' => [[
'id' => $subscription->items->data[0]->id,
'price' => $planPriceId
]],
'expand' => ['latest_invoice.payment_intent'],
'proration_date' => !is_null($prorationTime) ? $prorationTime : time(),
'proration_behavior' => 'always_invoice'
]);
```
Yes!
Okay, thank you. I changed the schedule call to the following, assuming that is what should be done:
$stripe->subscriptionSchedules->update(
$schedule->id,
[
'phases' => [
[
'items' => [[
'price' => $schedule->phases[0]->items[0]->price,
'quantity' => $schedule->phases[0]->items[0]->quantity
]],
'start_date' => $schedule->phases[0]->start_date,
'end_date' => $schedule->phases[0]->end_date,
'default_tax_rates' => ['txr_1PaG3qGppVLMkw062cvfyWAO']
],
[
'items' => [[
'price' => $planPriceId,
'quantity' => 1
]],
'iterations' => 1,
'default_tax_rates' => ['txr_1PaG3qGppVLMkw062cvfyWAO']
]
]
]
);
Yep, seems good
okay, great - thanks!