#aksharj-price-error
1 messages ยท Page 1 of 1 (latest)
Hi there ๐ sorry to hear you're running into problems. Do you have a request ID (req_XXX) from a request where you're seeing this error?
hi @desert matrix unfortunately i don't have a request_id
Can you tell us what your code is doing when the error arises?
@invoice = Stripe::Invoice.upcoming(
we are showing users the proration details when upgrading from one plan to another
and in the error logs i see that error is happening when i am trying to fetch upcoming invoice
@invoice = Stripe::Invoice.upcoming(
Can you copy/paste the request ID out of that screenshot for me? (The string that starts with req_)
req_6BXdstJbnCr1r0
Thanks, bear with me a moment while I pull that up.
some more details, the user is trying to view how much he will be charged when upgrading from plan plan_GXUjbpO3YtLd5F to price_1IZHn0HCqAocHUR8H7M2laK9
Gotcha. That's going to be problematic because that price isn't recurring, and therefore can't be used for subscriptions.
Is your customer trying to upgrade from a subscription to a one-time purchase?
no, i think it should be a recurring one too
can i update the price to be a recurring now or would that cause any issues?
If the price hasn't been used by anything, then you may still be able to edit it. If you can still edit it, then there shouldn't be any problems doing so. If the price has been used though then we will have locked down most of its fields, and you'll need to create a new price instead.
i see it like this when i try to edit
so i should be able to make it recurring, correct?
Looks like it, you should be able to move that toggle over to Recurring, and then make any other necessary changes to support that type of price.
Sure
is there a way i can find if there are any subscriptions using this price?
I don't think there any were since you were able to edit it, but let me see if we have a way to do a search to confirm that.
that would be great, thanks!
Ah, I forgot that no subscription would have used that price since it wasn't recurring. Moving forward though, you can list subscriptions and use price as a filter to only return subscriptions that include a particular price:
https://stripe.com/docs/api/subscriptions/list#list_subscriptions-price
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ah got it, many thanks
Any time!
sorry another question
No worries!
if it has been used for one time purchases
will it affect users you have used it
if i make the prices recurring
It shouldn't, but if anyone tries a one-time purchase with it after the change then that would fail.
ok got it, many thanks ๐