FastSpring API

Last modified August 14, 2017

Access

Obtain your "API Key", which consists of a username and password. To obtain your API Key, login to the Dashboard and navigate to Integrations > Get API Credentials. The username and password are used for "Basic Authentication" when making requests to the API. A "User-Agent" header is also required by the API to be included in all requests.

Make all requests to https://api.fastspring.com

Note about creating new transactions via the API

As the merchant and seller of record for all transactions we process, only FastSpring can collect customers' payment details (e.g. credit card numbers). Thus, in order to create new transactions via the FastSpring API, the customer must already have a payment method on file with FastSpring. Read more about creating orders for customers with payment methods on file here.

Data Types

When preparing your database structure for storing values obtained from FastSpring via our JSON payloads you might assume the following datatypes:

  • All "string" columns are VARCHAR 255, accordingly trimmed
  • Encoding is UTF-8
  • For numeric values (such as price or discount values) 2dp precision is expected ("2.00")

Available API Endpoints

Endpoint Description Functions
/accounts

Work with customer accounts and FastSpring-generated account IDs

  • Get one account
  • Get all accounts
  • Create an account
  • Update an existing account
  • Look up accounts by parameters
  • Get authenticated account management URLs
/coupons Work with promotional coupons and their customer-facing codes
  • Create a coupon
  • Update an existing coupon
  • Add coupon codes to a coupon
  • Retrieve coupon details
  • Get coupon codes assigned to a coupon
  • Delete coupon codes from a coupon
/events Retrieve unprocessed webhook events and mark events processed
  • Get processed or unprocessed webhook events matching specified parameters
/orders Work with order / transaction records
  • Get orders by ID
  • Get orders by product path
  • Get orders by date range
  • Create a new order and complete the charge
  • Update order tags and attributes
/products

Work with product records

  • Get one or more products

  • Get a list of all product IDs

  • Create one or more new products

  • Update one or more existing products

/returns Work with returns and refunds
  • Get one or more returns by ID
/sessions Create a pre-loaded cart session for a specific customer with a FastSpring-
generated account IDs; you can load the session in a Popup Storefront
or provide the customer with a link to the session via a Web Storefront
  • Create a pre-filled order session
/subscriptions Work with customers' recurring-billing subscription instances
  • Get all subscription instances
  • Get one or more specific subscription instances
  • Get subscription instance entries
  • Update existing subscription instances
  • Cancel subscription instances
  • Uncancel subscription instances prior to deactivation
  • Rebill managed subscription instances

Rate Limiting

In order to maintain a responsive user experience, FastSpring may impose request rate limits on API calls originating from individual accounts. In the event that the rate limit is met, the response to the API request will be an http 404 response code (though this may be improved soon).

Batch requests

If you need to make a large number of API requests in a very short time, such that you may encounter rate limits, consider using batch requests where possible. For example, when retrieving authenticated account management URLs, you can obtain URLs for multiple account IDs in a single request:  

GET /accounts/{id1}[,{id2},{id3},...]/authenticate

More information about this example can be found in our Knowledge Base article about the accounts endpoint.

Similar batch functionality is available for retrieving ordersproductsreturns and subscriptions.