PledgeCents API Documentation - v1.0.0
Latest Version: 1.0.0
Table of Contents
Authentication
Every request to the PledgeCents API is validated with the unique API key given to each of our partners.
Creating a Fundraiser
Example Request:
Creating a fundraiser through the PledgeCents API is quick and easy. Simply send a POST
request to https://www.pledgecents.com/api/v1/causes
with the following arguments:
- api_key Your API key. If you have not received your API key, please contact info@pledgecents.com
- first_name The first name of the user attempting to create the fundraiser.
- last_name The last name of the user attempting to create the fundraiser.
- email The email address of the user attempting to create the fundraiser.
- organization_name The name of the school or organization to which the fundraiser creator belongs.
- organization_zip The zip code of the school or organization to which the fundraiser creator belongs.
- goal The amount of funds to be raised. This will usually correspond to the price of a product or service that you, our partner, offer. We recommend that this amount include all necessary fees.
All arguments are required. A new account on PledgeCents.com will be created for the user when the request is successfully completed.
curl https://www.pledgecents.com/api/v1/causes \
-d api_key=ya5rh64086KWj0CBMibh \
-d first_name=Sally \
-d last_name=Duval \
-d email=sduval@oaktreehs.com \
-d organization_name="Oak Tree High School" \
-d organization_zip=91502 \
-d goal=145
Example Response on Success:
{
"success": true,
"url": "https://www.pledgecents.com/cause/ncwspb/connecting-our-classroom-through-google-
}
Example Response on Failure:
{
"success": false,
"errors": ["The following field needs to be filled out: First name", "Sorry! You can't set a negative goal!"]
}
Requesting Partner Information
PledgeCents provides an API endpoint for retrieving limited information about the partner associated with the given correct API key.
Example Request:
POST
request to this endpoint is your unique API key.
curl https://www.pledgecents.com/api/v1/partner \
-d api_key=ya5rh64086KWj0CBMibh
Example Response on Success:
Upon successful validation of the API key provided, a response containing the matching partner's name and logo will be returned.
{
"success": true,
"partner": {
"name": "Nearpod",
"image": "<a href="https://nearpod.com" target="_blank"><img src="https://www.pledgecents.com/images/preferredpartners/956/637/956637a7ead72166fb968f2d92807c44.png"></a>"
}
}
Example Response on Failure:
If the API key does not match any of our partners, a failure response will be returned.
{
"success": false,
"errors": "Unable to validate PledgeCents API Access. Please contact an administrator."
}
Testing
Being able to test the integration of our API into your site is important.
PledgeCents provides a very simple way to put your requests in 'testing mode'. Simply add the argument testing
with a value of true
to your fundraiser creation request.
Testing Response
The response returned from a request with testing=true
will be identical to the response from a live request. A link to a fundraiser on PledgeCents.com will be provided, but the fundraiser will only be accessible through that direct link and will not be able to receive investments, and will be removed from the site within 24 hours.
curl https://www.pledgecents.com/api/v1/causes \
-d api_key=ya5rh64086KWj0CBMibh \
-d first_name=Sally \
-d last_name=Duval \
-d email=sduval@oaktreehs.com \
-d organization_name="Oak Tree High School" \
-d organization_zip=91502 \
-d goal=145 \
-d testing=true
PledgeCents Fees
It is recommended that the goal amount you provide when creating a fundraiser include all the fees associated with using PledgeCents.com. All fees are taken out of the total amount raised by the fundraiser, so including all fees when calculating the initial goal amount ensures that the user will raise enough funds to fully cover the cost of your product or service.
The fee breakdown for PledgeCents.com is as follows:
- Payment Processing Fee: 3%