API Version 1

The provided API's are based on simple HTTP GET and POST operations. All requests must be made over HTTPS using TLS 1.2 (SSLv2, SSLv3, TLSv1, and TLSv1.1 not supported). Any request that does not meet these requirements will be rejected. You can choose whether you want to receive a response in XML or JSON. This version of the API contains the following operations:

Donation Feed

List Campaigns

Get Campaign Info

Submit Donation

Account Totals

Campaign Totals

Account History

Campaign History

Donation Feed

You can query Transaxt to get a feed of the last 25 donations that were submitted to your account. This can be used for presenting a scrolling list or marquee on a web-page (see sample page code below). You can control the information that is provided in the feed by changing your account settings. The feed is "off" be default, so you must first change the setting on your account page for it to work. Next, you need to get your account code, which can be located on your account home page when you login. Finally, execute an HTTP GET to a URL specified in one of these formats (replace [account code] with your actual code):

https:/transaxt.com/api/1/feed/[account code] (returns XML)
https:/transaxt.com/api/1/feed/[account code]/json (returns JSON)
https:/transaxt.com/api/1/feed/[account code]/jsonp (executes JSONP request for JavaScript inside web-pages -- see below for example.)

Optional URL parameters:
?last=n — Tells the api to return the last n donations. If omitted or greater than 25, then the last 25 donations will be returned.
?callback=function — Required for JSONP

Data Returned

NOTE: In order to safeguard performance under heavy load, the results of these requests are cached on the server for up to 1 minutes. Therefore, multiple calls within a 1 minute span will likely return the same results, even if new donations where created.

This operation returns the following information, either in XML, JSON, or JSONP formats:

ResultCode An integer value that indicates the status of the request. Possible values are:

0 Success
1 An account with the specified code could not be found.
2 The donation feed has not been turned on. Please see the account settings.
Message A text description of the request status.
QueryTimeUTC UTC time when the query was executed. Because of caching, this value may be the same across multiple calls.
Donations An array of donation information in reverse chronological order. Each donation object has the following fields:

DonationID A unique identifier for the donation.
DonorName First name and last initial of the donor.
DonorLocation City and state where the donor is located.
Amount Numerical amount of donation (USD). Only provided if this option is selected in the account settings. Otherwise it will be 0.
AmountString Formatted string for the amount donated (USD). Only provided if this option is selected in the account settings. Otherwise it will be empty.
DonatedAtUTC UTC date/time of the donation.

Example XML Response

<DonationFeedResult xmlns="http://transaxt.com/api/1" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<ResultCode>0</ResultCode>
	<Message>OK</Message>
	<QueryTimeUTC>2012-02-14T20:27:19.432762Z</QueryTimeUTC>
	<Donations>
		<Donation>
			<Amount>10.00</Amount>
			<AmountString>$10.00</AmountString>
			<DonatedAtUTC>2012-01-24T18:17:03.52Z</DonatedAtUTC>
			<DonationID>99a2c096-2b3e-441c-9780-d05f1f4ccf3b</DonationID>
			<DonorLocation>Rockford, MI</DonorLocation>
			<DonorName>John D</DonorName>
		</Donation>
		<Donation>
			<Amount>100.00</Amount>
			<AmountString>$100.00</AmountString>
			<DonatedAtUTC>2012-01-24T18:10:29.137Z</DonatedAtUTC>
			<DonationID>3de91742-66ec-4268-bf17-2a04aee064bf</DonationID>
			<DonorLocation>Gaylord, MI</DonorLocation>
			<DonorName>Carrie T</DonorName>
		</Donation>
		...
	</Donations>
</DonationFeedResult>

Example JSON Response

{
	"Donations":[
		{
			"Amount":10.00,
			"AmountString":"$10.00",
			"DonatedAtUTC":"\/Date(1327429023520)\/",
			"DonationID":"99a2c096-2b3e-441c-9780-d05f1f4ccf3b",
			"DonorLocation":"Rockford, MI",
			"DonorName":"John D"
		},
		{
			"Amount":100.00,
			"AmountString":"$100.00",
			"DonatedAtUTC":"\/Date(1327428629137)\/",
			"DonationID":"3de91742-66ec-4268-bf17-2a04aee064bf",
			"DonorLocation":"Gaylord, MI",
			"DonorName":"Carrie T"
		},
		...
	],
	"Message":"OK",
	"QueryTimeUTC":"\/Date(1329251506212)\/",
	"ResultCode":0
}

