#oleg.moseiko

1 messages · Page 1 of 1 (latest)

open whaleBOT
modern mantle
#

Generally you'd create them as separate Products to reflect the different features of each plan in your app

#

And all the related Prices need to be recurring in nature to be used with a Subscription. You can't use a one-time price

twin barn
#

so Free plan must has recurring

#

'recurring' => ['interval' => 'year'], ????

#

or day?

#

or what?

modern mantle
#

I guess that's something you'd decide according to your business

#

I guess for a free plan it's not too critical, so maybe monthly?

twin barn
#

$freeProduct = \Stripe\Product::create([
'name' => 'Free Plan',
'metadata' => [
'alias' => 'free_product',
],
]);
$freeProductPrice = \Stripe\Price::create([
'unit_amount' => 0,
'currency' => 'usd',
'product' => $freeProduct->id,
'recurring' => [
'interval' => 'month'
],
'nickname' => 'free_product_price',
'metadata' => [
'alias' => 'free_product_price',
],
]);

#

is it correct way?

modern mantle
#

Seems good, yep

twin barn
#

{
"error": {
"message": "Only active, per unit licensed prices are supported. The following price(s) are invalid: price_1MlqlCFZ7k4UhKB3MFvkqIGT.",
"param": "features[subscription_update][products]",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_acQNZKwEk5qn8h?t=1678879617",
"type": "invalid_request_error"
}
}

modern mantle
#

price_1MlqlCFZ7k4UhKB3MFvkqIGT is a one-time Price, you need to remove it from your API request to create the portal configuration

#

The portal doesn't support one-time Price objects

twin barn
#

it is not one-time Price

modern mantle
twin barn
#

ok

modern mantle
#

Seems you have your price_xxx IDs mixed up

twin barn
#

i must subscribe user automatically by Free Plan
because if i did it he can't choose Current plan by panel

#

why i cant have button Add Plan (if user has no plan yet)

modern mantle
twin barn
#

😩

#

Custom Panel can't choose Plane
Product Table can't show current subscription and disabled it for user

#

that means i need create my Custom CustomPanel

#

and my Custom Product Table

open whaleBOT
fierce iron
#

Hi! I'm taking over this thread.

#

Let me know if you have any other questions.

twin barn
#

how can you help?

fierce iron
#

if you have technical questions about Stripe, let me know.

twin barn
#

my user by default can free use my app

#

i would like to have 2 not free plane

#

so i have
FreePlan - Subscription (by default)
StarterPlan - Subscription
EnterprisePlan - Subscription

#

I can't use Product Table because it show all list of Plane ( so i see Free Plan to but user is subscribed for it by defalut)

#

so i need to exclude or disabled FreePlan from this table

#

so i can't use Product Table and i need to create my own Table - it is bad

#

it would be good if ProductTable disabled Current Subscription

fierce iron
#

Why can't you create a Pricing Table with only two plans (started and enerprise)?

twin barn
#

ok
but if user subscribed to started

#

i need show Free and Enterprise

#

correct?

#

so i need have Tables:
1 - started and enterprise
2 - started and Free
3 - Free and enterprise

fierce iron
#

I understand. Then yes in this case you should not use Pricing Table and build your own custom table.