#Th3FalleN

1 messages · Page 1 of 1 (latest)

scenic pythonBOT
turbid thistle
#

Hello, to be clear, when you make that call now, are both the billing and card info updated?

latent minnow
#

actually....

#

as i was typing the answer to that i realized the answer to my question...

#

but! while i have you i do have one question about your invoice/preview endpoint if that's okay.

#

with this request, ```## Preview Subscription Change
curl "https://api.stripe.com/v1/invoices/upcoming?customer=cus_NCoLHnI1943fs7&subscription=sub_1MSR71KjI0M1O6BOjhHv9ncZ&subscription_items[0][price]=price_1MM0J2KjI0M1O6BOTBRw79Em&subscription_items[0][quantity]=2&subscription_items[1][price]=price_1MM0GxKjI0M1O6BOXNBegx8V&subscription_items[1][quantity]=2"
-H 'Content-Type: application/json'
-H 'Cookie: machine_identifier=hpQz47yZ9JbB%2FS0DTyrZ3thntW65aSc4vkkRM93l2LGXYhC5i4zG97laOfHc2CMorCY%3D; private_machine_identifier=NiR5604UpBgFgUwDeKI3SVOHDG5zXERbjz17Q4okfqNeZfqGRDPMSkLrS0h6giPXlDg%3D; cid=53f97f2b-c19a-4e0a-867b-951cda46c5e9; __stripe_orig_props=%7B%22referrer%22%3A%22%22%2C%22landing%22%3A%22https%3A%2F%2Fdashboard.stripe.com%2Ftest%2Flogs%2Freq_RqPKoCpTq8sAVC%3Ft%3D1674259622%22%7D; stripe.csrf=ylstyG5Dhnn8Oewfr7Sp06AnKIARkuzM1tQsZlIAtbbYdN_EPRIBVi-ozWzSTXQyUPyTffCZj6V-PSBZzIEKqTw-AYTZVJxzpJHo9G2tD0xlmJFMOBPfokkg7ElUJuNiYYcGbvJuBw%3D%3D'
-u 'sk_test_51Ln2NYKjI0M1O6BO66h4WipupzIV2zpw3MukNLTTh8i0f79K6YBOWKcDYJs7OFfek4iriqW4EIuqS3c9O9OFSgeD00npMj9YUY:null'

#

im getting cannot add multiple subscription items with the same plan?

turbid thistle
latent minnow
#

req_RTzyJtO4ReFp62

turbid thistle
#

Oh I see, so what is happening is that that subscription already has items of both of those prices

latent minnow
#

right, im trying to adjust the quantity of those items

turbid thistle
#

When you pass in a subscription item to that update call, it tries to add that item to the subscription, rather than modifying existing ones

#

So you need to include the ID of the subscription items that already exist on that subscription

#

You can do the same thing but just change the quantity

latent minnow
#

so how would i preview removing items from my subscription?

turbid thistle
#

With our preview and upcoming invoice API?