#dragonlord_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/1356653626545803436
๐ 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.
- dragonlord_api, 4 days ago, 19 messages
- dragonlord_api, 4 days ago, 55 messages
- dragonlord_api, 6 days ago, 29 messages
- dragonlord_api, 6 days ago, 21 messages
This price is attached to a subscription
I tried to use the update command and pass this line id but it does not work
['price' => $test_old_price_id, 'deleted' => true ],
Hello, that should be the way to delete a subscription item. Can you send me the ID of the subscription that you tried that on so I can take a look?
req_bMo5FUR8oa8Nuo
Ah, that error is because our subscription items are identified by their ID (si_123) not the price that they hold (price_123). If you use the item's ID that call should succeed
You can get a list of the subscription's items by retrieving the subscription
https://docs.stripe.com/api/subscriptions/object#subscription_object-items-data-id
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But I using the $stripe->subscriptions->update( command
I passing in 'items' => $new_sms_price_line_items,
$stripe->subscriptions->update(
$subscription_id,
[
'items' => $new__price_line_items,
'trial_end' => $trial_end,
]
);
this is my call
Correct, this parameter is in that call https://docs.stripe.com/api/subscriptions/update#update_subscription-items-id
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 modify your code to pass that parameter when making this call
$new_price_line_items = [
[
'price' => "sss",
'quantity' => 1,
],
['price' => "sssss",
['price' => "sssfa"
['price' => "asd" 'deleted' => true ],
];
I want asd to be deleted
and this is where the error hapens
Right, so when you retrieve the subscription there will be an item that looks like this:
{
price: 'asd',
id: 'si_abc'
}
You need to pass ['id' => "si_abc" 'deleted' => true ] for the item with asd to be deleted
oh okay makes sense
perfect works exactly as we wanted it
Hello can I filter subscriptions pased on if they are in trial mode?
$stripe->subscriptions->all([
does nto let you filter by if status is trailing for trial subscribtions
Does not, so you'd have to list all and filter it down (or keep track on your end).
okay makes sense we found a better solution I was just curious
Awesome. ๐
thank you
Of course. ๐