Custom trial period for plan not working when creating subscription through API

Custom trial period for plan not working when creating subscription through API

I'm trying to set a custom trial period when creating subscription using API (POST /subscriptions)
This is my payload:
  1.             'customer_id' => 'xxxxxxx',
                'plan' => [
                    'plan_code' => 'xxxxx',
                    'setup_fee' => 120,
                    'trial_days' => 15
                ],
                'auto_collect' => false,
Subscription is created, but last billing date is set to today, instead of today+15 days:

  1.   "created_at" => "2021-03-14"
      "activated_at" => "2021-03-14"
      "current_term_starts_at" => "2021-03-14"
      "current_term_ends_at" => "2021-04-14"
      "last_billing_at" => "2021-03-14"
      "next_billing_at" => "2021-04-14"
Also invoice is created and includes both setup fee and full price of the plan.

Expected behavior would be:
- subscription is created
- invoice for setup fee only should be generated
- after trial period expires (2021-03-14 + 15 days), invoice is generated for full plan price
- next billing periods will be counted from the end of trial period (e.g. 2021-03-29, 2021-04-29, etc.)




                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation
                                        • 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


                                        Manage your brands on social media



                                                Zoho TeamInbox Resources

                                                  Zoho DataPrep Resources



                                                    Zoho CRM Plus Resources

                                                      Zoho Books Resources


                                                        Zoho Subscriptions Resources

                                                          Zoho Projects Resources


                                                            Zoho Sprints Resources


                                                              Qntrl Resources


                                                                Zoho Creator Resources


                                                                  Zoho WorkDrive Resources



                                                                    Zoho Campaigns Resources

                                                                      Zoho CRM Resources

                                                                      • CRM Community Learning Series

                                                                        CRM Community Learning Series


                                                                      • Tips

                                                                        Tips

                                                                      • Functions

                                                                        Functions

                                                                      • Meetups

                                                                        Meetups

                                                                      • Kbase

                                                                        Kbase

                                                                      • Resources

                                                                        Resources

                                                                      • Digest

                                                                        Digest

                                                                      • CRM Marketplace

                                                                        CRM Marketplace

                                                                      • MVP Corner

                                                                        MVP Corner

                                                                      





                                                                      




                                                                          Design. Discuss. Deliver.

                                                                          Create visually engaging stories with Zoho Show.

                                                                          Get Started Now