HTML Example: Using jQuery and JSONP to display a donation feed marquee on a web page

The HTML below represents an example of using jQuery to access a JSONP feed and display an animated marquee of recent donors.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Donation Feed (v1) Sample</title>
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" ></script>
	
	<style type="text/css">
		body {font-family:Trebuchet MS;}
		#feed-ticker {font-size:12px;}
		.d-hdg {font-size:12px;color:Blue;}
		.d-donor{font-weight:bold;padding-right:20px;}
		.d-location{padding-right:20px;color:#777;}
		.d-amount{font-weight:bold;color:Green;}
	</style>
</head>
<body>
	<div class="d-hdg">Thank you for your donations:</div>
	<div id="feed-ticker">Loading...</div>

	<script type="text/javascript">
		(function() {
			var donations = [];
			var displayIndex = 0;
			var isFirstUpdate = true;

			function encodeHtml(value) {
				return $('<div />').text(value).html()
			}
			
			function refreshFeed() {
				$.ajax({
					dataType: 'jsonp',
					url: "https://transaxt.com/api/1/feed/ph935k/jsonp", // replace 'ph935k' with your account code
					success: function (data) {
						if ( data.ResultCode == 0 ) {
							donations = data.Donations;
							if (isFirstUpdate) {
								isFirstUpdate = false;
								updateDisplay();
							}
						}
						else {
							$("#feed-ticker").text(data.Message);
						}
					},
					complete: function() { setTimeout( refreshFeed, 330000 ); } // Refreshes feed every 5.5 minutes
				});
			}

			function updateDisplay() {
				if (donations.length > 0) {
					if (displayIndex >= donations.length) {
						displayIndex = 0;
					}

					try {
						var donation = donations[displayIndex];

						var html = [];
						html.push('<span class="d-donor">' + encodeHtml(donation.DonorName) + '</span>');
						html.push('<span class="d-location">' + encodeHtml(donation.DonorLocation) + '</span>');
						html.push('<span class="d-amount">' + encodeHtml(donation.AmountString) + '</span>');

						$("#feed-ticker").fadeOut(500, function() {
							$("#feed-ticker").html(html.join(""));
							$("#feed-ticker").fadeIn(500);
						});
					}
					catch (e) {}
					displayIndex++;
				}

				setTimeout(updateDisplay, 8000); // Update display every 8 seconds
			}
			
			$(document).ready(refreshFeed);	
		})();
	</script>
</body>
</html>


List Campaigns

This method will return a list of campaigns and their campaign codes for the provided account code. First, you need to get your account code, which can be located on your account home page when you login. Next, execute an HTTP GET to a URL specified in one of these formats (replace [account code] with your actual code):

https:/transaxt.com/api/1/campaignlist/[account code] (returns XML)
https:/transaxt.com/api/1/campaignlist/[account code]/json (returns JSON)
https:/transaxt.com/api/1/campaignlist/[account code]/jsonp (executes JSONP request for JavaScript inside web-pages)

Data Returned

This operation returns the following information, either in XML, JSON, or JSONP formats:

ResultCode An integer value that indicates the status of the request. Possible values are:

0 Success
1 An account with the specified code could not be found.
Message A text description of the request status.
Campaigns An array of CampaignItem objects in order by campaign name. Each object has the following fields:

CampaignCode The code for the campaign. Can be used in subsequent API calls to get information or post a donation.
Name The name of the campaign in Transaxt.
Description An optional description for the campaign.

Example XML Response

<CampaignListResult xmlns="http://transaxt.com/api/1" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<Campaigns>
		<CampaignItem>
			<CampaignCode>78FLY3</CampaignCode>
			<Description>First major radio campaign of the season.</Description>
			<Name>Radio campaign</Name>
		</CampaignItem>
		<CampaignItem>
			<CampaignCode>Y76P48</CampaignCode>
			<Description/>
			<Name>Chicago Event</Name>
		</CampaignItem>
		...
	</Campaigns>
	<Message>OK</Message>
	<ResultCode>0</ResultCode>
</CampaignListResult>

Example JSON Response

{
	"Campaigns":[
		{
			"CampaignCode":"78FLY3",
			"Description":"First radio campaign of the season",
			"Name":"Radio Campaign"
		},
		{
			"CampaignCode":"Y76P48",
			"Description":"",
			"Name":"Chicago Event"
		}
	],
	"Message":"OK",
	"ResultCode":0
}


Get Campaign Info

You can query Transaxt to get setup information for a particular campaign. First, you need to get the campaign code, which can be located on the campaign setup page when you login to your account. Next, execute an HTTP GET to a URL specified in one of these formats (replace [campaign code] with your actual code):

https:/transaxt.com/api/1/campaigninfo/[campaign code] (returns XML)
https:/transaxt.com/api/1/campaigninfo/[campaign code]/json (returns JSON)

Data Returned

This operation returns the following information, either in XML or JSON format:

ResultCode An integer value that indicates the status of the request. Campaign details will not be returned unless the ResultCode = 0 (Success). Possible values are:

0 Success
1 A campaign with the specified code could not be found.
2 The campaign has been marked inactive.
Message A text description of the request status.
CampaignCode Campaign Code for this campaign.
Committee The name of the campaign committe.
Title The title chosen for their donation web-page.
CampaignMessage The message chosen for their donation web-page.
DisclaimerText The disclaimer text chosen for their donation web-page.
ComplianceText The complaince text chosen for their donation web-page.
ThankYouText The text for the donation web-page that is displayed after a donation is made.
CustomDataHeading1 Heading for the Custom1 field for this campaign. Usually this is "Employer".
IsCustomData1Required "true" or "false" depending on whether the Custom1 field is required.
CustomDataHeading2 Heading for the Custom2 field for this campaign. Usually this is "Occupation".
IsCustomData2Required "true" or "false" depending on whether the Custom2 field is required.
CustomDropDownQuestion Custom question for Custom3 value. May be empty if none specified
IsCustomDropDownAnswerRequired "true" or "false" depending on whether the Custom3 field is required.
CustomDropDownOptions A list of valid options for the Custom3 value. Each option has a Value. May be empty if none specified.
EmployerExtra1Heading Heading for the EmployerExtra1 field for this campaign. This is one of three additional employer related text fields that accounts can specify if they need more employer information (such as address). Field may be required -- see IsEmployeeExtra1Required element.
IsEmployerExtra1Required "true" or "false" depending on whether the EmployerExtra1 field is required.
EmployerExtra2Heading Heading for the EmployerExtra2 field for this campaign. This is one of three additional employer related text fields that accounts can specify if they need more employer information (such as address). Field may be required -- see IsEmployeeExtra2Required element.
IsEmployerExtra2Required "true" or "false" depending on whether the EmployerExtra2 field is required.
EmployerExtra3Heading Heading for the EmployerExtra3 field for this campaign. This is one of three additional employer related text fields that accounts can specify if they need more employer information (such as address). Field may be required -- see IsEmployeeExtra3Required element.
IsEmployerExtra3Required "true" or "false" depending on whether the EmployerExtra3 field is required.
IsCVVRequired "true" or "false" depending on whether the CVV (credit-card security code) is required.
VariableAmountsAllowed "true" or "false" depending on whether the doner can submit any value they want, or if it has to be one of the values listed in DonationLevels.
DonationLevels A list of donation levels specified by the campaign. Each item in the list has an Amount and Description.

Example XML Response

<?xml version="1.0" encoding="utf-8"?>
<CampaignInfoResult xmlns="http://transaxt.com/api/1" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<CampaignCode>Y76P48</CampaignCode>
	<CampaignMessage>Thank you very much for your contribution.</CampaignMessage>
	<Committee>Pike for President</Committee>
	<ComplianceText>I affirm that I am making this contribution via my personal credit or debit card for which I have a legal obligation to pay, and not through a corporate or business entity card or the card of another person.</ComplianceText>
	<CustomDataHeading1>Ref ID</CustomDataHeading1>
	<CustomDataHeading2>Notes</CustomDataHeading2>
	<EmployerExtra1Heading>Employer Address</EmployerExtra1Heading>
	<EmployerExtra2Heading></EmployerExtra2Heading>
	<EmployerExtra3Heading></EmployerExtra3Heading>
	<CustomDropDownOptions>
		<Option>
			<Value>News</Value>
		</Option>
		<Option>
			<Value>Internet</Value>
		</Option>
		<Option>
			<Value>Advertisements</Value>
		</Option>
	</CustomDropDownOptions>
	<CustomDropDownQuestion>How did you hear about us?</CustomDropDownQuestion>
	<DisclaimerText>Paid for by Pike for Congress</DisclaimerText>
	<DonationLevels>
		<DonationLevel>
			<Amount>10.0000</Amount>
			<Description>Basic</Description>
		</DonationLevel>
		<DonationLevel>
			<Amount>20.0000</Amount>
			<Description>Advanced</Description>
		</DonationLevel>
		<DonationLevel>
			<Amount>30.0000</Amount>
			<Description>Super</Description>
		</DonationLevel>
	</DonationLevels>
	<IsCVVRequired>false</IsCVVRequired>
	<IsCustomData1Required>true</IsCustomData1Required>
	<IsCustomData2Required>false</IsCustomData2Required>
	<IsCustomDropDownAnswerRequired>true</IsCustomDropDownAnswerRequired>
	<IsEmployerExtra1Required>true</IsEmployerExtra1Required>
	<IsEmployerExtra2Required>false</IsEmployerExtra2Required>
	<IsEmployerExtra3Required>false</IsEmployerExtra3Required>
	<Message>OK</Message>
	<ResultCode>0</ResultCode>
	<ThankYouText>Thank you for your donation!!!</ThankYouText>
	<Title>Donate to Pike for Congress!</Title>
	<VariableAmountsAllowed>true</VariableAmountsAllowed>
</CampaignInfoResult>

Example JSON Response

{
	"CampaignCode":"Y76P48",
	"CampaignMessage":"Thank you very much for your contribution.",
	"Committee":"Pike for President",
	"ComplianceText":"I affirm that I am making this contribution via my personal credit or debit card for which I have a legal obligation to pay, and not through a corporate or business entity card or the card of another person.\u000a",
	"CustomDataHeading1":"Ref ID",
	"CustomDataHeading2":"Notes",
	"EmployerExtra1Heading":"Employer Address",
	"EmployerExtra2Heading":"",
	"EmployerExtra3Heading":"",
	"CustomDropDownOptions":[{"Value":"News"},{"Value":"Internet"},{"Value":"Advertisements"}],
	"CustomDropDownQuestion":"How did you hear about us?",
	"DisclaimerText":"Paid for by Pike for Congress",
	"DonationLevels":[
		{"Amount":10.0000,"Description":"Basic"},
		{"Amount":20.0000,"Description":"Advanced"},
		{"Amount":30.0000,"Description":"Super"}
	],
	"IsCVVRequired":false,
	"IsCustomData1Required":true,
	"IsCustomData2Required":false,
	"IsCustomDropDownAnswerRequired":true,
	"IsEmployerExtra1Required":true,
	"IsEmployerExtra2Required":false,
	"IsEmployerExtra3Required":false,
	"Message":"OK",
	"ResultCode":0,
	"ThankYouText":"Thank you for your donation!!!",
	"Title":"Donate to Pike for Congress!",
	"VariableAmountsAllowed":true
}


You can submit donations to campaigns via HTTP forms POST. First, you need to get the campaign code, which can be located on the campaign setup page when you login to your account. Next, execute an HTTP POST to a URL specified in one of these formats (replace [campaign code] with your actual code):

https:/transaxt.com/api/1/donate/[campaign code] (returns XML)
https:/transaxt.com/api/1/donate/[campaign code]/json (returns JSON)
https:/transaxt.com/api/1/donate/[campaign code]/redirect (redirects browser to URL's specified in the post data -- see below)

Data Returned

This operation returns the following information, either in XML, JSON, or as query parameters appended to a redirected URL supplied by the caller:

ResultCode An integer value that indicates the status of the request. Campaign details will not be returned unless the ResultCode = 0 (Success). Possible values are:

0 Success
1 A campaign with the specified code could not be found.
2 The campaign has been marked inactive.
3 A required field was missing or left blank.
4 The donation amount specifed was either <=$0 or it had decimal values beyond two places.
5 This donation would put the donor over the personal contribution limit specified.
6 The credit-card transaction failed.
Message A text description of the request status. In the case of a failed credit-card transaction, this will have the reason (invalid card #, bank declined, etc.) In the case of a successful donation, this will have the thank you text specified for the campaign.
TransactionID If the transaction was successful, this will contain a unqiue id that can be used to reconcile transactions. The transaction id is included when you export donations from within your account.

Submission Fields

Data is submitted to the operation via a standard HTTP forms POST (content type = application/x-www-form-urlencoded.) This could be done programmatically or via a standard HTML page (with the FORM action set to the API URL.) The following fields are supported:

FirstName (Required) The donor's first name.
LastName (Required) The donor's last name.
Phone (Required) The donor's phone number.
Address1 (Required) The donor's first address line.
Address2 (Optional) The donor's second address line.
City (Required) The donor's city.
State (Required) The donor's state.
Zip (Required) The donor's zip-code.
Custom1 (Required or Optional depending on campaign settings) Custom data value #1. Typically this is the donor's employer.
Custom2 (Required or Optional depending on campaign settings) Custom data value #2. Typically this is the donor's occupation.
Custom3 (Required or Optional depending on campaign settings) Custom data value #3. Accounts can specify a custom drop-down when they define a campaign. The result would go in this field. Valid values can be determined from the campaign info.
EmployerExtra1 (Required or Optional depending on campaign settings) Extra employer data #1.
EmployerExtra2 (Required or Optional depending on campaign settings) Extra employer data #2.
EmployerExtra3 (Required or Optional depending on campaign settings) Extra employer data #3.
CreditCard (Required) The credit-card number.
CVV (Required or Optional depending on campaign settings) The CVV (security code) for the credit-card.
ExpiryMonth (Required) Expiry month for the credit-card (valid values are "01" - "12")
ExpiryYear (Required) Four-digit expiry year for the credit-card.
NameOnCard (Required) The name on the credit-card.
Email (Required) The donor's email address.
BillingSameAsPersonal (Optional) Set to "1" if the billing address on-file with the credit-card is the same as the personal address. (Use a check-box on an HTML form.)
BillAddress1 (Required unless BillingSameAsPersonal="1") Credit-card billing address line 1.
BillAddress2 (Optional) Credit-card billing address line 2.
BillCity (Required unless BillingSameAsPersonal="1") Credit-card billing city.
BillState (Required unless BillingSameAsPersonal="1") Credit-card billing state.
BillZip (Required unless BillingSameAsPersonal="1") Credit-card billing zip.
DonationAmount (Required) The amount of the donation. Must be a valid decimal value (do not include the $) greater than zero with no more than two decimal places.
Source (Optional) Specify a value to indicate the source (such as "iPad App"). Any value will be accepted.
RedirectOnSuccessURL (Required if redirection is specified) The URL to redirect the browser to if the donation is successful. The URL will have ResultCode and Message query parameters appended to it.
RedirectOnFailureURL (Required if redirection is specified) The URL to redirect the browser to if the donation fails for some reason. The URL will have ResultCode and Message query parameters appended to it. Can be the same as RedirectOnSuccessURL.

Example XML Response

<?xml version="1.0" encoding="utf-8"?>
<DonateResult xmlns="http://transaxt.com/api/1" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<ResultCode>0</ResultCode>
	<Message>Thank you for your contribution!</Message>
	<TransactionID>B575392A-2212-4099-91E3-56B5B2676994</TransactionID>
</DonateResult>

Example JSON Response

{
	"ResultCode":0,
	"Message":"Thank you for your contribution!",
	"TransactionID":"B575392A-2212-4099-91E3-56B5B2676994"
}

Example of Redirection

The HTML below represents a simplistic example of a page that posts a donation to the API and has it redirect to another page. Obviously, a real page would need validation, etc.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Donate API v1 Test Page</title>
</head>
<body>
	<form action="https://transaxt.com/api/1/donate/Y76P48/redirect" method="post">
		
		<ul>
			<li>First Name:</li>
			<li><input type="text" name="FirstName" /></li>

			<li>Last Name:</li>
			<li><input type="text" name="LastName" /></li>

			<li>Phone #:</li>
			<li><input type="text" name="Phone" /></li>

			<li>Email Address:</li>
			<li><input type="text" name="Email" /></li>

			<li>Address 1:</li>
			<li><input type="text" name="Address1" /></li>

			<li>Address 2:</li>
			<li><input type="text" name="Address2" /></li>

			<li>City:</li>
			<li><input type="text" name="City" /></li>

			<li>State:</li>
			<li><input type="text" name="State" /></li>

			<li>Zip-code:</li>
			<li><input type="text" name="Zip" /></li>

			<li>Employer:</li>
			<li><input type="text" name="Custom1" /></li>

			<li>Occupation:</li>
			<li><input type="text" name="Custom2" /></li>

			<li>Employer Address:</li>
			<li><input type="text" name="EmployerExtra1" /></li>

			<li>Custom Drop-Down Question:</li>
			<li>
				<select name="Custom3">
					<option>Option 1</option>
					<option>Option 2</option>
					<option>Option 3</option>
				</select>
			</li>

			<li>Credit-card #:</li>
			<li><input type="text" name="CreditCard" /></li>

			<li>CVV (Security Code):</li>
			<li><input type="text" name="CVV" /></li>

			<li>Name on Card:</li>
			<li><input type="text" name="NameOnCard" /></li>

			<li>Expires Month:</li>
			<li>
				<select name="ExpiryMonth">
					<option>01</option>
					<option>02</option>
					<option>03</option>
					<option>04</option>
					<option>05</option>
					<option>06</option>
					<option>07</option>
					<option>08</option>
					<option>09</option>
					<option>10</option>
					<option>11</option>
					<option>12</option>
				</select>
			</li>

			<li>Expires Year:</li>
			<li>
				<select name="ExpiryYear">
					<option>2011</option>
					<option>2012</option>
					<option>2013</option>
					<option>2014</option>
					<option>2015</option>
					<option>2016</option>
				</select>
			</li>

			<li>Donation Amount:</li>
			<li><input type="text" name="DonationAmount" /></li>

			<li>
				<input type="checkbox" name="BillingSameAsPersonal" /> Billing Address is Same as Personal Address
			</li>

			<li>Billing Address 1:</li>
			<li><input type="text" name="BillAddress1" /></li>

			<li>Billing Address 2:</li>
			<li><input type="text" name="BillAddress2" /></li>

			<li>Billing City:</li>
			<li><input type="text" name="BillCity" /></li>

			<li>Billing State:</li>
			<li><input type="text" name="BillState" /></li>

			<li>Billing Zip:</li>
			<li><input type="text" name="BillZip" /></li>
		</ul>

		<input type="hidden" name="Source" value="API test page" />

		<input type="hidden" name="RedirectOnSuccessURL" value="http://yourwebsite.com/DonateResponse.htm" />
		<input type="hidden" name="RedirectOnFailureURL" value="http://yourwebsite.com/DonateResponse.htm" />

		<button type="submit">Submit Donation</button>
	</form>
</body>
</html>

The HTML below represents a simplistic example of a page that the above page might redirect to in order to display the result of the submission.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Donate API v1 Response Page</title>
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" ></script>
</head>
<body>
	<h1 id="success"></h1>
	<p id="message"></p>

	<script type="text/javascript">
		function getParameterByName(name) {
			var match = RegExp('[?&]'+name+'=([^&]*)').exec(window.location.search);
			return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
		}

		$(document).ready( function() {
			var wasSuccessful = getParameterByName("ResultCode") == "0";

			$("#success").text( (wasSuccessful) ? "Donation Successful" : "There was a problem with your donation." );
			$("#message").text(getParameterByName("Message"));
		});
	</script>
</body>
</html>


Account Totals

You can query Transaxt to get donation totals for an entire account. This is a private API and requires you to pass along your secret API key. To locate your API key, login to your Account Page and click on the "view API settings" link. You will also need your Account Code, which can also be located on your Account Page. Finally, execute an HTTP GET to a URL specified in one of these formats (replace [account code] and [api key] with your actual code and API key, respectively):

https:/transaxt.com/api/1/accounttotals/[account code]?apikey=[api key] (returns XML)
https:/transaxt.com/api/1/accounttotals/[account code]/json?apikey=[api key] (returns JSON)

Optional URL parameters:
?start=YYYY-MM-DD — Specify an inclusive start-date in YYYY-MM-DD format for the calculation.
?end=YYYY-MM-DD — Specify an inclusive end-date in YYYY-MM-DD format for the calculation.
If no additional parameters are passed, then the totals represent all time.

Data Returned

NOTE: In order to safeguard performance under heavy load, the results of these requests are cached on the server for up to 1 minutes. Therefore, multiple calls within a 1 minute span will likely return the same results, even if new donations where created.

This operation returns the following information, either in XML or JSON formats:

ResultCode An integer value that indicates the status of the request. Possible values are:

0 Success
1 An account with the specified code could not be found.
2 The API key specified is not the correct one for the account.
Message A text description of the request status.
GrossTotal A decimal value that represents the total of all donations made during the specified time-period.
NetTotal A decimal value that represent the total of all donations made during the specified time-period, minus any fees or commissions.

Example XML Response

<TotalsResult xmlns="http://transaxt.com/api/1" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<GrossTotal>20523.00</GrossTotal>
	<Message>OK</Message>
	<NetTotal>19558.42</NetTotal>
	<ResultCode>0</ResultCode>
</TotalsResult>

Example JSON Response

{
	"GrossTotal":20523.00,
	"Message":"OK",
	"NetTotal":19558.42,
	"ResultCode":0
}


Campaign Totals

You can query Transaxt to get donation totals for a particular campaign. This is a private API and requires you to pass along your secret API key. To locate your API key, login to your Account Page and click on the "view API settings" link. You will also need your Campaign Code, which can be located on the particular Campaign Page. Finally, execute an HTTP GET to a URL specified in one of these formats (replace [campaign code] and [api key] with your actual code and API key, respectively):

https:/transaxt.com/api/1/campaigntotals/[campaign code]?apikey=[api key] (returns XML)
https:/transaxt.com/api/1/campaigntotals/[campaign code]/json?apikey=[api key] (returns JSON)

Optional URL parameters:
?start=YYYY-MM-DD — Specify an inclusive start-date in YYYY-MM-DD format for the calculation.
?end=YYYY-MM-DD — Specify an inclusive end-date in YYYY-MM-DD format for the calculation.
If no additional parameters are passed, then the totals represent all time.

Data Returned

NOTE: In order to safeguard performance under heavy load, the results of these requests are cached on the server for up to 1 minutes. Therefore, multiple calls within a 1 minute span will likely return the same results, even if new donations where created.

This operation returns the following information, either in XML or JSON formats:

ResultCode An integer value that indicates the status of the request. Possible values are:

0 Success
1 A campaign with the specified code could not be found.
2 The API key specified is not the correct one for the account.
Message A text description of the request status.
GrossTotal A decimal value that represents the total of all donations made during the specified time-period.
NetTotal A decimal value that represent the total of all donations made during the specified time-period, minus any fees or commissions.

Example XML Response

<TotalsResult xmlns="http://transaxt.com/api/1" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<GrossTotal>20523.00</GrossTotal>
	<Message>OK</Message>
	<NetTotal>19558.42</NetTotal>
	<ResultCode>0</ResultCode>
</TotalsResult>

Example JSON Response

{
	"GrossTotal":20523.00,
	"Message":"OK",
	"NetTotal":19558.42,
	"ResultCode":0
}


Account History

You can download a CSV export of donation history for an entire account. This is a private API and requires you to pass along your secret API key. To locate your API key, login to your Account Page and click on the "view API settings" link. You will also need your Account Code, which can be located your main Account Page. Finally, execute an HTTP GET to the following URL (replace [account code] and [api key] with your actual code and API key, respectively):

https:/transaxt.com/api/1/accounthistory/[account code]?apikey=[api key] (returns CSV)

Optional URL parameters:
?start=YYYY-MM-DD — Specify an inclusive start-date in YYYY-MM-DD format for the export.
?end=YYYY-MM-DD — Specify an inclusive end-date in YYYY-MM-DD format for the export.
If no additional parameters are passed, then the totals represent all time.

HTTP Status Codes

The success or failure of the operation is returned as HTTP status codes:

200 Successful call
400 Request was invalid/missing required parameters.
403 The provided API Key is incorrect for the account.
404 The account code was invalid.
500 A server error occurred.

Data Returned

This operation returns a list of donation details in CSV format:

DonationID A unique ID that identifies a particular donation
CampaignCode The code for the campaign that was contributed to
CampaignName The name of the campaign that was contributed to
DonationAmount The total amount of the donation
RefundedDonationAmount The total amount that has been refunded from the original donation
NetDonationAmount The net amount that is due to the account, minus any fees or commissions
DonationDate The date when the donation was made
EmailAddress Donor's email address
FirstName Donor's first name
LastName Donor's last name
Address1 Donor's first address line
Address2 Donor's second address line
City Donor's city
State Donor's state
Zip Donor's Zip Code
Occupation Value supplied in the "Occupation" field, if provided
Employer Value supplied in the "Employer" field, if provided
PhoneNumber Donor's phone number
TrackingCode The value provided in the ?src= parameter of the donation URL
CustomAnswer The answer to the custom drop-down question, if provided
EmployerExtra1 The value provided in the first extra employer info field, if provided
EmployerExtra2 The value provided in the second extra employer info field, if provided
EmployerExtra3 The value provided in the thrid extra employer info field, if provided
IsRecurringDonation Indicates if the donation is recurring (True/False).


Campaign History

You can download a CSV export of donation history for an particular campaign. This is a private API and requires you to pass along your secret API key. To locate your API key, login to your Account Page and click on the "view API settings" link. You will also need a Campaign Code, which can be located on your particular campaign's page. Finally, execute an HTTP GET to the following URL (replace [campaign code] and [api key] with your actual code and API key, respectively):

https:/transaxt.com/api/1/campaignhistory/[campaign code]?apikey=[api key] (returns CSV)

Optional URL parameters:
?start=YYYY-MM-DD — Specify an inclusive start-date in YYYY-MM-DD format for the export.
?end=YYYY-MM-DD — Specify an inclusive end-date in YYYY-MM-DD format for the export.
If no additional parameters are passed, then the totals represent all time.

HTTP Status Codes

The success or failure of the operation is returned as HTTP status codes:

200 Successful call
400 Request was invalid/missing required parameters.
403 The provided API Key is incorrect for the account.
404 The campaign code was invalid.
500 A server error occurred.

Data Returned

This operation returns a list of donation details in CSV format:

DonationID A unique ID that identifies a particular donation
CampaignCode The code for the campaign that was contributed to
CampaignName The name of the campaign that was contributed to
DonationAmount The total amount of the donation
RefundedDonationAmount The total amount that has been refunded from the original donation
NetDonationAmount The net amount that is due to the account, minus any fees or commissions
DonationDate The date when the donation was made
EmailAddress Donor's email address
FirstName Donor's first name
LastName Donor's last name
Address1 Donor's first address line
Address2 Donor's second address line
City Donor's city
State Donor's state
Zip Donor's Zip Code
Occupation Value supplied in the "Occupation" field, if provided
Employer Value supplied in the "Employer" field, if provided
PhoneNumber Donor's phone number
TrackingCode The value provided in the ?src= parameter of the donation URL
CustomAnswer The answer to the custom drop-down question, if provided
EmployerExtra1 The value provided in the first extra employer info field, if provided
EmployerExtra2 The value provided in the second extra employer info field, if provided
EmployerExtra3 The value provided in the thrid extra employer info field, if provided
IsRecurringDonation Indicates if the donation is recurring (True/False).
Real Time Web Analytics