#sylom

1 messages ยท Page 1 of 1 (latest)

loud reefBOT
slim sand
#

Can you share the request ID? req_xxx

onyx wasp
#

I don't have access to the dashboard for this project, so it's gonna be hard.

slim sand
onyx wasp
#

req_G9gjyAwMMXvZE8

slim sand
#

That's just a GET request to retrieve a price
price_1NknhpAEtzv5ktGK2edMcVAu

#

Seems like it succeeded too

onyx wasp
#

Yeah, the price was retrieved, but updating the price won't work.

#

Oh, hold up a minute.

slim sand
#

Gotcha. Yeah you can't update the interval of the price
https://stripe.com/docs/api/prices/update

That's not something the API supports today. I believe with dashboard, you can only only change a price if it hasn't been used in a subscription or an invoice.

The ideal way would be to create a new price, update the sub to use the new price and archive the old price

onyx wasp
#

req_HUC0RraikeORZO

#

This should be the proper request.

slim sand
#

That's a GET request too similar to the one before๐Ÿ˜…

onyx wasp
#

Bummer.

#

So basically, it never sends anything.

#

I tried just to update the amount, but even that results in an error.

#
                'unit_amount'=>$amount*100,
            ]]);````
slim sand
onyx wasp
#

I read that. It says that with currency_options.<currency>.unit_amount, you can technically update the amount charged.

#

That's what I wrote, I believe. Or maybe I missed something?

#

I managed to update the subscription name by fiddling with its product, so that's a start.

slim sand
#

That's if you have multi-currency prices

onyx wasp
#

Just tried and yup. It's now asking me to update the top-level parms instead.

#

Getting closer to actually update the fudging price.

#

Can't get it to work. I'll put that aside until I find a way.

#

Thank you for the help.

slim sand
#

I already mentioned this earlier that you can't update the interval/unit amount of an existing price via the API ๐Ÿ˜…

#

You can create a new price and archive the older one

onyx wasp
#

Oh sorry. I thought you only talked about the interval.

#

Hence why I tried to push for the amount.

#

My bad.

slim sand
#

No worries. I should've been more clear ๐Ÿ™‚

onyx wasp
#

One last question to make sure I understood correctly.

slim sand
#

Sure

onyx wasp
#

Let's suppose I have a few people subscribed to a certain Price.

#

Or Subscriptions using said Price, if you prefer.

#

If I want to change the interval and/or amount of said Price, I basically have to create a new one, archive the old one then update the Subscriptions to use the new Price?

slim sand
onyx wasp
#

I see. That answers what I wanted to do. Thank you very much.