#oleg.moseiko
1 messages · Page 1 of 1 (latest)
I'd recommend reading this guide: https://stripe.com/docs/billing/subscriptions/designing-integration
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
so Free plan must has recurring
'recurring' => ['interval' => 'year'], ????
or day?
or what?
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?
$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?
Seems good, yep
{
"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"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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
it is not one-time Price
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
ok
Seems you have your price_xxx IDs mixed up
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)
The portal doesn't support creating new subscriptions. You need to use another surface, like Checkout, for that: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=checkout
😩
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
how can you help?
if you have technical questions about Stripe, let me know.
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
Why can't you create a Pricing Table with only two plans (started and enerprise)?
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
I understand. Then yes in this case you should not use Pricing Table and build your own custom table.