Home > Credit Cards > Credit Card API
Become a Member
Promotional Methods
Credit Card XML API
There is also a Javascript version available.
What is the API?
Credit.com provides an API for retrieving credit cards for display on your website.
You can select specific sets of cards to display, such as Visa cards or cards for people with excellent credit.
The credit card data is sent to you in XML or JSON format. You must develop the UI yourself.
How to Use the API
The API is simply a URL that returns an XML file containing a set of credit cards. Here's an example URL. Click on it and view source to see the XML:
The URL's parameters:
| af: |
Your Credit.com affiliate ID. This must be correct to get credit for the traffic you send to Credit.com. |
| ag: | An optional agent ID. More about agent IDs. |
| xpath: |
An optional xpath expression that retrieves a specific set of cards (more below). |
Retrieving Specific Sets of Cards
The URL's "xpath" parameter lets you retrieve cards by credit score, brand, rewards type, student cards, etc.
For example, the following URL retrieves student cards:Click on the URLs below to retrieve specific sets of cards:
|
|
|
|
|
PHP Sample
This PHP sample retrieves the cards via the API and displays them on the page.
XSL Sample
When you view the returned XML document in a browser, there's an XSL that lets you see the results in a browser-friendly format. This XSL also serves as an example of how to use XSL to render the results.
This XSL sample lives at: http://www.credit.com/assets/xsl/creditcards/creditcards_xml_api_v3.xsl
FAQ
Q - What technologies must my website use?
A - No specific technologies. Your website can be in PHP, ASP, XML, or something else. You just need to know how to send an HTTP request, receive the XML, read it and wrap it in your own display.
Q - Should I cache the data?
A - Yes. Instead of retrieving the credit card data from Credit.com every time a user hits your site, we recommend caching it on your side for a few hours.
Q - How often should I retrieve the data from Credit.com?
A - You should pull the XML from Credit.com at least once every 24 hours to ensure you have the latest. Credit card companies are required by law to maintain very current marketing information on the web.
Q - How often does Credit.com update the cards?
A - You are pulling from the same database that Credit.com uses for our own site. As soon as we have the changes, you have the changes.

