> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable Subscribers to Purchase Free Trial Offers

You can use the Subscribe APIs to allow subscribers to purchase a Subscription with a free trial offer that automatically converts to a paid subscription at the end of the free trial.

* **Use Case Number:** 2-2-09
* **Completed By:** Software Developer
* **Estimated Completion Time:** 1 day

## Basic Scenario

A new subscriber purchases a standard rate Subscription that includes a free trial period.

## Design Approach

While similar to other use cases for creating Subscriptions (see [Enable Subscribers to Purchase a Subscription With a Credit Card](2202_r_allowCustomersPurchase#)), this use case has a slight modification in that the Billing Plan defines the first billing period as a Free Period and then subsequent billing periods are not Free Periods. When calling the subscriptions endpoint, you must submit the ID of the billing plan that contains the Free Trial Period.

<img src="https://mintcdn.com/amdocs-slm/ifa3y22T11JlqvtT/portal/vindiciaSubscribeAndNewRetain/subscribeUseCases/images/2209_createSubscriptionFreeTrial.png?fit=max&auto=format&n=ifa3y22T11JlqvtT&q=85&s=96a36a4ec4ab8ce0d3d22acd7057d7b3" alt="" width="906" height="500" data-path="portal/vindiciaSubscribeAndNewRetain/subscribeUseCases/images/2209_createSubscriptionFreeTrial.png" />

* **[Configure Free Trials Using Subscribe APIs](../topics/2209_r_enableFreeTrialAPI#)**

**Parent topic:**[Free Trials](../topics/r_freeTrials)

## Configure Free Trials Using Subscribe APIs

Create a billing plan using the Subscribe Portal that has a free trial period as the first billing period.

To allow subscribers to purchase free trials:

1. Call the subscriptions endpoint passing the free trial billing plan.

   **Sample Code**

   `POST https://api.staging.us-west.vindicia.com/subscriptions?dry_run=0`

   JSON Request:

   ```

   {
     "object": "Subscription",
     "id": "ABIDTestId2233",
     "account": {
       "id": "AccountID2233",
       "email": "myemail@vindicia.com",
       "email_type": "html",
       "name": "AccountID2233"
     },
     "billing_plan": {
       "id": "CB_Monthly_BP_1freeCycle"
     },
     "payment_method": {
       "id": "PMID2233",
       "type": "CreditCard",
       "credit_card": {
         "object": "CreditCard",
         "account": "4111111111111111",
         "expiration_date": "201909"
       },
       "account_holder": "Peter Rabbit",
       "billing_address": {
         "object": "Address",
         "line1": "2226 Mary Ave",
         "city": "Santa Clara",
         "postal_code": "95050",
         "phone": "408408408"
       },
       "active": true
     },
     "source_ip": "192.168.99.130",
     "items": [
       {
         "object": "SubscriptionItem",
         "id": "ABItemID2233",
         "product": {
           "id": "NewProduct-Nov102017"
         }
       }
     ]
   }
   ```

* A proper Subscription with Account objects is created in Vindicia Subscribe.
* Initial zero dollar Transaction is generated if applicable.
* Future billings are correctly predicted.
* Account has been granted appropriate Entitlements.
* At the end of the free trial period, the Subscription automatically converts to a paid subscription at the defined price.
* This scenario allows a subscription to be created without a payment method being provided by the customer for the free trial period. A valid payment method is required for the first charged (non free) billing period. If one is not provided, the subscription is canceled. You can set a grace period for the subscription prior to cancellation allowing the subscriber additional time to provide a payment method without losing access to the product.

**Parent topic:**[Enable Subscribers to Purchase Free Trial Offers](../topics/2209_r_enableFreeTrialAPI#)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.