#aksharj-price-error

1 messages ยท Page 1 of 1 (latest)

desert matrix
#

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?

lunar badge
#

hi @desert matrix unfortunately i don't have a request_id

desert matrix
#

Can you tell us what your code is doing when the error arises?

lunar badge
#

@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(

desert matrix
#

Can you copy/paste the request ID out of that screenshot for me? (The string that starts with req_)

lunar badge
#

req_6BXdstJbnCr1r0

desert matrix
#

Thanks, bear with me a moment while I pull that up.

lunar badge
#

some more details, the user is trying to view how much he will be charged when upgrading from plan plan_GXUjbpO3YtLd5F to price_1IZHn0HCqAocHUR8H7M2laK9

desert matrix
#

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?

lunar badge
#

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?

desert matrix
#

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.

lunar badge
#

i see it like this when i try to edit

#

so i should be able to make it recurring, correct?

desert matrix
#

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.

lunar badge
#

awesome, this is really helpful

#

one more question

desert matrix
#

Sure

lunar badge
#

is there a way i can find if there are any subscriptions using this price?

desert matrix
#

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.

lunar badge
#

that would be great, thanks!

desert matrix
#

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

lunar badge
#

ah got it, many thanks

desert matrix
#

Any time!

lunar badge
#

sorry another question

desert matrix
#

No worries!

lunar badge
#

if it has been used for one time purchases

#

will it affect users you have used it

#

if i make the prices recurring

desert matrix
#

It shouldn't, but if anyone tries a one-time purchase with it after the change then that would fail.

lunar badge
#

ok got it, many thanks ๐Ÿ‘