Sites/Subdomains

Introduction Site Subdomain

Learn how to use sites to organize your business and provide the setup necessary to interact with Chargify via the API. If you need help after reading this, please let us know so we can help and also improve this documentation.


When you are new to Chargify, we will create your first Site for you after you choose a currency. Sites are simply “containers” for your Products, Customers, and Subscriptions. You can use Chargify with just one Site, although most Merchants will want two sites at a minimum – one for testing and one for production.

Site Access

To manage your sites, login to Chargify and view your sites.

From here you can:

  • Create a new site
  • Go to any site dashboard
  • Clone any site (ie. Make a copy of the structure of a site, including: products, components, families, etc)
  • Edit any site (Currency, Name, Date/Time Format, Timezone, etc)
  • Delete any site

To begin, create a site (make sure to put it in test mode) and pick a subdomain that you will remember for use in your API calls.

Sites are restricted to a single currency, so it is common to create a site that is named using that currency - for example: “Acme USD”, “Acme GBP”, etc.

For more information about sites, including: switching sites, clearing site data, cloning - please see this documentation.

Site API Subdomain

Every site has the ability to have one or more API keys associated with it to allow API access. The subdomain name is used in API calls to direct what site should be used in the context of the API call.

For example, if you have a site called “Acme, Inc.” with the subdomain “acme” then you would use a call similar to:

curl -u <API_KEY>:X -H Accept:application/json -X GET https://acme.chargify.com/subscriptions.json

The host is always in the form https://<SUBDOMAIN>.chargify.com followed by the URI for the API resource you are trying to access. In this last example, that would be /subscriptions.json as that is the URI of the resource to get a list of subscriptions in JSON.

Please see our API documentation for more information.

Clearing Site Data

Clearing your site data is very useful in specific circumstances:

  • When in development/test, clearing your site data allows you remove records that you added in for testing.
  • When moving to production/live mode, clearing your site data is necessary for allowing your gateway to actually process real money.

Clearing your site data can be done in the following methods:

  1. Clearing Site Data via the Website
  2. Clearing Site Data via the API

Clearing Via Website

To clear your site data via the website, please see the following.

Clearing Via API

There are a few options for clearing your site data, which match the settings available if you perform this action through the website. The most basic is clearing all your data:

curl -u <API_KEY>:X -H Accept:application/json -X POST https://acme.chargify.com/sites/clear_data.json

For more information about the parameters for clearing your site data using the API, please see the API documentation.

Next Steps

After you’ve created a new site, you should check out the following articles: