#dragonlord_api

1 messages ยท Page 1 of 1 (latest)

twin lightBOT
#

๐Ÿ‘‹ 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.

summer python
#

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 ],

rigid bloom
#

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?

summer python
#

req_bMo5FUR8oa8Nuo

rigid bloom
#

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

summer python
#

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

rigid bloom
#

You need to modify your code to pass that parameter when making this call

summer python
#

$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

rigid bloom
#

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

summer python
#

oh okay makes sense

twin lightBOT
summer python
#

perfect works exactly as we wanted it

summer python
#

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

dapper egret
#

Does not, so you'd have to list all and filter it down (or keep track on your end).

summer python
#

okay makes sense we found a better solution I was just curious

dapper egret
#

Awesome. ๐Ÿ‘

summer python
#

thank you

dapper egret
#

Of course. ๐Ÿ™‚