Collapse Menu
Docs Home
Extensibility Options
Contact Support

Can I Prevent Someone from Signing Up for a Free Trial Subscription More than Once?

Overview

This article provides information on whether I can Prevent Someone from Signing Up for a Free Trial Subscription More than Once

Overview

This article provides information on whether I can Prevent Someone from Signing Up for a Free Trial Subscription More than Once

 

We are sometimes asked whether or not we can prevent a customer from signing up for a subscription with free trial days, and then when the trial period has ended, cancelling the original subscription without paying, and signing up for another free trial. In our experience, reports of such exploitation have been rare. Although there is no automatic way to detect and prevent these orders, it is possible for you to potentially detect them and cancel subsequent trial subscriptions for the same customer.

 Note

Implementation of this solution requires some degree of technical knowledge and capability. This solution requires the use of both webhooks and the FastSpring API.

 

 

Taking Advantage of Webhooks and the FastSpring API

If you subscribe to the subscription.activated webhook event, FastSpring will notify you in near-real-time when a new subscription is activated. The subscription.activated event payload includes the customer's account ID, which uniquely identifies the customer.

FastSpring customer accounts are created automatically when a purchase is completed using an email address that has never previously been used in your Store. If a future order (including new subscription orders) comes through using an email address already associated with a previous order, FastSpring will automatically associate the same customer account ID with the new order.

You can use the customer account ID from subscription.activated to check for previous orders of the same free trial subscription product (by product ID). There are two different ways you could do this, depending on whether or not you automatically populate your own external database from all webhook data.

Checking Your Own External Database

If your webhook script populates an external database each time new webhook events come in, you could design the script to react to subscription.activated events for a given free trial product by checking your database for previous orders of the same product bearing the same customer account ID.

 

Checking for Previous Orders via the FastSpring API

Alternatively, you could design your webhook script to react to subscription.activated events for a given free trial product by triggering a GET request to the /accounts endpoint of the FastSpring API, for a list of all orders associated with the customer account. For example, if the account ID is ABCDEF123456:

GET https://api.fastspring.com/accounts/ABCDEF123456

Then, call GET /orders once with all order IDs returned in the response to GET /accounts, to find the products that the customer has previously ordered. For example, if GET /accounts returns the following three IDs in the orders array of the response:

  • NTjP8IMnQya1X9jxhXFiXQ
  • eShDqjTVS4SmroSANRnL8g
  • sE2PBBihSUKNX_vUxBfHww
GET https://api.fastspring.com/orders/NTjP8IMnQya1X9jxhXFiXQ,eShDqjTVS4SmroSANRnL8g,sE2PBBihSUKNX_vUxBfHww

Finally, you would parse the response to this GET /orders request looking for previous orders with the same free trial subscription's product ID in the product field of each order's items array.

 

Handling Exploitation of Free Trial Periods

In the event that a previous free trial subscription is found for the same customer, your script could be designed to automatically trigger a DELETE call to the /subscriptions endpoint of the FastSpring API, using the new subscription's ID and including the parameter &billingPeriod=0. The new free trial subscription would thus be deactivated immediately. For example, if the new subscription's ID is OU8128675309:

DELETE https://api.fastspring.com/subscriptions/OU8128675309?billingPeriod=0

By default, a subscription deactivated email message will be sent to the customer upon deactivation of the subscription, but you might also want your script to trigger a separate email message from your side, letting the customer know why the subscription has been canceled.

Try FastSpring

Get a free account and see why FastSpring is the ecommerce partner of choice for software providers around the world. Try our full-service ecommerce solution today to unlock revenue growth for your online company.