SaaS/Subscription with FastSpring help needed

Hello,

Does anyone have Application SaaS/Subscriptions setup and running with FastSpring?

In my Application, I'm checking a custom license field that an the expiry date (isDateValid)

On the FastSpring SpringBoard, I've setup a Subscription and under the Advanced Options, I can choose:

- Applies to Non-Rebills/First Orders Only- Applies to Rebills Only- Always Applies

I think it will work when I use 'Always Applies'. However, (I guess) new Keys are generated every time then with both the original sale and all rebills.

What I would like to do is: 1: use a script for 'Applies to Non-Rebills/First Orders Only' that generates the Key.2: then another script for 'Applies to Rebills Only' that *updates* the LimeLM custom license field that has the expiry date.

How would the script look like to update a custom license field? And how does that work in case things go wrong (original order not found or something).

Maybe I should put some kind of FastSpring Order ID as custom license field that can be used to locate the original order?

Or maybe it doesn't make sense to even check the expiry date but let FastSpring just delete the key?

Does anyone have any pointers on how to do this?

Thanks!

Well, the best thing to do is to have 2 separate scripts. One that generates the product keys, one that extends the trial. As far as generating the product keys, you should use our existing script: https://wyday.com/limelm/help/automate-license-generation-with-fastspring/

For the extension script you need to do the following:

1. Either prompt the user for the product key, or use the email address the user provides to find the product key: https://wyday.com/limelm/help/api/limelm.pkey.find/

2. Based on the product key found, get the product key id: https://wyday.com/limelm/help/api/limelm.pkey.getID/

3. Then set the custom license fields: https://wyday.com/limelm/help/api/limelm.pkey.setDetails/

Let me know if that helps.