#zuberpatel

1 messages · Page 1 of 1 (latest)

zealous vigilBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

daring tree
#

If I pass subscription ID weith price id then it will start schedule subscription under that subscription and for given price ID right?

noble willow
#

Not sure I understand. The above just creates a schedule with existing subscription as first phase

#

You'd need to add another phase to change the price

daring tree
#

So as a admin first I will create a subscription using API.
After that create price under that subscription.
Eg: MyFirstSubscription->FirstSubPrice1
Now I want to schedule a subscription for user start from 1st Jan 2024 for above subscription(MyFirstSubscription) AND price(FirstSubPrice1)

noble willow
#

That doesn't make sense

#

You'd create price before subscription

#

But it sounds like you're scheduling a susbcription's start date

#

In that case, you wouldn't need to create a subscription first

#

Just create the schedule with a start date of Jan 1st

daring tree
#

No I will first create a subscription

#

And after that create price

noble willow
#

You can't create a subscription without a price...

daring tree
#

I mean product see below:
Step 1: Create Subscription (Product)
$stripeProduct = $stripe->products->create([
'name' => $request->name,
'description' => $request->detail,
]);
Step 2: Create Price
$product = $stripe->prices->create([
'unit_amount' => ($request->unit_amount),
'currency' => 'gbp',
'nickname' => $request->name,
'recurring' => ['interval' => $request->interval],
'product' => $category->subscription_id
]);

#

Now using this details I want to create a subscription schedule for user to which run on defined interval on price for future payment

noble willow
#

You need that before you create the subscription though

daring tree
#

Yes

noble willow
#

You cannot create a subscription without first creating the price

#

I'm so confused

daring tree
#

Me too

noble willow
#

Earlier you said multiple times that you want to create price after subscription...

#

You can't do that...

daring tree
#

Okay so
first I create Product

#

Second price for that product

#

Why?

noble willow
#

Because that's how subscriptions work

#

You can't have a subscription unless you already have a price

daring tree
#

I already have a price

noble willow
#

Ok so then just create the subscription

#

What's the problem exactly