#gecko - No Such Price

1 messages · Page 1 of 1 (latest)

obtuse saffron
#

HI 👋

#

Do you mind sharing the request ID for this checkout session?

undone junco
#

'req_4WPbYRygs9hOFf',

obtuse saffron
#

Thanks 🙂

#

Okay I see the problem. The string values for the price IDs are getting passed in with the curly braces. The value for your first price is (full ID redacted)

"{{price_XXXXXXXXXXXXNtO}}"
#

It'll work just fine without them

undone junco
#

sample code showed this...which I thought was weird, but ok...I can strip off both sets of braces?

#

so just the price string, yes?

obtuse saffron
#

yup. those are the ID values for the Price records

undone junco
#

ok got it. it got me to the next problem, which looks like prices are toggling between one time and subscription. I thought I Had these setup correctly so I had some recurring and some not.

#

my product, you can see, has 4 prices, * 2, one set for one-time and one set for recurring

#

'req_mn1jvldATHv35Q'

#

this is the revision with the braces removed. can you please verify that I am pulling the right priceIDs? I think I'm trying to do a one-time payment priceID, but getting this error

obtuse saffron
#

Yeah, you're going to need to use only one-time prices if the checkout mode is set to "payment". Otherwise you can use only recurring prices to create a subscription.

#

So remove the one set for a recurring price. That would need to be a different Checkout Session.

undone junco
#

what I mean to say is, I setup my product with two sets of prices...one for one-time and one for recurring/subscription.

#

are you saying I have to delete those prices?

obtuse saffron
#

No, just that you can only specify the one-time price for that product if you are using a "payment" mode Checkout Session

#

You can use the same product but with recurring prices if your Checkout Session is in "subscription" mode

undone junco
#

right, that's what I thought.

#

so here's the problem. What I think I setup with a mode: payment, included only 4 one-time prices

#

and no subscription prices

obtuse saffron
#

This price price_1XXXXXXXX6EOG has is_recurring set to True. This one is your problem

#

It's line_items[3] in your request

undone junco
#

thanks

obtuse saffron
#

Looks like it's set to $25/month

undone junco
#

it doesn't allow me to edit it to "one time"...do I have to delete it?

obtuse saffron
#

You don't have to delete it if you want to have it as a $25/month subscription price for that product. Just don't include it in your Checkout Session line items

undone junco
#

well I need a $25 one-time....so I was just going to edit it...looks like I have 3 active subscriptions against it (on the live side I realized)

#

so I need to cancel those in order to get a proper one-time setup for the $25 pricepoint yes?

obtuse saffron
#

You can have as many prices as you want but it could make things messy.

#

Take a rather silly example: In my test integration I have a single Avocado product.

#

I have 15 different price records for this Avocado

#

7 represent one-off prices

#

8 represent subscription prices

#

I can pass all 7 one-off prices to a Checkout Session where mode="paymeny"

#

And all 8 subscription prices where mode="subscription"

#

I just cannot mix and match

#

So there is nothing to stop you from creating a $25 one-off price for the same product while keeping your $25/month recurring price

#

You'll just need to keep track of which price_XXXXX is which

undone junco
#

I get that.

#

I am running through test now to confirm I have all the right prices setup etc.

#

Now I want 4 prices. One set for one-time customers and one set for subscriptions.

#

Right now it looks like I have - live price that is intended to be a one-time, but is set for recurring.

#

I have customers on this subscription. And they don’t intend on being on subscription, since I haven’t (intended anyway) to enable subscriptions.

#

So I think I need to cancel these existing subscriptions to be able to edit that price. Yes?

obtuse saffron
#

Ah okay yes I can see that being a problem. You'll want to cancel the subscriptions but even then you can only toggle the price active/inactive as well as add some changes

undone junco
#

So in test mode I can toggle between one time and recurring. You’re saying on live I can’t, and thus I’ll need to create a new price that’s one time?

obtuse saffron
#

I'm a little confused. I'm in test mode and I cannot toggle my Price records from one-time and recurring. It's all greyed out

undone junco
#

It worked for me. 😂

#

ok, well I see it gray now too, but I promise you I had an ability to change one of these a few minutes ago, I just looked through all of them, so I'm not sure which one it was....but I get your point.

#

thanks for all your help!

obtuse saffron
#

Sure thing 🙂

undone junco
#

stripe support is truly the best in the world, you all are awesome warriors for being here!

obtuse saffron
#

For all I know, your product/service is gonna save the world so I'd better make sure you have an easy time getting paid for it!