Auto collect & Starts at input for Hosted Page

Auto collect & Starts at input for Hosted Page

Hi I have created the below script in my Creator App to:
1/ Create a new plan for a customer
2/ Create a unique subscription for that customer
3/ Send them to the hosted page for this newly created subscription to set up their payment method.

How do I add in these requirements to the script?
auto_collect
starts_at

Current script below:

Get_student_name = Add_a_Student[ID == input.Student_Name];
Full_Name = Get_student_name.Student_Name.first_name + " " + Get_student_name.Student_Name.last_name;
//create plan
values = Map();
values.put("plan_code",input.Student_Name);
values.put("name",Full_Name);
values.put("recurring_price",input.Amount_per_Payment);
values.put("interval",input.interval);
values.put("interval_unit",input.interval_unit);
values.put("billing_cycles",input.Number_of_Payments);
values.put("setup_fee",input.Enrolment_Fee);
values.put("product_id","64299000000009107");
response = zoho.subscriptions.create("Plans","7001477462",values,"create_subscription_plan");
info response;
//create subscritption
organizationID = "7001477462";
plan = Map();
plan.put("plan_code",input.Student_Name);
customer = Map();
customer.put("display_name",Full_Name);
customer.put("first_name",Get_student_name.Student_Name.first_name);
customer.put("last_name",Get_student_name.Student_Name.last_name);
customer.put("email",input.Email);
payload = Map();
payload.put("plan",plan);
payload.put("customer",customer);
info payload;
response = invokeurl
[
type :POST
parameters:payload.toString()
connection:"create_subscriptions_subsrcription_hostedpage"
];
info response;
url = response.getJSON("hostedpage").getJSON("url");
info url;
openurl(url,"same window");

    • Sticky Posts

    • Introducing Developer Space in Zoho Subscriptions

      Hello devs! At Zoho Subscriptions, we're constantly looking for ways to empower the developer community. Our goal is to provide you with the tools you need to integrate Zoho Subscriptions with your other platforms, and we also want to make it easy to

    Zoho Pagesense Resources

        Zoho SalesIQ Resources



              Zoho TeamInbox Resources

                Zoho DataPrep Resources


                    Zoho CRM Plus Resources

                      Zoho Books Resources


                        Zoho Subscriptions Resources

                          Zoho Desk Resources

                            Zoho Projects Resources


                              Zoho Sprints Resources


                                Qntrl Resources


                                  Zoho Creator Resources


                                    Zoho WorkDrive Resources




                                        Zoho Campaigns Resources

                                          Zoho CRM Resources

                                                      Design. Discuss. Deliver.

                                                      Create visually engaging stories with Zoho Show.

                                                      Get Started Now