Migrate an Apex GuideStar charity check to Pactman
Mike Edwards
If your Salesforce Apex code uses the legacy GuideStar charity check, trace its flow in the code before making any modifications. Candid has retired the legacy API, and the Salesforce Foundation has placed its wrapper Apex class into archive status. This migration is for the EIN lookup that you have created as custom Apex. Refer to Salesforce’s Candid Premier documentation for their internal tax-status check within Grants Management. Migrate organization search, detail, and Exchange calls separately if your application uses them.
Start with the old call. Set up the new client in a sandbox before editing it.
Set up the Apex SDK in a sandbox
Clone the Pactman SDK, and install the source code of it in a sandbox. The folder “examples” is where the testing classes can be found, and they need not be included in this deployment process. From the Salesforce setup screen, navigate to Named Credentials -> External Credentials. Open Pactman API Key and change the authentication parameter of the named principal to the token value. The Salesforce platform automatically prefixes the value with Bearer. Assign the Pactman Nonprofit Check User permission set to the person who will run the lookup.
git clone https://github.com/PledgeSoftwareTX/new-pactman-nonprofitcheck-salesforce-sdk.git
cd new-pactman-nonprofitcheck-salesforce-sdk
sf project deploy start --source-dir force-app --target-org <sandbox-alias>
With access set up, send one request and look at the debug log.
Run the demo in Execute Anonymous
The first test should be done with Execute Anonymous by comparing the name found in the debug logs to the name expected. The code will work using either the public demo credentials or a key authorized for that EIN.
PactmanClient client = new PactmanClient();
PactmanSingleCheckResult result = client.nonprofits.check('68-0343125');
System.debug(result.nonprofit.ein);
System.debug(result.nonprofit.organization_name);
System.debug(result.nonprofit.bmf_status);
System.debug(result.nonprofit.pub78_verified);
System.debug(result.nonprofit.revocation_date);
System.debug(result.nonprofit.ofac_status);
Salesforce Developer Edition test, December 4, 2026
Organization: TREE HOUSE SENIOR APARTMENTS INC
IRS Business Master File status: true
Publication 78 verified: true
Revocation date: null
OFAC message: no inclusion on the SDN list
Separate direct API check: HTTP 200 and the same values.
Revocation and reinstatement (revocation_code, revocation_date, reinstatement_date)
OFAC response (ofac_status)
Where it matters to the workflow, distinguish an omitted field from one returned as null. Record the OFAC response in text format and send possible matches or missing or conflicting evidence to a reviewer.
Prior to turning on the automation, use the SDK mocks to check authentication failures, missing records, and rate limits.
In the current nonprofit environment, organizations are increasingly relying on technology to enhance donor interaction, ensure compliance, and streamline operations. The Pactman Nonprofit CheckPlus API […]
TABLE OF CONTENTS Introduction Overview of Nonprofit Grant Options Critical Statistics on Nonprofit Grants in the U.S. Nonprofit Grants in Washington Nonprofit Grants in Alabama […]
TABLE OF CONTENTS Introduction Nonprofit Funding Gaps in Africa Critical Statistics on Nonprofit Grants Local vs International Nonprofit Grants in Africa: A Comparative Analysis Overview […]
Understanding free software licensing options is crucial for a nonprofit seeking to maximise impact while working with limited resources. Free and open-source software (FOSS) can […]
Humanity faces an immediate ecological challenge in environmental protection, where some countries are leading the way in this decisive struggle. The World Bank identifies pollution […]
Coordinating impactful nonprofit content marketing campaigns is an effective way for nonprofits to capture audience attention and deliver outstanding returns even with a limited budget. […]