#nizar.nasani

1 messages · Page 1 of 1 (latest)

fickle monolithBOT
#

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.

tepid cape
#

👋 happy to help

#

you have to create 2 prices

fringe apex
#

that's exactly what i did

tepid cape
#

1 price with recurring.interval:"month" and recurring.interval_count: 3 and another one with recurring.interval:"month" and recurring.interval_count: 1

#

did you update the schedule to have two phases? where the 1st phase is using the first price and the second one uses the second price

fringe apex
#

yes
var service = sService.Update(subId, new SubscriptionScheduleUpdateOptions { Phases = new List<SubscriptionSchedulePhaseOptions> { new SubscriptionSchedulePhaseOptions { Items = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = oldSubscription.Phases[0].Items[0].PriceId, Quantity = oldSubscription.Phases[0].Items[0].Quantity, }, }, StartDate = oldSubscription.Phases[0].StartDate, EndDate = oldSubscription.Phases[0].EndDate, }, new SubscriptionSchedulePhaseOptions { Items = new List<SubscriptionSchedulePhaseItemOptions> { new SubscriptionSchedulePhaseItemOptions { Price = prices.Data.FirstOrDefault(price => price.LookupKey == "1month").Id, Quantity = 1 } }, Iterations = 1 }, } });

tepid cape
#

would you mind sharing the request ID?

fringe apex
#

sure
req_ICOmpnnoGlKjtE

tepid cape
#

taking a look

#

this is the request where you created the subscription schedule from the subscription that was created using the Checkout Session

fringe apex
#

correct

tepid cape
#

would you mind sharing the one where you update the subscription schedule?

#

actually I don't think you did update the schedule

fringe apex
#

ahh ok
I got a 404 on that

#

req_Pwuxvwi7Q2calc

tepid cape
#

yes because you passed the subscription ID

#

instead of the subscription schedule ID

fringe apex
#

oh ok

tepid cape
#

sub_sched_xxx instead of sub_yyy

fringe apex
#

I'll try that

#

one more small question

#

if I put a 3 months recurring price I'll get this text

#

how can I change that to " the first 3 months" so the client wouldn't be confused

tepid cape
#

you can't really

#

that's why I don't really think using Checkout Sessions is appropriate in your case

fringe apex
#

what should I use? I want an embedded solution in the clients website and he's moving to subscriptions

tepid cape
fringe apex
#

I need to make a custom ui?
and call everything inside the code?

#

honestly I looked into that but couldn't understand what needs to be done here

tepid cape
fringe apex
#

well the embedded form section was very staight forward, but the custom flow section doesn't show me how to exactly build my own custom text

#

also, do I need to create the customer first everytime and then redirect him to the payment process? can't it be done in one window?

tepid cape
#

this becomes your UI and you can do whatever you want and however you want

tepid cape
#

if you're using the custom flow

fringe apex
#

is the scheduling subscription part correct? if I'm not mistaken I need to only remove the checkout session part and replace it with the manually handled logic right?

fringe apex
tepid cape
fringe apex
tepid cape
#

I mean that you either create a subscription and then you transform it to a schedule

#

or you can use SetupIntents to create a payment method and then directly create the Subscription Schedule without passing via a Subscription

#

when you use the Custom Flow there are multiple ways to achieve the same thing

fringe apex
#

from what I can understand the setup intent is just saving the payment info right?

tepid cape
#

using the same Subscription Schedule 2 phases with 2 prices

#

the difference is how you create the Subscription Schedule and how you collect the payment method

fringe apex
#

okay I'll try with that, thank you a lot tarzan

fickle monolithBOT