How to create a future subscription using a hosted checkout page? I need a way to allow users who signup to be able to pick the start date for their subscription.
How can we add this future start date to a page that's on our site, not a hosted page?
If you are not using our hosted pages, there are two other ways how you can create a subscription.
Using the API.
You will need to use a custom form to capture all the customer & subscription information including the preferred start date for the subscription.
Please Note: To capture payment and sensitive information your website will need to be PCI compliant. Or if you are using Braintree of Stripe as your payment gateway you can use their JAVA Script to capture the customer card details.
Next step is to use the information capture in the Create Subscription API call.
Using the “start_date” parameter with the preferred date in a UNIX time stamp format.
Sample in cURL
-d customer[email]="firstname.lastname@example.org" \
-d customer[first_name]="John" \
-d customer[last_name]="Doe" \
-d customer[phone]="+1-949-999-9999" \
-d card[gateway]="chargebee" \
-d card[first_name]="John" \
-d card[last_name]="Doe" \
-d card[number]="4111111111111111" \
-d card[expiry_month]="3" \
-d card[expiry_year]="2017" \
-d card[cvv]="585" \
-d plan_id="copy-test" \
If the API was successful the subscription will be created in a future date as specified, all trial periods or charges will start post this date.
Using the Admin Console.
If you are using the Chargebee Admin console to create a subscription, go to Subscriptions » Subscriptions » Create New Subscription.
When creating the subscription you need to specify the Start Date, see image insert.
Please Note: Once the customer record is created in Chargebee is when payment (card) information can be added. Creating a new subscription (as mentioned above) will also create a new customer, unless you using the Create New Subscription from the customer details page.