The ClickBank Application Program Interfaces, or APIs, are tools that let you create applications to get information on your account. Your application provides your credentials and the information request, and ClickBank returns the information in the specified format.
Using information from the ClickBank APIs, you can create an application that displays or uses this data in useful ways. For example, you could create a dashboard that shows ClickBank data in addition to data from accounts with other online services, a subscription management tool, or an analytics package that shows sales trends for an account or product.
NOTE – You have to be familiar with REST APIs to create your own application using the ClickBank APIs. If you don’t feel comfortable creating your own application using the ClickBank APIs, you should find a developer who can help you.
The following subjects are covered in this article:
The Tickets API lets you create a technical support or refund ticket, and view or update the status of an existing ticket. For refund tickets related to physical products, you can also confirm that you’ve received a returned product.
These are older versions of the 1.3 APIs. They lack some of the new features of the versions listed above. You can continue to use them if you are already doing so, but you should plan on migrating to the newer versions, as these versions will eventually be deprecated.
ClickBank’s API methods are secure and will return a 403 [Forbidden] status code if accessed without the right credentials. To provide these credentials and access the ClickBank APIs, you must use an authorization header containing one or more keys.
The following keys can be used:
Developer Key – This key grants access to the API for your account. This key is required for all ClickBank APIs.
Clerk Key – This is a key for a specific user. It grants one or more of the following roles:
Subscription Modification – This role is in a beta period. Contact ClickBank if you want access to this role and the related features.
Some actions require specific roles. See the URL for an API to see the required roles for each action.
CAUTION – Do not share your ClickBank API keys publicly. Redact all personal information and API keys when troubleshooting or sharing code online via websites like Pastebin or Stack Exchange.
You can view, create, and edit Developer and Clerk API keys to use with the ClickBank APIs.
If you are using a single account:
Log in to your account.
Click the Settings tab.
Click My Account. The existing Clerk API Keys and Developer API Keys are displayed.
To create or edit keys, click the Edit option for either Developer API Keys or Clerk API Keys.
To create a new key, click the Create button and specify a name for the new key. If you are creating a Clerk API key, select one or more roles to assign to the key.
To edit an existing Clerk API key, click the Edit icon and select or deselect one or more roles.
If you are using a master account, you can view, create, and edit Clerk API keys for your users:
Log in to your master account.
Click Users. The current users are displayed. You can create a new user, view a user’s Clerk API key, and manage a user’s roles.
To create a new user, click Create New User. You can create an API-only user, or create a user who can also log into the user interface. Provide the information required for the user type, then specify the user’s roles. The user’s Clerk API key is displayed on the role selection page.
To view a user’s Clerk API key or manage a user’s roles, click Manage Permissions. Select or deselect one or more roles, then click Save. The user’s Clerk API key is displayed on the role selection page.
Once you have a Developer API key and Clerk API keys with the correct roles, you provide them in the Authorization parameter.
For example, this authorization uses a Developer API key and Clerk API key:
If an action does not require a role other than Developer, you can provide only a Developer API key. For example:
For some programming languages, the ClickBank APIs require your system to possess a certificate for the following domain:
Verify that you have a certificate for this domain. The procedure for acquiring this certificate varies based on your browser, but your browser indicates a secure connection to the API pages above if the certificate is present.
The ClickBank APIs are based on JSR-311 – the Java API for RESTful Web Services. The services are HTTP-based and implementation-agnostic, meaning that any web client (.NET, PHP, Java, Python, Ruby, etc.) can use them.
Headers and Sizing
The ClickBank API header consists of security, output, and page parameters. The ClickBank APIs only accept query parameters; requests using form-based (post) parameters are ignored.
The HTTP specification limits a URL to 2,000 characters or fewer. Ensure that your ClickBank API URLs don’t exceed 2,000 characters.
The ClickBank APIs support the following output formats:
You select an output format by including an Accept parameter in the HTTP header.
For example, this header requests XML output:
The ClickBank APIs return the first 100 rows of data for any service call. If a request would contain more than 100 rows of data, the API returns the first 100 rows with a status code of 206 [Partial Content]. To retrieve the additional pages, include a Page parameter in the HTTP header indicating which pages to retrieve.
For example, this header requests page 3:
Once the final page has been accessed, the service returns a status code of 200 [OK] instead of 206 [Partial Content].
To protect the ClickBank API system, quotas are placed on ClickBank API usage.
The default quotas are:
A maximum of 25,000 requests per day per account.
A maximum of five requests per second per IP Address.
If a quota is exceeded, the ClickBank API will return a status code of 403 [Forbidden] and a message indicating that the quota has been met.
If you feel that you need a higher daily quota, you can contact Customer Service to request an increase. Please provide a brief explanation of why you need a quota increase.
These resources may be useful when working with the ClickBank APIs.
When you send a request to the debugging service, it returns the request context information including the security context information. This can be useful when correcting issues with the ClickBank APIs.
The following code samples show how you might use the ClickBank APIs using different web clients. Each sample provides the necessary credential and header information and requests a list of orders.