The SDI allows you to set the following querystring parameters (which must be UrlEncoded) into a given donation url. This url is then presented to the donor and when clicked the donor will be taken to JustGiving's checkout with the following parameters pre-set to the form.
What type of pages does the SDI support donations for?
-
Fundraising
-
/v1/fundraisingpage/donate/pageid/{PageId}
-
-
Campaign Direct
- /v1/campaign/donate/campaignGuid/{CampaignGuid}
-
Charity Direct
-
/v1/charity/donate/charityId/{charityId}
-
/v1/charity/donate/ein/{EIN}
-
-
Crowdfunding
-
/v1/crowdfundingpage/donate/pageid/{PageId}
-
All links start with https://link.justgiving.com
What customisations can I add?
Combine variations of the below by adding a single ? and then separating each following parameter with &
Name | Description | Supports Fundraising & Direct donations | Query String Parameter | Notes |
CharityId | The unique id of the charity on JustGiving | Both | charityid= | Not to be confused with the charity's registration number. |
Amount | A decimal number (optionally including two decimal places.) to pre-fill the donation amount. | Both | amount= | See list of minimum amounts supported |
DonationValue | A decimal number (optionally including two decimal places.) to pre-set the donation value and bypass the amount step. | Both | donationValue= | See list of minimum amounts supported |
Reference | 50 characters of free text for your reference. This is returned on the JustGiving API as "thirdPartyReference" and returned in charity donation reports. | Both | reference= | 8 character limit |
Frequency |
If true, the user will land on the donation amount page with monthly/recurring selected. |
Direct donations only | isRecurring= | If left empty or false, we default to one time donation |
ExitUrl | Once payment processing is complete, redirects user to the specified web address instead of default JustGiving Thank You page. | Both | exiturl= | A Url encoded Uri. If an exitUrl is supplied, after the "Processing" page, the user is redirected to this location. We suggest that you encode some kind of unique identifier into this exitUrl so you can identify the user. |
Currency | You can set the donation form to default to one of our selected currencies. | Both | currency= | Supported ISO currency codes (must be in capitals) GBP, EUR, USD, AUD, CAD, NZD |
Forced Guest Checkout | If true, for a logged out user, they will not given the opportunity to log in. | Both | forceGuest= | If left empty or false, we will default to presenting log in |
Skip Gift Aid | If true, the user will not be shown the gift aid page, however they can go back for it from the summary page | Both | skipGiftAid= | If left empty or false, Gift Aid will be presented to user where applicable |
Successful DonationID | Where the donation is complete, we'll return to you the successful donationId | Both | JUSTGIVING-DONATION-ID | Needs to be appended to exitUrl |
Example SDI urls
CharityId
Whilst we support the return of the charityId, in our OneSearch API or GetCharityById API you can also download our latest list of charities (UK or US for now) by using this link
https://data.justgiving.com/UK_charitylist_fulldata.csv
https://data.justgiving.com/US_charitylist_fulldata.csv
Troubleshooting
If the resulting checkout experience isn't as you tried to build, check your casing, check your values and check your URL structure. If a customisation can't be applied it will fall back to the normal checkout flow, it should not error out.
If the link takes you to https://www.justgiving.com/discover/featured then the page you're trying to donate to is likely to be expired, misconfigured or non-existent.
0 Comments