Adding Online Donations Via API

ISPolitical supports submissions of online donations and other public forms via a rest API using basic access authentication .

Your username will be a pipe delimited concatenation of the client account name & your integration login name. For example, the “Civil War Online Donation System”, would use “Washington|CWODS” to submit data to the Washington account. Your same login can be used for any client accounts that have granted you access. Your password will be provided by ISPolitical staff.

POST to the API at https://app.ISPolitical.com/api/PublicForms/

If you have not integrated with ISPolitical before, you will need to contact support@ispolitical.com to get an integration account setup.

Submissions will return a success or failure and a unique ID per account.

For example:

{ "id":20, "success":true}

We’ve put together some sample code to help you along in this process:

JavaScript/jQuery

This is a list of possible fields to include in a Submission:

Entity

  • EntityType (“Company” or “Individual”)
  • FullName (FullName can be used instead of the name fields below if your form doesn’t support, or have, pre-parsed names)
  • NamePrefix
  • FirstName
  • MiddleName
  • LastName
  • NameSuffix
  • Nickname
  • Occupation
  • Employer
  • AddressType
  • Company
  • Line1
  • Line2
  • City
  • State
  • ZipCode
  • Notes
  • Source (a page descriptor)

Note: Source is included in the email that is sent and is logged for ISP developer review as needed. It has no impact on the clients data.

The API supports the following Transaction Types:

  • Monetary Contribution
  • Voids (NOTE: Voids are sent as Monetary Contributions, but use a negative number. The system will record those as reversed contributions).
  • Expense
  • Refunded Contribution
  • Inkind Contribution
  • Deposits (See Deposit section below)

NOTE: Monetary Contribution is the default if field is empty.

Below are the supported Transaction fields.

Amounts should be sent via API as a positive number (even if it’s an expense).

Transaction

  • TransactionType
  • Amount
  • BudgetCategory
  • NoteForInternal
  • RecurringFrequency — example “monthly” or “one-time”
  • RecurringLength
  • NameOnCard
  • PartialCardNumber
  • Company — second address for billing purposes (optional)
  • Line1
  • Line2
  • City
  • State
  • ZipCode

Emails (optional/repeatable)

  • EmailAddress
  • OptIn (boolean)

Phones (optional/repeatable)

  • PhoneNumber
  • Extension
  • PhoneType

Addresses (optional/repeatable)

  • AddressType
  • Company
  • Line1
  • Line2
  • City
  • State
  • ZipCode

Flags (optional/repeatable)

  • FlagName

Note: Flags must be added into your ISP account before trying to submit them via the API.

A sample submission follows. If you have need for additional fields, or questions, please contact ISPolitical staff.

Sample Submission

{
   "NamePrefix":"Mr.",
   "FirstName":"Abraham",
   "MiddleName":"",
   "LastName":"Lincoln",
   "NameSuffix":"",
   "Nickname":"Abe",
   "Occupation":"President",
   "Employer":"The United States",
   "AddressType":"Work",
   "Company":"The White House",
   "Line1":"1600 Pennsylvania Ave NW",
   "Line2":"",
   "City":"Washington",
   "State":"DC",
   "ZipCode":"20500",
   "Notes":"Good luck with the campaign!",
   "Source":"Fall Fundraiser",
   "Transactions":[
      {
         "Amount":"500",
         "Date":"1862-12-21",
         "NoteForInternal":"Friends of Abe Club"
      }
   ],
   "Emails":[
      {
         "EmailAddress":"abelinc@gmail.com"
      }
   ],
   "Phones":[
      {
         "PhoneNumber":"(202) 456-1111",
         "PhoneType":"Work"
      },
      {
         "PhoneNumber":"(202) 456-1000",
         "PhoneType":"Mobile"
      }
   ]
}

Fee Sample

{
   "Company":"Credit Card Processing Solutions LLC",
   "EntityType":"Company",
   "Line1":"5555 Green Blvd",
   "Line2":"Suite 500",
   "City":"The Lakes",
   "State":"NV",
   "ZipCode":"88901",
   "Transactions":[
      {
         "Amount":"62.23",
         "Date":"2020-01-07",
         "NoteForInternal":"Processing Fees",
         "TransactionType":"Expense"
      }
   ]
}

Volunteer Sample

{
   "FirstName":"Betsy",
   "LastName":"Ross",
   "Emails":[
      {
         "EmailAddress":"betsy@creativeupholstery.com"
      }
   ],
   "Flags":[
      {
         "FlagName":"Sewing"
      },
      {
         "FlagName":"Graphic Design"
      }
   ]
}

Automatic Deposit Batching

We also support the creation of deposits based on payouts sent to clients! In order to utilize this, you need to include in the Transactions section of the JSON a “UniqueIdentifier” for each contribution and expense sent.

Example of the added “UniqueIdentifier” line:

"Transactions":[
   {
      "Amount":"62.23",
      "Date":"2020-01-07",
      "NoteForInternal":"Processing Fees",
      "TransactionType":"Expense",
      "UniqueIdentifier":"R2D2-urmyonlyhope7"
   }
]

You can then send over a “Deposit” transaction containing the unique identifiers included on each contribution in the payout (as well as fees). The deposit info will then be used to create a batch deposit in ISP with all the transactions listed!

Example of a deposit submission (NOTE: Company MUST be Deposit and EntityType MUST be Other):

{
   "Company":"Deposit",
   "EntityType":"Other",
   "Transactions":[
      {
         "Amount":"437.77",
         "Date":"2020-01-07",
         "TransactionType":"Deposit",
         "Items":[
            "R2D2-urmyonlyhope7",
            "redleader-7divisionattack"
         ]
      }
   ]
}

Related Information


Sample API Code for JavaScript

Budget Category API Requests

Deposit Batches API Requests

ISP will automatically filter out known common fake email addresses during the import process. For example: noreply@noreply.com and test@test.com. If you have common addresses that should be blocked from import to your database, please let us know.