> For the complete documentation index, see [llms.txt](https://docs.soraco.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.soraco.co/docs/3rd-party-integration/fastspring/fastspring-how-to-create-a-license-key-with-a-specific-expiry-date-in-fastspring.md).

# FastSpring - How to create a license key with a specific Expiry Date in FastSpring

The procedure below describes how to order a product via FastSpring with a specific expiry date. In this example, the expiry date is set to one year from the date of order but you can change the value in the script.

* Create a product in FastSpring.
* Asd a fulfillment action:
  * Select the "Generate a License" option.
  * Select Script (PHP or JavaScript).
  * Set the Output Format to: Single-Line License (Quantity Based).
  * Set the License Name to: Person Name.
  * Set the Script Type to: JavaScript
  * Click Create.
  * Copy paste the attached script.
  * Click Save.
* Test your order from FastSpring

In the script, you can change the duration of the expiry date by modifying this line:

//\
// Set the expiry to one year from today\
//\
endDate.setMonth(endDate.getMonth()+12);

* [fastspring-set-expirydate-script.txt](https://support.soraco.co/hc/en-us/article_attachments/115010397686)1 KB [Download](https://support.soraco.co/hc/en-us/article_attachments/115010397686)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.soraco.co/docs/3rd-party-integration/fastspring/fastspring-how-to-create-a-license-key-with-a-specific-expiry-date-in-fastspring.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
