#momovsky_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/1230133287024853033
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Here is my code, basically. Can't realize what am I doing wrong:
data = {'items': [{'deleted': True, 'id': '123'}, {'price': '123'}], 'proration_behavior': 'none'}
stripe.Subscription.modify(subscription_id=123, **data)
hi there!
can you share the request ID (req_xxx)? you can find it here https://dashboard.stripe.com/test/logs
Sure, req_kev9lzJxKzMnaJ
post body is shown as
{
"items": {
"0": {
"id": "si_PwQ4xnCi6k7QXv",
"deleted": "True"
},
"1": {
"price": "price_1OZD11HZBjdJVnGyDLW1ULp5"
}
}
}
I confirm that no parameter was set here. I'm not a Python expert, byt can you try something like this instead:
stripe.Subscription.modify("sub_xxx",
proration_behavior="none",
items=[ ... ],
)
I can see in my logs that final data formed for request looks like this (ids omitted for convenience):
'items[0][deleted]=True&items[0][id]=123&items[1][price]=123&proration_behavior=none'
Does this look correct?
looks correct to me yes
๐ค Order does not matter also?
I mean, if proration_behavior comes before or after items - it should not matter?
I'm in process right now, will come back once I check it.