FORMAT: 1A HOST: https://api-sandbox.networkforgood.org/ # Network for Good REST API # Current Operational Status | Environment | Status | |-------------|-------------------------------| | Sandbox | Service is Operating Normally | | Production | Service is Operating Normally | # Overview The Network for Good Donation Processing API is a REST-based web service designed to process donations to 501(c)(3) organizations and K-12 Public Schools, as well as corresponding donor information management and reporting, made on sites operated by our partners. This service allows partners to focus on their site objectives without worrying about the complexities related to donation transactions and donation disbursements. Sandbox and production access to this API is only provided to paying partners with an active subscription with Network for Good. # Confidentiality This information is the sole and confidential property of Network for Good, and is being shared with the partner for the purposes of collaboration, or for evaluating a possible collaboration, to provide users of the partner website(s) with access to products and services, as provided by Network for Good. The partner agrees to treat any and all information contained or referenced here as confidential, to use it solely for the purpose of the evaluation and definition of a collaboration, to make it accessible only to such employees who have a need to know, not to disclose it to any third party, and not to distribute in any way, except with the prior written consent of Network for Good. All information contained or referenced here shall remain the exclusive property of Network for Good as well as all patent, copyright, trade secret, trademark and other intellectual property rights therein. No license or conveyance of any such rights to the partner is granted or implied. # Working with Network for Good ## How to Get Access If you are interested in learning more about Network for Good's services, or if you would like to get access to the Donation Processing REST API, please contact our Partnership team at partnerships@networkforgood.com. Sandbox and production access to this API is only provided to paying partners with an active subscription with Network for Good. ## Support Questions As you review and integrate Network for Good’s services, you may direct any questions to our Partner Support email (partnersupport@networkforgood.org). Members from both our business and technical teams frequently monitor this list and are committed to providing responses to your questions in a timely manner. When submitting questions to the mailing list, please be sure to reference your Partner Name or Partner Source in the subject line. ## How Donations are Processed Network for Good is a for-profit social enterprise who provides technology to clients enabling their users to make tax deductible donations. On the backend, the technology is paired with the Transaction Processing and Disbursement Services provided by the Network for Good 501(c)3 nonprofit Donor Advised Fund (DAF). # Organization Data Sets Currently Network for Good can process donations to over 1.4M U.S. based, public operating 501(c)3 organizations as well as K-12 Public Schools. Network for Good has partnered with GuideStar to ensure all organizations are eligible when donors make their contribution and when the organization receives their disbursement through NFG. A charity must be opted-in to receive online donations through their GuideStar profile in order for Network for Good to process the donation. Partners who wish to incorporate a charity search option as part of their donation experience for users must license a database from a third-party (I.e., GuideStar, CharityNavigator, etc), or curate a list on their own. This decision should be made early in the discovery process to allow ample time for selecting a third-party provider, negotiating costs, and aligning efforts with the overall technical integration. ## 501(c)(3) Organization Data Set The available list of 501(c)(3) organizations for processing is managed and periodically refreshed by Guidestar (www.guidestar.org). The source for the GuideStar data set is found on IRS Publication 78 located at http://apps.irs.gov/app/eos/ and kept up to date with revocation and reinstatement data also from the IRS. ## K-12 Public School Data Set The available list of K-12 public schools for processing is also managed and periodically refreshed by Guidestar (www.guidestar.org). The source for the GuideStar data set is found on the National Council on Education Statistics located here: https://nces.ed.gov/datatools/. Network for Good is able to process donations for those organizations found within these data sets. For access to this data set for searching, please contact Network for Good for assistance or you may contact GuideStar directly. ## Syncing the Charity Data Regardless of the option you go with, in order to limit the chances that a donation fails due to an invalid charity, it’s important that your database align sync with the Pub 78 and NCES databases mentioned above. In addition to the organization types that we can specifically call out (international organizations, private non operating foundations, organizations that have not registered with Guidestar, 501(c)4 organizations, etc.), there are charities that have proactively ‘Opted Out’ from receiving donations from third party processors. Network for Good can provide a list of these "Opt Out" charities as needed. # Security Requirements ## Network Security ### Secure Socket Layer (SSL) All communications with Network for Good services must be made over Secure Socket Layer (SSL). All calls to APIs must use https protocol. ### IP Address Restriction Only IP addresses which have been registered with Network for Good are allowed to access the web service. This restriction applies to both the Sandbox and Production environments. IP addresses registered for Production use must be different from those submitted for Sandbox testing. We ask that partners restrict the number of whitelisted IP addresses to the minimum number needed. If a range of IP addresses is provided, please make sure that all the IPs within that range are owned by your organization. Please allow one business day for all new or updated IP whitelisting requests. All changes are made during standard business hours. #### Using a cloud environment? Network for Good requires use of static IP addresses for accessing our services. If you are using a cloud environment, please consult your hosting provider to determine options for producing a static IP address. In cloud environments, additional servers are sometimes added spontaneously to accommodate rapid scaling. In these scenarios, the Partner is responsible for sending the new IP address to Network for Good, via email to partnersupport@networkforgood, as quickly as possible to mitigate disruption of service. Network for Good will whitelist the new static IP as quickly as possible once notified. ## Authentication and Authorization Authentication and authorization are handled by using the HTTP Authorization header, once a token has been obtained by the partner from a POST action to the /access/rest/token resource. ### Construction of the HTTP Authorization Header The access token obtained can then be used in the Authorization header with the Bearer authentication scheme (http://tools.ietf.org/html/rfc6750), such as: Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6Ijg0YzM1NjY2MzZlNGQ4MTFiNmRiM2ZmNDQwMmUyMzYwIiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzY5Nzk1LCJuYmYiOjE0Mzc1ODE3OTV9.HNdedPKai8puqUHk3ji1aKAocbz_PW81GJPZl8fQ_Es-sJ8hw8CApulEAFOSqZwOzfjmsmXB4BF-XokL8RseeyytJqRM7rPHfVdqEtRti4M4dFPo-0YGDvTTqFYi0FKG1RFTtsnS3p-jHUB-56GAPogOgE7KWkzaDKDATQggBHM24LCOQaFgEZnbI_-sq-Ybaw5R4UGIf8t1KC4VkxVczIz9dIQrl0KNJRuFmPoOi7xumrNTNJX_I0qeINfEMZrssm_1zXiu3lOZeKHsuosLkG6_g2eWBebIj6ZyvM6G89Jmn1925shz82v-74qmEs8SI23S5Ix5Y20SsJxXSC8NSA ### Revoking compromised tokens If you believe your access token has been compromised, please send a revocation request with the token details to Network for Good as quickly as possible to prevent any unauthorized use and generate a new token to use going forward. ## Data and Website Security If credit card information will be captured via your site, you are strictly prohibited from storing any of the following pieces of data: + Credit Card Type + Name on Card + Full Credit Card Number *Note: The last four digits may be maintained for display purposes.* + Card Expiration Month and Year + Card Security Code (CSC/CVV) To mitigate credit card fraud, partners should never display any specific payment gateway responses to the end user. Even in the cases of failed credit card authorization or charge, a more generic error message should be displayed instead. See the Error Messages section for recommended wording in these scenarios. Partners are also recommended to disable the ability to save or auto-complete the following fields on applicable web forms: + Credit Card Type + Name on Card + Credit Card Number + Card Expiration Month and Year + Card Security Code (CSC/CVV) + User Login and Password (if applicable) # Implementation Requirements ## Data Validation Network for Good requires partners to validate user input before submitting values to the API. In addition, standardized values such as State and Country codes must be submitted in our specified format. This section provides guidelines for the minimum data validation requirements for your implementation. ### NPO Recipient Network for Good requires the following validations for the identified recipient charity: + Charity Identifier: EINs may be submitted in either “xxxxxxxxx” or “xx-xxxxxxx” format. NCES School IDs should be formatted as "xxxxxxxxxxxx". + NPO Tax Status: The identified recipient NPO must have an IRS tax status of 501(c)3 and listed as 'opt in' through GuideStar to receive third-party charitable contributions online or must be listed on the K-12 Public School GuideStar/NCES database. + NPO Opt-Out: Proper action should be taken to ensure that donations are not made to these NPOs via your site. If you are using GuideStar to power your charity search, please confirm that your GuideStar account is configured to deliver NPO opt status data to your web application(s). If you are not using GuideStar, please notify Network for Good, and we can provide you with an Opt Out list. ### Donation Amounts Network for Good requires the following validations for submitted donation amounts: + Minimum Donation Amount: Network for Good requires a minimum donation amount of $10 for each donation line item. Partners must enforce this rule and validate user input within their sites to avoid rejected transactions. + Aggregate by EIN (Disbursement “Batch” Only): In select cases for partner using our Batch/Disbursement services, we will allow individual donations less than $10 as long as the total aggregate amount to each unique EIN is at least $10. Please work with your Account Manager to have this setup. + Two Decimal Place Limit: Network for Good requires that all donation amounts include no more than two places after the decimal point. Partners must round to the nearest whole penny before submitting donation amounts via the API. (Example: Correct value = $10.50; Incorrect value = $10.495) ### Billing Information Network for Good requires the following validations to submit billing details: + Credit Card Type: Network for Good accepts American Express, MasterCard, and Visa. + Credit Card Number: Network for Good recommends validating the length of the credit card number. Industry validations for starting digits and checksum are also recommended to verify the actual card number value. + Credit Card Expiration: Credit card expiration dates must be a valid future month. + Credit Card Security Code: Network for Good recommends validating that the number of digits entered for the security code conform to the type of card. Visa and MasterCard security codes are three digits. America Express security codes can be three or four digits. + Billing Address – State: States must be submitted using the standard two-character abbreviation from ANSI standard. For the full list of accepted codes see: https://www.census.gov/programs-surveys/geography.html. + Billing Address – Country: Countries must be submitted using the ISO 3166-1-alpha-2 format. For the full list of accepted codes see: http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm. ## Powered by NFG Logo Network for Good requires display of the powered by Network for Good logo on all partner pages that interact with the API. Logo provided during implementation or upon request. ## Error Messages Appropriate error messages should be displayed to your site users while submitting their transaction. Error messages are recommended for the following conditions: + Missing required fields + Minimum donation amount not met + Failed charge transactions For credit card transactions, error messages related to failed transactions are particularly sensitive due to potential risks of fraud. Error messages for failed transactions should not: + Include any details or error code indicating why the credit card information failed + Encourage user to submit the same transaction again without correcting their mistakes. ( **Example**: *“Donation failed. Please submit again.”*) **We recommend use of the following standard error message for failed transactions:** *We are sorry! We are unable to process your credit card transaction. Your donation may have failed if your billing information, such as your credit card number, address, expiration date or card security code, did not match exactly what is on file at your bank. If your credit card information was entered correctly and you are still unable to process your transaction, we recommend that you contact your bank or our partner payment processor www.Networkforgood.com/support.* ## Online Confirmation Message Network for Good provides donor support for all transactions. To direct donors appropriately, we recommend use of the following confirmation language after a successful transaction: *Thank you for your donation! You will receive an email donation receipt from our donation processing partner Network for Good. If you have questions about your donation, please visit www.Networkforgood.com/support.* ## Donation Receipt Network for Good issues an email donation receipt automatically upon successful completion of each transaction. The email template includes areas in which partners can provide custom content. We recommended using these areas to include orientation or promotional language about your specific site for the donor. Prior to launch, you will be required to provide text for the following custom areas of the donation receipt: + Partner Name + Partner Message + Partner Support Email Address + Partner URL (typically to a privacy and/or security page) ## FAQ Content Network for Good will provide a list of recommended Frequently Asked Questions (FAQs) that cover many common questions about Network for Good and our services. These FAQs, or similar language, should be made accessible to your site users. https://www.networkforgood.com/support ## Timeout Settings While the average API response time is under 3 seconds, Network for Good has increased its timeout setting to **120 seconds** (2 minutes). It’s our recommendation that you also increase your server timeout settings related to NFG API calls to 120 seconds to ensure we stay in sync. Otherwise, we run the risk of a donation being successfully processed by NFG but appearing as failed to a donor. # Testing Guidelines Network for Good asks partners to test new integrations and updates to existing web application functionality prior to release. Network for Good provides a Sandbox environment which mirrors the services provided in Production. ## Environment All tests should be performed against Network for Good’s Sandbox environment. Testing against the Network for Good Production environment will jeopardize data integrity. The testing feature to this documentation masks the NFG sandbox environment as a "Production" environment. Use the sandbox facsimile environment as reference point by creating common requests and analyzing the response. Additionally, assuming that server IP addresses have been white-listed by NFG, code samples can be substituted for your NFG provided partner credentials. ## Sandbox Parameter Constraints Many initial tests fail due to improper parameter values submitted within the API calls. The Sandbox environment has been configured to support both positive and negative testing for common failure reasons. This section describes the testing conditions supported by the Sandbox environment. ### Donation Amount + A minimum donation amount of $10 is required (unless otherwise noted). + A maximum donation amount of $1,000 is required. ### Credit Card Testing #### Credit Card Numbers A pre-specified test credit card number must be used to successfully process a credit card transaction in the Sandbox environment. Real credit card numbers will not be processed. The following table provides a list of test credit card numbers which can be used for testing | Credit Card Type | Credit Card Number | | --- | --- | | American Express | 371449635398431 | | American Express | 378282246310005 | | Mastercard | 5105105105105100 | | Mastercard | 5555555555554444 | | Visa | 4012888888881881 | | Visa | 4111111111111111 | #### Credit Card Security Code The credit card security code is a field which commonly causes failed transactions. The Sandbox environment allows you to simulate both successful and failed transactions based on security code values. + Security codes in the 001 -300 and 601+ ranges will result in a successful transaction on the Sandbox environment. + Any security codes outside of these ranges will result in a failed transaction. Testing against these values is recommended to validate negative cases and appropriate error message handling. #### Credit Card Billing Address The credit card billing address is also used to validate charge transactions. The Sandbox environment allows you to simulate both successful and failed transactions based on different address values. + Address street line 1: street numbers (first three characters) between the range of 000 and 333 will result in a successful transaction on the Sandbox environment. + Address postal code: values between the range of 00000 and 50000 will result in a successful transaction on the Sandbox environment. + Address state: codes must be a valid abbreviation. + Country codes are accepted in ISO 3166-1-alpha-2 format. + Values outside of the specified ranges will result in a failed transaction. Testing against these values is recommended to validate negative cases and appropriate error message handling. ### PayPal Testing #### PayPal Donor Accounts You will need to establish test donor credentials in the PayPal sandbox environment to simulate the PayPal checkout flow as a donor. To create new credentials, go to https://developer.paypal.com/docs/api/overview/#create-sandbox-accounts. #### Credit Card Numbers (PayPal Checkout Flow Only) Network for Good’s PayPal Donation Processing service includes an option for donors to pay via credit card within the PayPal checkout flow. To test this flow, you will need to use one of the following test card numbers: | Credit Card Type | Credit Card Number | | --- | --- | | American Express | 348151994726125 | | American Express | 344129999527825 | | Mastercard | 5566216604039971 | | Mastercard | 5415836753857858 | | Visa | 4176715215410690 | | Visa | 4823061073914540 | ## Performance Testing Performance testing should not be conducted against the Network for Good Sandbox environment without at least 2 days advanced notice. If approved, performance testing will need to be restricted to non-business hours to avoid impacts to other Sandbox users. *NOTE - The Sandbox environment is intended to support basic validation of external integrations with Network for Good services. The Sandbox environment hardware and network infrastructure are not representative of the Production environment and as such, performance results should be interpreted accordingly.* ## Going Live In order to go live in Production, you will need to... + have a signed agreement in place + have connected to Sandbox and sucessfully tested + complete a site review with NFG team + connect to Production and make a live donation and refund ### Site Review Before we can migrate you to production, Network for Good will need to perform a Site Review. This can be done either as a live demo or a self-guided review of your development site by a member of our Partner team. Site review includes but is not limited to: + Successful Donation - modified fee schema (if applicable), donor covered fees and tips (if applicable) + On-screen Data Validations + Powered by Network for Good logo on any pages that interact with the NFG API (If applicable) + Error Messages + Online Confirmation Message + Donation Receipt Configurations ### Production Testing We recommend that you make a handful of live donations before making your site widely available to donors. # Requests ## Samples Make the following requests in the console provided on this site: + Donor token: Used extensively in donations, card on file, recurring donations, and donor donation history requests. It is advisable to generate a replacement token for each request. This will help encourage donor data integrity. You can use https://www.uuidgenerator.net/ to get a unique ID (UUID) + Donations: When testing card on file donations, first create a card on file with your donor token and use that in the request. + Cards on file + Create: When associating a new card with a recurring donation, use a recurring donation created with your donor token and retrieve its ID with the GET action on the recurring donation resource. + Update: Use a card created with your donor token. + Delete: Only delete cards on file that you have created. + Recurring donations + Update: When associating the recurring donation with a card, use a card created with your donor token + Cancel: Use a recurring donation created with your donor token + Donation history: Use your donor token to only get donations you have made during your testing session *Note: When there are multiple samples for the same resource, the embedded execution automatically populates the parameters for the first one. If you want to test any of the others, you would need to copy/paste the parameters for it into the embedded form.* ## Common Parameters The following elements are present as request parameters of all resource actions. *NOTE: source + campaign uniquely define a partner context in the web service application and underlying database. This is the finest granularity on which reports can be generated by NFG for the partner. The values provided to the partner will generally be the same for both Sandbox and Production environments.* + source (string) - Value provided by NFG to the partner. This is typically some derivation of licensee/partner company name. + campaign (string) - Value provided by NFG to the partner. This is based on a standard naming convention particular to each NFG solution. The following elements are present in multiple resource actions. They are described in detail here and only briefly in individual resources and actions. + donor token (string) - Value with maximum length of 64 characters. This value uniquely identifies a user on the partner’s web site. And forms part of the *payment.donor* object in API call to make donation, and donor object in API call to create COF. It is also used as *donorToken* to card on file, recurring donation, and donation history operations. + The same value should be submitted with respect to a particular user whenever a method call is made with respect to that user. This should continue not only during the duration of the user’s current web session but also in any future interaction. + The same value should never be used with respect to a different user. The same value should be used for the same user even if that user changes some of their identifying information. For instance, upon the user changing their name, address, email, etc., the same token should continue to be used with respect to that user. + The partner **must** authenticate any user with respect to which it submits a *donorToken* during the user’s current web session on the partner’s web site. + The choice of token is up to the partner. The simplest choice would be using the primary key to the user’s record in the partner’s database, converted to a string. If the partner does not wish to expose key values, simply associate a different, unique value (GUID is recommended) with the user’s record in the partner’s database. + This value is always required where the transaction relates to a card on file or a Recurring Donation. Where the transaction involves a one-time donation to one or more charities, it is optional. However, the token must be submitted with respect to any transaction that should be included in a retrieval of the donor’s donation history. # Responses ## Samples Response samples are only representative of the actual response structure, testing with the provided request samples won't necessarily return a response with the same values. Some resource action samples contain multiple response samples for the same HTTP status code. + When only one sample is included, it refers to the most common successful scenario + When there is more than one sample, the first line above the JSON response describes the scenario it represents. That first line won't be included in the actual response. ## Common Elements The following elements are returned in the response of all resource actions. + status (string) - Represents the overall result of the transaction. Possible values: + Success – The operation completed successfully + AccessDenied – The operation is rejected for invalid partner credentials, invalid source IP, or other reason. Partner should check with NFG if this occurs. + ValidationFailed – Some aspect of the data provided was invalid, preventing NFG from attempting to process + ChargeFailed – Charge was attempted but failed. This will typically be due to issues with the credit card account or the data submitted by the user (typo in card number, invalid expiration, CSC, zip code, etc.) + TPCFeeMinimumCapCheckFailed – The calculated transaction processing fee is below the minimum fee, which was agreed upon between Network For Good and the Partner + ProcessorError – Error occurred while NFG accessed one of our supporting online providers (GuideStar, payment gateway, etc.). This error should be rare. Partner should contact NFG if this occurs. + SystemError – Error occurred while NFG processed the transaction. This error should be rare. Partner should contact NFG if this occurs. + OtherError – Undefined error has occurred. Check the Message return value for further explanation. + message (string) - Describes the error message, empty if status is "Success" + errorDetails (array) - List of detailed error details. Each ErrorDetail object contains two string elements: a string representing an error code and a string containing detailed error information. Possible values for error code are: + COFAlreadyDeleted – Attempt made to delete a Card on File that has already been deleted + COFInUse – Attempt made to delete a Card on File that is bound to an active recurring donation (Not Applicable) + COFNotFound – Specified Card on File could not be found + InvalidAddressField – An empty value or value exceeding maximum size of 100 characters was submitted for address field + InvalidCardOnFile – Specified Card on File could not be found or has been cancelled + InvalidCountryCode – Specified country code passed is not a valid ISO 2-char, 3-char or 3-digit value + InvalidCreditCardNumber – Credit Card Number failed validation + InvalidCreditCardType – Invalid card type specified or card type not supported for Partner + InvalidDonationAmount – Amount passed is greater or lower than permitted value or is an unauthorized fraction of a dollar. May also indicate that the specified total amount does not match the sum of individual donations plus add-on fees. + InvalidDonationType – A recurring donation has been specified in a call to a method that does not support recurring donations (Not Applicable) + InvalidDonorIpAddress – Specified donor IP address is in invalid format + InvalidDonorToken – An empty value or DonorToken exceeding maximum size was submitted where a DonorToken is required + InvalidEmailAddress – Specified email address is in invalid format + InvalidExpiration – Specified expiration month/year is invalid or has passed + InvalidName – An empty value or value exceeding maximum size of 50 characters was submitted for First or Last Name + InvalidPhoneNo – Phone value is longer than maximum size of 25 characters + NoChangeRequested – The method call requests an action that merely confirms the current state (Not Applicable) + NPONotEligible – The recipient organization is not eligible for receiving donation through NFG. + NPONotFound – NPO could not be found using the Organization ID specified in the API call. + OtherError – Undefined error + RecurringDonationInvalid – Specified Recurring Donation is not associated with specified DonorToken user (Not Applicable) + RecurringDonationNotFound – Specified Recurring Donation could not be found (Not Applicable) + RecurringDonationNotLive – An attempt is being made to perform an inappropriate action with respect to an inactive Recurring Donation (Not Applicable) + UserNotFound – No existing NFG user record associated with the specified DonorToken + callDuration (number) - Number of seconds elapsed while processing the API call. # Common Data Structures ## Address (object) + street1 (string, required) - Address street line 1 + street2 (string, optional) - Address street line 2 + city (string, required) - Address city + state (string, optional) - Address state. Required if country is USA. States must be submitted using the standard two-character abbreviation from ANSI standard INCITS 38:2009. See https://www.census.gov/programs-surveys/geography.html for the full list of accepted codes. + postalCode (string, required) - Address postal code + country (string, required) - Countries must be submitted using the ISO 3166-1-alpha-2 format. See http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm for officially assigned codes, which are only the codes that are accepted. ## CardOnFile (object) + id (number, required) - Identifier for card on file + type (string, required) - Type of card on file (possible values are Visa, Mastercard, Amex) + suffix (number, required) - Last numbers of the card + expiration (object, required) - Credit card expiration information + month (string, required) - Credit card expiration month + year (string, required) - Credit card expiration year + usedInLiveRecurringDonations (boolean, required) - True if card is currently in use by live recurring donations, false otherwise + email (string, required) - Email associated with card ## Charge (object) + id (number) - Charge ID + historyId (number) int Charge history ID + status (string) - Status of the charge + amount (string) - Amount charged + date (string) - ISO 8601 UTC timestamp (YYYY-MM-DDThh:mm:ssZ) when charge was processed ## CreditCard (object) + nameOnCard (string, required) - Name on card + type (string, required) - Credit card type. Possible values are Visa, Mastercard, Amex + number (string, required) - Credit card number + expiration (object, required) - Credit card expiration information + month (string, required) - Credit card expiration month + year (string, required) - Credit card expiration year + securityCode (string, required) - Credit card security code ## CreditCardBasic (object) + expiration (object, required) - Credit card expiration information + month (string, required) - Credit card expiration month + year (string, required) - Credit card expiration year ## DonationAttribute (object) + name (string, required) - Name of custom attribute + value (string, required)- Value of custom attribute + type (string, required) - Data type of custom attribute (possible values are Boolean, Date, DateTime, Decimal, FloatingPoint, Integer, Money, String, Time) ## DonationAttributeFilter (object) + name (string, required) - Name of custom attribute to filter by + value (string, required) - Value of custom attribute to filter by ## DonationBasic (object) + chargeId (number, required) - Identifier for the donation charge + date (string, required) - Date of the donation + recurrence (string, required) - Recurrence of donation (possible values are NotRecurring, Monthly, Quarterly and Annually) + feeAddOrDeduct (string, required) - Whether the processing fee was added or deducted from the amount (possible values are Add and Deduct) + amount (number, required) - Amount of the donation + designation (string, optional) - Program/project that the recurring donation is designated towards + dedication (string, optional) - Whom/what the recurring donation is dedicated to + organization (object, required) - Information about organization receiving the donation + name (string, required) - Name of the organization ## DonationDetail (object) + source (string) - Partner source of the donation + NFGAPIARYTEST (string) - NFGAPIARYTEST the donation is associated with + lineItemAmount (number) - Amount of this particular donation line item + totalAmount (number) - Amount of all line items in donation + fee (number) - Transaction fee + designation (string) - Program/project that the donation line item is designated towards + dedication (string) - Who/what the donation line item is dedicated to + donorPrivacy (string) - Privacy setting for sharing donor information with organization (possible values are ProvideAll, ProvideNameAndEmailOnly and Anonymous) + recurrence (string) - Recurrence of the donation line iem (possible values are NotRecurring, Monthly, Quarterly, Annually) + charge (object) - Charge object containing details about the charge + organization (object) - Organization object containing details about the organization that is the donation recipient + donor (object) - DonorDetail object containing details about the donor who made the donation ## DonationDisbursementSummary (object) + total (number) - Total amount for disbursement to recipient organization based on donations matching provided criteria + paid (number) - Total amount paid to recipient organization based on donations matching provided criteria + pending (number) - Total amount pending payment to recipient organization based on donations matching provided criteria ## DonationLineItem (object) + organizationId (string, required) - Identifier of the organization + organizationIdType (string, required) - Type of the organization ID (possible values are EIN and NcesSchoolId). + designation (string, optional) - Program/project that the donation line item is designated towards + dedication (string, optional) - Who/what the donation line item is dedicated to + donorPrivacy (string, optional) - Privacy setting for sharing donor information with organization (possible values are ProvideAll, ProvideNameAndEmailOnly and Anonymous). Default is ProvideAll. + amount (string, required) - Amount of the donation line item + feeAddOrDeduct (string, required) - Whether the processing fee will be added or deducted from the amount (possible values are Add and Deduct) + transactionType (string, required) - Type of transaction for this line item (possible values are Donation, Ticket and StoredValuePurchase) + recurrence (string, optional) - Recurrence of the donation (possible values are NotRecurring, Monthly, Quarterly, Annually). Default is NotRecurring ## DonationSummary (object) + fees (number) - Total amount of processing fees charged for donations matching provided criteria + disbursement (object) - DonationDisbursementSummary object holding disbursement totals for a set of donations ## Donor (object) + ip (string, required) - Donor's IP address + token (string, optional) - Donor's token. Required if payment source is CardOnFile. For CreditCard payment source, it is recommended to provide it to be able to retrieve donation history and required if there is at least one recurring donation or storeCardOnFile is true + firstName (string, optional) - Donor's first name. Required if payment source is CreditCard + lastName (string, optional) - Donor's last name. Required if payment source is CreditCard + email (string, optional) - Donor's email address. Required if payment source is CreditCard + phone (string, optional) - Donor's phone number. Only applicable if payment source is CreditCard + billingAddress (Address, optional) - Donor's billing address information. Required if payment source is CreditCard ## DonorBasic (object) + token (string, required) - token associated with donor ## DonorDetail (object) + firstName (string) - Donor's first name + lastName (string, optional) - Donor's last name + email (string) - Donor's email address + phone (string) - Donor's phone number + billingAddress (Address) - Donor's billing address information. ## Organization (object) + id (string) - Identifier of the organization + idType (string) - Type of the organization ID. Possible values are Ein and NcesSchoolId. + name (string) - Name of the organization ## Payment (object) + source (string, required) - Source of payment (possible values are CreditCard and CardOnFile) + cardOnFileId (number, optional) - Identifier of the card stored on file. Required if payment source is CardOnFile + storeCardOnFile (boolean, optional) - If true, it forces the credit card information to be stored on file regardless of donation line items properties when the payment source is CreditCard. Default is to only store it if there is at least one recurring donation line item. This should not be provided if payment source is CardOnFile. + donor (Donor, required) - Object containing information about the donor. + creditCard (CreditCard, optional) - Object containing donor's credit card information. Required if payment source is CreditCard + payPal (PayPal, optional) - Object containing PayPal payment information. Required for PayPal donations ## RecurringDonation (object) + id (number, required) - Identifier for recurring donation + status (string, required) - Status of recurring donation (possible values are Unk, Live, Cancelled and Failed) + cardOnFileId (number, required) - ID of the card on file associated with the recurring donation + type (string, required) - Type of recurring donation (possible values are Monthly, Quarterly and Annually) + startDate (string, required) - Date when recurring donation was initially set up + lastChargeDate (string, required) - Date when the last successful charge was processed for this recurring donation + nextChargeDate (string, required) - Date when the next charge is scheduled to be processed for this recurring donation + organization (object, required) - Information about organization receiving the donation + id (string, required) - Identifier of the organization + idType (string, required) - Type of the organization ID (possible values are Ein and NcesSchoolId) + name (string, required) - Name of the organization + address (object, required) - Address of the organization + street1 (string, required) - Organization street address line 1 + street2 (string, optional) - Organization street address line 2 + city (string, required) - Organization city address + state (string, required) - Organization state address + postalCode (string, required) - Organization postal code address + dedication (string, optional) - Whom/what the recurring donation is dedicated to + designation (string, optional) - Program/project that the recurring donation is designated towards + amount (number, required) - Amount of the recurring donation + fee (number, required) - Fee charged for the recurring donation ## ReportParameter (object). Name and value pairs for each report parameter + name (string, required) - Name of the parameter. Must match value on supported parameter list. + value (string, required) - Value of the parameter. ## ReportRequestData (object) : Exactly 1 element(Overall report request) + reportParameters (array, required) - Array of object ReportParameter. 1 or more elements. Each item in this array represents a single report parameter ## ReportRequestResponse (object) + ReportRequestId (number, required) - Requested report id. Returned by NFG for each report request + ReportRequestDate (string, required) - Date of the report request. Format: UTC Timestamp "YYYY-MM-DDTHH:MM:SSZ".(Date/timestamp for the report request) + ReportStatus (number, required) - Indicates report status value. Status of the original report request | Id | Possible Values | Description | |------|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 0 | Unk | Undefined error. Contact NFG for assistance | | 1 | Success | Report request completed successfully | | 2 | NoMatchingResults | Report request processed and no results matched the specified criteria | | 3 | RequestPending | Report request is in progress. Large volume requests may take several minutes to complete | | 4 | AccessDenied | Specified parameters for ParnterID, PartnerPW, and PartnerSource do not have access to the service | | 5 | InvalidRequest | Specified ReportRequestId is not valid | | 6 | ExpiredRequest | Report associated to the specified ReportRequestId is no longer valid. Report requests are valid for a period of 2 weeks | | 7 | MaxResultsExceeded | Corresponding result set has exceeded the maximum number of records allowed. Partner should collect data via the Partner Portal or contact NFG | | 8 | InvalidParameter | Specified parameter name is not applicable for the specified report type | | 9 | InvalidParameterValue |Specified parameter value is not application for the corresponding parameter type | ## ReportResult (object) + DonationDetail (object, required) - Details of donation. Maximum 1 per donation + PartnerSource (string, required) - Provided by NFG to the partner. The value will generally be the same for both the Sandbox and Production environments + PartnerCampaign (string, optional) - Provided by NFG to the partner. PartnerSource + PartnerCampaign uniquely define a partner context in the web service application and underlying database. + DonationDate (string, required) - Date of donation. Format UTC Timestamp "YYYY-MM-DDTHH:MM:SSZ" + PartnerTransactionId (string, optional) - 64-char max. This is an optional value, defined by the partner, to facilitate association of a transaction between the partner’s and NFG’s databases. This value can be helpful in troubleshooting any discrepancies that might arise between NFG’s record of a transaction and the partner’s + TotalDonationAmount (number, required) - Total donation amount + DonorDetail (object, required) - Details of donor. Maximum 1 per donation + DonorToken (string, required) - 64-char max. This value is defined by the partner and uniquely identifies a donor on the partner’s web site. The value is required for transactions using NFG Card on File or Recurring Donation functionality and is optional for one-time donations + DonorEmail (string, required) - Donor's email associated with donation + DonorFirstName (string, required) - Donor's first name + DonorLastName (string, required) - Donor's last name + DonorAddress1 (string, required) - Donor's address line 1 + DonorAddress2 (string, optional) - Donor's address line 2 + DonorCity (string, required) - Donor's city + DonorState (string, optional) - Donor's state + DonorZip (string, required) - Donor's zip + DonorCountry (string, required) - Donor's country + DonorPhone (string, required) - Donor's phone + BatchDetails (object, optional) - Details of batch associated with the donation. Maximum 1 per donation + BatchIdentifier (string, required) - Identifier for the batch + BatchComment (string, optional) - Comment associated with the batch + ChargeDetails (object, required) - Charge details associated with the donation. Maximum 1 per donation + ChargeId (number, required) - Charge id associated with donation. Unique transaction identifier specified by NFG + ChargeStatus (string, required) - Donation charge status.Possible Value List: All, Successful, Refunded, Pending + ChargeStatusDate (string, required) - Latest date on which status changed. Format : UTC Timestamp "YYYY-MM-DDTHH:MM:SSZ" + OriginalChargeAmount (number, required) - Original charge amount + CurrentChargeAmount (number, required) - Current charge amount + DonorPaymentType (string, required) - Donor payment type. Possible Values are ACH, CreditCard, PayPal, GiftCard, CapOneRewards, Check, Invoiced, C1CharityAffinityBonusBatch, C1CharityAffinityRewardsBatch, BatchPaidByInvoice, StoredValue, Unspecified. + StoredValueDetails (object, optional) - Stored value details associated with the donation. Maximum 1 per donation + PartnerSVAccountId (string, optional) - Partner's SV account id + PartnerBulkAccountId (string, optional) - Partner's bulk account id + DonationItems (Array, required) - List of donation items associated with the donation. Maximum 1 per donation + DonationItem (object, required) - Donation item. 1 or more per donation + NpoEIN (string, optional) - Ein of NPO associated with the donation + NpoName (string, required) - Name of NPO associated with the donation + DonorVisibility (string, required) - Visibility option set by donor while donation. Possible values are Anonymous, ProvideAll, ProvideNameAndEmailOnly. + DonationItemAmount (number, required) - Item amount set for donation item + NpoTPC (number, required) - Npo TPC amount associated with donation item + NfgTPC (number, required) - NFG TPC amount associated with donation item + RecurringPeriod (string, required) - Recurring period set for donation item.Possible Value List: NotRecurring, Monthly, Quarterly, Annually + DonationItemCustomData (Array, optional) - List of name value pairs for custom data associated with donation item + DonationItemCustomData (object, optional) - donation custom item + Name (string, required) - Name of donation custom item + Value (string, required) - Value of donation custom item + DisbursementDetails (object, optional) - Disbursement details of donation item. 1 per donation + PaymentID (number, required) - Payment id of disbursement + PaymentDate (string, required) - Date of payment. Format UTC Timestamp "YYYY-MM-DDTHH:MM:SSZ" + PaymentType (string, required) - Type of payment. Possible values are PT_BAFFCHK, PT_BAFFEXPCHK, PT_BAFFPRENT, PT_BAFFACH, PT_RESENDCHK, PT_REDIRECTFUND, PT_REVIVEDCHK + PaymentStatus (string, required) - Payment status. Possible values are Cashed, Stop Payment, Returned Awaiting Research, Returned Do Not Reissue, Returned Org Not Found, Lost Check, ACH FAILURE, REJECT, Redirect Cancelled + CheckCashedDate (string, optional) - Date of check cashed for payment + MatchingDonationDetails (object, optional) - Matching donation details + MatchType (string, optional) - Type of match + MatchFor (string, optional) - Name of donation field which used to match for donation. For e.g. transaction id of the matching donation + OriginalDonationDate (string, optional) - Date of original donation + OriginalDonationAmount (number, optional) - Amount of original donation + OriginalDonationReference (string, optional) - Reference parameter of original donation + OriginalDonationPartnerTransactionID (string, optional) - Partner transaction id of original donation + Notes (string, optional) - Notes associated with matching donation + DonationCustomData (object, optional) - Donation Custom Data + name (string, required) - Name of donation custom item + value (string, required) - Value of donation custom item # Group Access Resources to manage access credentials to the API ## Access token operations [/access/rest/token] Provides various token operations ### Create new access token [POST] This endpoint is used to create access tokens for partners. An access token has a validity of **five (5) years** from when it is issued. A new access token will need to be created when the current token expires. + Attributes + userid (string, required) - User ID provided to partner + password (string, required) - Password provided to partner for accessing API endpoints + scope (string, required) - Scope for which token is request. For now there are only two scopes "donation" and "donation-reporting" + Request + Headers Content-Type: application/json + Body { "source": "NFGAPIARYTEST", "userid": "NFGAPIARYTESTUSER", "password": "F5t2GYu#", "scope": "donation donation-reporting" } + Response 200 (application/json) + Attributes (object) + token (string) - contains access token + Body { "errorDetails": null, "status": "Success", "message": "Success", "callDuration": 0.1730099, "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6Ijg0YzM1NjY2MzZlNGQ4MTFiNmRiM2ZmNDQwMmUyMzYwIiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzY5Nzk1LCJuYmYiOjE0Mzc1ODE3OTV9.HNdedPKai8puqUHk3ji1aKAocbz_PW81GJPZl8fQ_Es-sJ8hw8CApulEAFOSqZwOzfjmsmXB4BF-XokL8RseeyytJqRM7rPHfVdqEtRti4M4dFPo-0YGDvTTqFYi0FKG1RFTtsnS3p-jHUB-56GAPogOgE7KWkzaDKDATQggBHM24LCOQaFgEZnbI_-sq-Ybaw5R4UGIf8t1KC4VkxVczIz9dIQrl0KNJRuFmPoOi7xumrNTNJX_I0qeINfEMZrssm_1zXiu3lOZeKHsuosLkG6_g2eWBebIj6ZyvM6G89Jmn1925shz82v-74qmEs8SI23S5Ix5Y20SsJxXSC8NSA" } # Group Donation Resources to manage donations ## Credit Card Donations [/service/rest/donation] Management of credit card and card on file donations ### Make a credit card or card on file donation [POST] This endpoint is used to make a donation to an organization using a credit card or a card on file. + Attributes + donationLineItems (array, required) - Array of DonationLineItem objects listing the individual items included in the donation + donationAttributes (array, optional) - Array of DonationAttribute objects listing custom attributes to be associated with donation + donationLineItemAttributes (array, optional) - Array of DonationAttribute objects listing custom attributes to be associated with each donation line item + totalAmount (number, required) - Total amount of the donation + tipAmount (number, optional) - Amount added to the donation to support NFG + partnerTransactionId (string, optional) - Identifier of the transaction from partner + payment (object, required) - Payment object listing detailed payment elements + device (object, optional) - Device object listing elements needed to enable partners to use Braintree’s device data collector for fraud prevention + Request Credit Card Donation + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { "source": "NFGAPIARYTEST", "campaign": "API", "donationLineItems": [{ "organizationId": "590624430", "organizationIdType": "Ein", "designation": "Project A", "dedication": "In honor of grandma", "donorPrivacy": "ProvideAll", "amount": "12.00", "feeAddOrDeduct": "Deduct", "transactionType": "Donation", "recurrence": "NotRecurring" }, { "organizationId": "510126000486", "organizationIdType": "NcesSchoolId", "designation": "Gym", "donorPrivacy": "ProvideNameAndEmailOnly", "amount": "47.00", "feeAddOrDeduct": "Add", "transactionType": "Donation" }], "totalAmount": 60.41, "tipAmount": 0, "partnerTransactionId": "1bf1c16c-fdb7-4579-abab-738dbbe852ed", "payment": { "source": "CreditCard", "donor": { "ip": "216.7.145.0", "token": "802f365c-ed3d-4c80-8700-374aee6ac62c", "firstName": "Francis", "lastName": "Carter", "email": "FrancisGCarter@teleworm.us", "phone": "954-922-6971", "billingAddress": { "street1": "3731 Pointe Lane", "city": "Hollywood", "state": "FL", "postalCode": "33020", "country": "US" } }, "creditCard": { "nameOnCard": "Francis G. Carter", "type": "Visa", "number": "4111111111111111", "expiration": { "month": 11, "year": 2019 }, "securityCode": "123" } }, "device": { "token": "nfgtokenizationkeygoeshere", "data": "clientdevicedatagoeshere" } } + Request Card On File Donation + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { "source": "NFGAPIARYTEST", "campaign": "API", "donationLineItems": [{ "organizationId": "541037615", "organizationIdType": "Ein", "designation": "Emergency Shelter", "dedication": "In honor of someone", "donorPrivacy": "ProvideAll", "amount": "12.00", "feeAddOrDeduct": "Deduct", "transactionType": "Donation", "recurrence": "Quarterly" }, { "organizationId": "510126000088", "organizationIdType": "NcesSchoolId", "designation": "Art supplies", "donorPrivacy": "ProvideNameAndEmailOnly", "amount": "47.00", "feeAddOrDeduct": "Add", "transactionType": "Donation", "recurrence": "Monthly" }], "totalAmount": 60.41, "tipAmount": 0, "partnerTransactionId": "a2ebf708-4056-41bb-8a09-23a88d441ac0", "payment": { "source": "CardOnFile", "cardOnFileId": 1096597, "donor": { "ip": "50.121.129.54", "token": "802f365c-ed3d-4c80-8700-374aee6ac62c" } }, "device": { "token": "nfgtokenizationkeygoeshere", "data": "clientdevicedatagoeshere" } } + Response 200 + Attributes (object) + chargeId (number) - Unique identifier of the charge associated with this donation, when succesful. Otherwise it will be set to zero + cardOnFileId (number) - If a new card on file was added with the donation, this is its corresponding ID. Otherwise this will have a value of zero + Body { "status": "Success", "message": "", "errorDetails": [], "callDuration": 7.7473, "chargeId": 3584971, "cardOnFileId": 0 } + Response 200 { "status": "ValidationFailed", "message": "", "errorDetails": [{ "code": "InvalidCreditCardNumber", "data": "Credit card checksum validation failed" }], "callDuration": 0.05423, "chargeId": 0, "cardOnFileId": 0 } ### Retrieve donations [GET /service/rest/donation{?source,campaign,include,since,until,recurrence,attributes}] This endpoint is used to retrieve donation information (individual donation details and/or disbursement summary) for a partner campaign + Parameters + source: NFGAPIARYTEST (string, required) - Source of the donation + campaign: API (string, required) - Campaign the donation is associated with + include: donationDetails,disbursementSummary (string, optional) - Comma-delimited list of data sets to include. Possible values are donationDetails and disbursementSummary. If not provided, it defaults to donationDetails + since: `2015-05-01T00:00:00Z` (string, required) - Timestamp in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ), donations since this timestamp will be returned to the client + until: `2015-05-01T23:59:59Z` (string, required) - Timestamp in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ), donations until this timestamp will be returned to the client + recurrence: All (string, optional) - Criteria to filter by recurrence properties of donations. Possible values are OneTime, Recurring and All. If not provided, it defaults to All + attributes: `[{"name": "type","value": "special"}]` (array, optional) - Array of DonationAttributeFilter objects to only include donations having those attributes + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Response 200 + Attributes (object) + summary (object) - Summary of disbursement amounts for criteria provided, represented by a DonationSummary object + donations (array) - List of DonationDetail objects matching the criteria provided + Body { "status": "Success", "message": "", "errorDetails": [], "callDuration": 1.05423, "summary": { "fees": 107.42, "disbursement": { "total": 2058.93, "paid": 100.00, "pending": 1958.93 } }, "donations": [{ "source": "NFGAPIARYTEST", "campaign": "API", "lineItemAmount": 100.00, "totalAmount": 100.00, "fee": 5.00, "designation": "Save the babies", "dedication": "For Jane", "donorPrivacy": "ProvideAll", "recurrence": "NotRecurring", "charge": { "id": 19278, "historyId": 47276, "status": "Success", "amount": 105.00, "date": "2015-01-17T19:23:21Z" }, "organization": { "id": "131846366", "idType": "ein", "name": "March of Dimes Foundation" }, "donor": { "firstName": "Tyrone", "lastName": "Dunn", "email": "TyroneMDunn@rhyta.com", "phone": "814-381-7254", "billingAddress": { "street1": "2402 Coal Street", "city": "Altoona", "state": "PA", "postalCode": "16601", "country": "US" } } }, { "source": "NFGAPIARYTEST", "campaign": "API", "lineItemAmount": 1958.93, "totalAmount": 1958.93, "fee": 102.42, "designation": "Save the Cranes", "dedication": "For John", "donorPrivacy": "ProvideNameAndEmailOnly", "recurrence": "Annually", "charge": { "id": 18442, "historyId": 99172, "status": "Success", "amount": 2061.35, "date": "2015-01-18T08:14:12Z" }, "organization": { "id": "131624102", "idType": "ein", "name": "National Audubon Society, Inc." }, "donor": { "firstName": "Mary", "lastName": "Begay", "email": "MaryCBegay@armyspy.com", "phone": "860-940-7710", "billingAddress": { "street1": "313 Red Bud Lane", "city": "New Haven", "state": "CT", "postalCode": "06511", "country": "US" } } }] } ### Get transaction processing fee [GET /service/rest/donation/fee{?source,campaign,donationLineItems,tipAmount,creditCardType}] This endpoint is used to calculate the transaction processing fee that a particular donation will incur based on the provided donation line item details + Parameters + source: NFGAPIARYTEST (string, required) - Source of the donation + campaign: API (string, required) - Campaign the donation is associated with + donationLineItems: `[{"organizationId": "220004900414","organizationIdType": "NcesSchoolId","donorPrivacy": "ProvideAll","amount": 150.00,"feeAddOrDeduct": "Add","transactionType": "Donation"}]` (array, required) - Array of DonationLineItem object listing the individual donation items included to consider when calculating fee + tipAmount: 1.00 (number, optional) - Amount added to the donation to support NFG + creditCardType: Amex (string, required) - Type of credit card the donation would be paid with, possible values are : Visa, Mastercard, Amex + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Response 200 + Attributes (object) + totalChargeAmount (number) - The full amount that would be charged to the credit card based on the donation information provided + totalAddFee (number) - Total amount of donor-covered processing fees + totalDeductFee (number) - Total amount of processing fees not covered by donor that will be deducted before disbursing to recipient organization + tipAmount (number) - Amount on top of processing fees that donor provides to support NFG + Body { "totalChargeAmount": 158.50, "totalAddFee": 7.50, "totalDeductFee": 0.00, "tipAmount": 1.00, "message": "", "errorDetails": [], "callDuration": 0.45423 } + Response 200 { "totalChargeAmount":0.00, "totalAddFee":0.00, "totalDeductFee":0.00, "tipAmount":0.00, "message":"", "errorDetails":[ { "code":"NpoNotEligible", "data":"The School with NCES ID = \"648932882481\" is not eligible to receive donations" } ], "callDuration":0.025423 } ## PayPal Donations [/service/rest/donation/paypal] Management of PayPal donations ### Create and initialize PayPal donation [POST] This endpoint is used to create a donation that uses PayPal as its payment processing and initializing it, so that the payment flow can be done on the UI offered by the partner. + Attributes + donationLineItems(array, required) - Array of DonationLineItem objects listing the individual items included in the donation + donationAttributes(object, optional) - Array of DonationAttribute objects listing custom attributes to be associated with donation + donationLineItemAttributes(object, optional) - Array of DonationAttribute objects listing custom attributes to be associated with each donation line item + partnerTransactionId (string, optional) - Identifier of the transaction from partner + displayName (string, optional) - If provided, label that overrides the business name in the PayPal account on the PayPal hosted checkout pages. + tipAmount (number, optional) - Amount added to the donation to support NFG + payment (object, required) - Payment object listing detailed payment elements + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { "source":"NFGAPIARYTEST", "Campaign":"API", "donationLineItems":[ { "organizationId":"510126002034", "organizationIdType":"NcesSchoolId", "designation":"Cheerleading Team", "dedication":"In honor of Jane Doe", "donorPrivacy":"ProvideNameAndEmailOnly", "amount":25.00, "feeAddOrDeduct":"Deduct", "transactionType":"Donation" }, { "organizationId":"361581002040", "organizationIdType":"NcesSchoolId", "designation":"Music Program", "amount":100.00, "feeAddOrDeduct":"Add", "transactionType":"Donation" } ], "partnerTransactionId":"230cf1c9-4d5d-4e70-be1d-1acbd21b5ebb", "displayName":"Megadonors", "tipAmount":0.00, "payment":{ "donor":{ "ip":"209.131.41.49", "token":"HRwHrj8CrGF9d5JQ" }, "payPal":{ "returnUrl":"https://megadonors.org/paypal-return.jsp", "cancelUrl":"https://megadonors.org/paypal-cancel.jsp" } } } + Response 200 + Attributes + redirectURL (string) - PayPal URL to redirect the user for completing the PayPal checkout + payPalToken (string) - PayPal token associated with this donation attempt + Body { "errorDetails": [], "status": "Success", "message": "", "callDuration": 27.6434004, "redirectUrl": "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&SOLUTIONTYPE=Sole&LANDINGPAGE=Login&token=EC-7PA93424S0380464W&useraction=commit", "payPalToken": "EC-7PA93424S0380464W" } ### Complete a PayPal donation [PUT /service/rest/donation/paypal/{token}] Allows a donation that was created and initialized for PayPal processing to be marked as complete in the Network for Good platform + Parameters + token: `EC-7PA93424S0380464W` (string, required) - PayPal token obtained when donation was created and initialized + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { "source": "NFGAPIARYTEST", "campaign": "API" } + Response 200 + Body { "status": "Success", "message": "", "errorDetails": [], "callDuration": 0.325423, "chargeId": 3584971, "donor": { "firstName": "Francis", "lastName": "Carter", "email": "FrancisGCarter@teleworm.us", "phone": "907-551-6347", "billingAddress": { "street1": "487 Jerry Toth Drive", "city": "Elmendorf", "state": "AK", "postalCode": "99506", "country": "US" } } } ### Get PayPal donation details [GET /service/rest/donation/paypal/{token}{?source,campaign}] This endpoint is used to retrieve donor details for a PayPal donation + Parameters + token: `EC-7PA93424S0380464W` (string, required) - PayPal token obtained when donation was created and initialized + source: NFGAPIARYTEST (string, required) - Source of the donation + campaign: API (string, required) - Campaign the donation is associated with + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Response 200 + Attributes (object) + donor (object) - DonorDetails object with personal information returned by PayPal for the specified PayPal transaction token + Body { "status": "Success", "message": "", "errorDetails": [], "callDuration": 0.325423, "donor": { "firstName": "Francis", "lastName": "Carter", "email": "FrancisGCarter@teleworm.us", "phone": "907-551-6347", "billingAddress": { "street1": "487 Jerry Toth Drive", "city": "Elmendorf", "state": "AK", "postalCode": "99506", "country": "US" } } } # Group Donor Operations related to donor related objects, such as cards on file, recurring donations and donation history ## Card on file operations [/service/rest/cardOnFile] Manage card on file records ### Store a credit card on file [POST] This endpoint is used to store a credit card on file + Attributes + donor (object, required) - Donor object with information about the donor + creditCard (object, required) - CreditCard object with the donor's credit card information + recurringDonationId (number, optional) - ID of a recurring donation where the new card on file would be used, if provided + Request Store card on file + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { "source": "NFGAPIARYTEST", "campaign": "API", "donor": { "token": "802f365c-ed3d-4c80-8700-374aee6ac62c", "firstName": "Tyrone", "lastName": "Dunn", "email": "TyroneMDunn@rhyta.com", "phone": "814-381-7254", "billingAddress": { "street1": "2402 Coal Street", "city": "Altoona", "state": "PA", "postalCode": "16601", "country": "US" } }, "creditCard": { "nameOnCard": "Tyrone M. Dunn", "type": "Visa", "number": "4012888888881881", "expiration": { "month": 2, "year": 2020 }, "securityCode": "123" } } + Request Store card on file and associate with recurring donation + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { "source": "NFGAPIARYTEST", "campaign": "API", "donor": { "token": "802f365c-ed3d-4c80-8700-374aee6ac62c", "firstName": "Tyrone", "lastName": "Dunn", "email": "TyroneMDunn@rhyta.com", "phone": "814-381-7254", "billingAddress": { "street1": "2402 Coal Street", "city": "Altoona", "state": "PA", "postalCode": "16601", "country": "US" } }, "creditCard": { "nameOnCard": "Tyrone M. Dunn", "type": "Visa", "number": "4012888888881881", "expiration": { "month": 2, "year": 2020 }, "securityCode": "123" }, "recurringDonationId":"1029891" } + Response 200 + Attributes + cardOnFileId (string) - Identifier associated with the card stored on file + Body { "status": "Success", "message": "", "errorDetails": [], "callDuration": 1.05423, "donorToken": "802f365c-ed3d-4c80-8700-374aee6ac62c", "cardOnFileId": 13338 } + Response 200 { "status": "ChargeFailed", "message": "", "errorDetails": [], "callDuration": 1.05423, "donorToken": "802f365c-ed3d-4c80-8700-374aee6ac62c", "cardOnFileId": 0 } ### Retrieve a credit card on file [GET /service/rest/cardOnFile{?source,campaign,donorToken}] This endpoint is used to retrieve the information about a credit card stored on file + Parameters + source: NFGAPIARYTEST (string, required) - Source of the donation + campaign: API (string, required) - Campaign the donation is associated with + donorToken: `802f365c-ed3d-4c80-8700-374aee6ac62c` (string,required) - Donor's token associated with card + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Response 200 + Attributes + donorToken (string) - Token provided to associate the donor with card + cardsOnFile (array) - Array of object CardOnFile + Body { "status": "Success", "message": "", "errorDetails": [], "callDuration": 1.05423, "donorToken": "802f365c-ed3d-4c80-8700-374aee6ac62c", "cardsOnFile": [{ "id": 1106, "type": "Amex", "suffix": "1234", "expiration": { "month": 7, "year": 2018 }, "usedInLiveRecurringDonations": false, "email": "RichardGBriones@armyspy.com" }, { "id": 2278, "type": "Visa", "suffix": "9876", "expiration": { "month": 1, "year": 2017 }, "usedInLiveRecurringDonations": false, "email": "RichardGBriones@rhyta.com" }] } ### Delete a credit card on file [DELETE /service/rest/cardOnFile{?source,campaign,donorToken,cardOnFileId}] This endpoint is used to delete a single card stored on file + Parameters + source: NFGAPIARYTEST (string,required) - Partner source of the request + campaign: API (string, required) - Campaign the donation is associated with + donorToken: `802f365c-ed3d-4c80-8700-374aee6ac62c` (string,required) - Donor's token associated with card + cardOnFileId: `1106` (string, required) - Identifier of card to delete + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Response 200 { "status": "Success", "message": "", "errorDetails": [], "callDuration": 0.325423 } + Response 200 { "status": "OtherError", "message": "", "errorDetails": [{ "code": "COFNotFound", "data": "Card on File with CardId == 1106 not found for this user" }], "callDuration": 0.025423 } ## Recurring donation operations [/service/rest/donor/recurringDonation] ### Retrieve all recurring donations for token [GET /service/rest/donor/{token}/recurringdonation/{?source,campaign}] This endpoint is used to retrieve a particular recurring donation for a donor + Parameters + token: `802f365c-ed3d-4c80-8700-374aee6ac62c` (string, required) - Donor's token associated with recurring donation + source: NFGAPIARYTEST (string, required) - Source of the donation + campaign: API (string, optional) - Campaign the donation is associated + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Response 200 + Attributes + donorToken (string) - Token provided to associate the donor with the recurring donations + recurringDonations (array) - Array of RecurringDonation objects + Body { "status": "Success", "message": "", "errorDetails": [], "callDuration": 1.05423, "donorToken": "802f365c-ed3d-4c80-8700-374aee6ac62c", "recurringDonations": [{ "id": 57138, "status": "Live", "cardOnFileId": 395261, "type": "Monthly", "startDate": "2014-04-10T00:32:00Z", "lastChargeDate": "2015-04-15T06:57:00Z", "nextChargeDate": "2015-05-15T06:30:00Z", "organization": { "id": "220004900414", "idType": "NcesSchoolId", "name": "DR. Martin Luther King Charter School For Sci/tech", "address": { "street1": "1617 Caffin Avenue", "city": "New Orleans", "state": "LA", "postalCode": "70117" } }, "dedication": "For Mary", "designation": "Music Program", "amount": 100.00, "fee": 4.50 }, { "id": 609980, "status": "Live", "cardOnFileId": 732810, "type": "Annually", "startDate": "2014-01-07T12:58:00Z", "lastChargeDate": "2015-01-07T06:00:00Z", "nextChargeDate": "2016-01-07T06:00:00Z", "organization": { "id": "131623888", "idType": "Ein", "name": "American Diabetes Association, Inc.", "address": { "street1": "1701 North Beauregard Street", "city": "Alexandria", "state": "VA", "postalCode": "22311" } }, "dedication": "For John", "designation": "Research", "amount": 250.00, "fee": 11.25 }] } ### Retrieve single recurring donation for token [GET /service/rest/donor/{token}/recurringdonation/{id}/{?source,campaign}] This endpoint is used to retrieve a particular recurring donation for a donor + Parameters + token: `802f365c-ed3d-4c80-8700-374aee6ac62c` (string, required) - Donor's token associated with recurring donation + source: NFGAPIARYTEST (string, required) - Source of the donation + campaign: API (string, optional) - Campaign the donation is associated + id: 1038660 (number, required) - Recurring donation ID. + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Response 200 + Attributes + donorToken (string) - Token provided to associate the donor with the recurring donations + recurringDonations (array) - Array of RecurringDonation objects + Body { "status": "Success", "message": "", "errorDetails": [], "callDuration": 1.05423, "donorToken": "802f365c-ed3d-4c80-8700-374aee6ac62c", "recurringDonations": [{ "id": 1038660, "status": "Live", "cardOnFileId": 395261, "type": "Monthly", "startDate": "2014-04-10T00:32:00Z", "lastChargeDate": "2015-04-15T06:57:00Z", "nextChargeDate": "2015-05-15T06:30:00Z", "organization": { "id": "220004900414", "idType": "NcesSchoolId", "name": "DR. Martin Luther King Charter School For Sci/tech", "address": { "street1": "1617 Caffin Avenue", "city": "New Orleans", "state": "LA", "postalCode": "70117" } }, "dedication": "For Mary", "designation": "Music Program", "amount": 100.00, "fee": 4.50 }] } ### Update a recurring donation [PUT /service/rest/donor/{token}/recurringdonation/{id}] This endpoint is used to update properties of a recurring donation. It only allows updating the card on file used for the recurring donation. + Parameters + token: `802f365c-ed3d-4c80-8700-374aee6ac62c` (string, required) - Donor's token associated with recurring donation + id: 1038660 (number, required) - Recurring donation ID + Attributes + cardOnFileId (number, required) - Identifier of the card on file to associate with the recurring donation + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { "source": "NFGAPIARYTEST", "campaign": "API", "cardOnFileId" : "1257509" } + Response 200 + Body { "status": "Success", "message": "", "errorDetails": [], "callDuration": 0.325423 } ### Cancel a recurring donation [DELETE /service/rest/donor/{token}/recurringDonation/{id}{?source,campaign}] This endpoint is used to cancel a single recurring donation + Parameters + source: NFGAPIARYTEST (string,required)) - Partner source of the request + campaign: API (string,optional) - Campaign recurring donation is associated with + token: `802f365c-ed3d-4c80-8700-374aee6ac62c` (string,required) - Donor's token associated with recurring donation + id: 1038661 (number, required) - Recurring donation ID + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Response 200 + Attributes + donorToken (string) - Token provided to associate the donor with the recurring donations + Body { "status": "Success", "message": "", "errorDetails": [], "callDuration": 0.325423, "donorToken": "802f365c-ed3d-4c80-8700-374aee6ac62c" } + Response 200 { "status": "OtherError", "message": "", "errorDetails": [{ "code": "RecurringDonationNotFound", "data": "Recurring donation with ID = 57138 not found for this user" }], "callDuration": 0.025423, "donorToken": "802f365c-ed3d-4c80-8700-374aee6ac62c" } ## Donation history [/service/rest/donor/donation] ### Retrieve donation history for a donor [GET /service/rest/donor/{token}/donation{?source,campaign}] This endpoint is used to retrieve all donations made by a particular donor + Parameters + token: `802f365c-ed3d-4c80-8700-374aee6ac62c` (string, required) - Donor's token associated with recurring donation + source: NFGAPIARYTEST (string, required) - Source of the donation + campaign: API (string, optional) - Campaign the donation is associated with + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { } + Response 200 + Attributes + donorToken (string) - Token provided to associate the donor with the recurring donations + donations (array) - Array of object DonationBasic + Body { "status": "Success", "message": "", "errorDetails": [], "callDuration": 1.05423, "donorToken": "802f365c-ed3d-4c80-8700-374aee6ac62c", "donations": [{ "chargeId": 25133, "date": "2014-04-10T00:32:00Z", "recurrence": "NotRecurring", "feeAddOrDeduct ": "Add", "amount": 100.00, "designation": "Music Program", "dedication": "For Jane", "organization": { "name": "March of Dimes Foundation" } }, { "chargeId": 38943, "date": "2015-01-25T09:32:00Z", "recurrence": "Monthly", "feeAddOrDeduct": "Deduct", "amount": 25.00, "designation": "Girl Power", "dedication": "For Nia", "organization": { "name": "Girls Incorporated" } }] } # Group Organization Resources for organization information ## Organization eligibility [/service/rest/organization/eligibility] This endpoint returns the list of organizations that are not eligible to receive donations ### Check organization eligibility [POST] + Attributes + source NFGAPIARYTEST (string, required) - Source of the donation + campaign API (string, optional) - Campaign the donation is associated with + organizations (array, required) - Array of Organization objects to check eligibility against + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { "source": "NFGAPIARYTEST", "campaign": "API", "organizations": [{ "id": "120144001464", "idType": "NcesSchoolId" }, { "id": "956041245", "idType": "Ein" }] } + Response 200 { "status": "Success", "message": "", "errorDetails": [], "callDuration": 0.6460369, "notEligibleOrgCount": 1, "notEligibleOrganizations": [{ "id": "136038171", "idType": "Ein", "errorDetails": [{ "code": "NpoNotEligible", "data": "The NPO with EIN = '136038171' is not a public charity" }] }], "eligibleOrgCount": 0, "eligibleOrganizations": [] } + Response 200 { "status": "Success", "message": "", "errorDetails": [], "callDuration": 0.6460369, "notEligibleOrgCount": 0, "notEligibleOrganizations": [], "eligibleOrgCount": 1, "eligibleOrganizations": [{ "id": "956041245", "idType": "Ein" }] } + Response 200 { "status": "Success", "message": "", "errorDetails": [], "callDuration": 0.1030059, "notEligibleOrgCount": 1, "notEligibleOrganizations": [{ "id": "136038171", "idType": "Ein", "errorDetails": [{ "code": "NpoNotEligible", "data": "The NPO with EIN = '136038171' is not a public charity" }] }], "eligibleOrgCount": 1, "eligibleOrganizations": [{ "id": "956041245", "idType": "Ein" }] } # Group Report Resources to retrieve donation reports ## Get donation details report [/report/rest/donation/details] This endpoint is used to get the donation details report ### Get donation details report [POST] + Attributes + source (string, required) - Source of the donation + reportRequestData (object, required) - object of type ReportRequestData, contains list of objects of type ReportParameter. Available Parameters. 1) ChargeId (integer) - Unique transaction identifier specified by NFG. 2) PartnerTransactionId (integer) - Unique transaction identifier specified by the partner + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { "source":"NFGAPIARYTEST", "reportRequestData": { "reportParameters": [{ "name": "ChargeId", "value": "1251775161", }] } } + Response 200 + Attributes + donationDetailData (object) - Object of type DonationDetailData + ReportRequestDate (string) - Date of the report request + ReportStatus (number) - Indicates report status value. Possible values are 0 = Unk, 1 = Success, 2 = NoMatchingResults, 3 = RequestPending, 4 = AccessDenied, 5 = InvalidRequest, 6 = ExpiredRequest, 7 = MaxResultsExceeded, 8 = InvalidParameter, 9 = InvalidParameterValue + ReturnCount (number) - Count of report results.(Number of records in the result set) + ReportResults (array) - Array of objects of type ReportResult. Maximum 1 + Body { "errorDetails": [], "status": "Success", "message": "", "callDuration": 5.2032976, "donationDetailData": { "ReportRequestDate": "2015-06-29T11:24:48 -04:00", "ReportStatus": 1, "ReturnCount": 1, "ReportResults": [ { "DonationDetail": { "PartnerSource": "NFGAPIARYTEST", "PartnerNFGAPIARYTEST": "", "DonationDate": "2015-06-05T02:50:10 -04:00", "PartnerTransactionId": "230cf1c9-4d5d-4e70-be1d-1acbd21b5ebb", "TotalDonationAmount": 125 }, "DonorDetail": { "DonorToken": "06b45827-85d1-4abd-a48c-317714e71fc8", "DonorEmail": "FrancisGCarter@teleworm.us", "DonorFirstName": "Francis", "DonorLastName": "Carter", "DonorAddress1": "Jerry Toth Drive", "DonorAddress2": "", "DonorCity": "Elmendorf", "DonorState": "AK", "DonorZip": "90001", "DonorCountry": "US", "DonorPhone": "907-551-6347" }, "BatchDetails": { "BatchIdentifier": null, "BatchComment": null }, "ChargeDetails": { "ChargeId": 1251450304, "ChargeStatus": "Successful", "ChargeStatusDate": "2015-06-05T02:50:13 -04:00", "OriginalChargeAmount": 125, "CurrentChargeAmount": 125, "DonorPaymentType": "CreditCard" }, "StoredValueDetails": { "PartnerSVAccountId": null, "PartnerBulkAccountId": null }, "DonationItems": [ { "NpoEIN": "956041245", "NpoName": "FIRST CHURCH OF GOD OF LOS ANGELES", "DonorVisibility": "ProvideNameAndEmailOnly", "DonationItemAmount": 25, "NpoTPC": 1.18, "NfgTPC": 0, "RecurringPeriod": "Monthly", "DonationItemCustomData": [ { "Name": "Dedication", "Value": "In honor of Jane Doe" } ], "DisbursementDetails": { "PaymentID": 0, "PaymentDate": null, "PaymentType": null, "PaymentStatus": "", "CheckCashedDate": null }, "MatchingDonationDetails": { "MatchType": "", "MatchFor": "", "OriginalDonationDate": null, "OriginalDonationAmount": null, "OriginalDonationReference": "", "OriginalDonationPartnerTransactionID": "", "Notes": "" } }, { "NpoEIN": "956041245", "NpoName": "FIRST CHURCH OF GOD OF LOS ANGELES", "DonorVisibility": "ProvideNameAndEmailOnly", "DonationItemAmount": 100, "NpoTPC": 4.75, "NfgTPC": 0, "RecurringPeriod": "NotRecurring", "DonationItemCustomData": [ { "Name": "Dedication", "Value": "" } ], "DisbursementDetails": { "PaymentID": 0, "PaymentDate": null, "PaymentType": null, "PaymentStatus": "", "CheckCashedDate": null }, "MatchingDonationDetails": { "MatchType": "", "MatchFor": "", "OriginalDonationDate": null, "OriginalDonationAmount": null, "OriginalDonationReference": "", "OriginalDonationPartnerTransactionID": "", "Notes": "" } } ], "DonationCustomData": null } ] } } ## Request donation report [/report/rest/donation] This endpoint is used to request the donation report ### Request donation report [POST] The response would be an HTTP 202 (Accepted), with the location being a temporary resource representing the report request id + Attributes + source (string, required) - Source of the donation + reportRequestData (object, required) - object of type ReportRequestData, contains list of objects of type ReportParameter. Available Parameter List. 1) PartnerCampaign (String) - Identifier assigned by NFG. Should be a Valid Value 2) StartDate (date) - Format - UTC Timestamp "YYYY-MM-DDTHH:MM:SSZ". Valid date format Start Date ≤ Current Date 3) EndDate (date) - Format - UTC Timestamp "YYYY-MM-DDTHH:MM:SSZ". Valid date format. End Date >= Start Date (if specified) & End Date <= Current Date (Note: The End Date does not need to be included and can be left blank.) 4) ChargeId (integer) - Unique transaction identifier specified by NFG 5) ChargeStatus (string) - Donation charge status. Possible Valid Value List: All, Successful, Refunded, Pending 6) Recurring Type (string) - Donation charge status.Possible Valid Value List: NotRecurring, Monthly, Quarterly, Annually 7) DonorToken (string) - Unique donor identifier specified by the partner 8) PartnerTransactionId (integer) - Unique transaction identifier specified by the partner 9) BatchIdentifer (string) 10) PartnerSVAccountId (integer) + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { "source":"NFGAPIARYTEST", "reportRequestData":{ "reportParameters":[ { "name":"ChargeId", "value":"1251775161", } ] } } + Response 202 + Headers Location: https://api-sandbox.networkforgood.org/report/rest/donation/queue/1983?source=TEST + Attributes + reportRequestResponse (object) - Object of type ReportRequestResponse, Contains report response data + Body { "errorDetails": [], "status": "Success", "message": "", "callDuration": 2.8661639, "reportRequestResponse": { "ReportRequestId": 1983, "ReportRequestDate": "2015-06-29T04:56:11 -04:00", "ReportStatus": 1 } } ### Get donation report data [GET /report/rest/donation/{reportid}{?source}] This endpoint is used to get donation report data + Parameters + source: NFGAPIARYTEST (string, required) - Source of the donation + reportid: 104572 (number, required) - Request report id + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { } + Response 200 + Attributes + donationReportResponse (object) - Donation report response + __type (string) - Specifies type of report + ReportRequestDate (string) - Date of the report request + ReportStatus (number) - Indicates report status value. Possible values are 0 = Unk, 1 = Success, 2 = NoMatchingResults, 3 = RequestPending, 4 = AccessDenied, 5 = InvalidRequest, 6 = ExpiredRequest, 7 = MaxResultsExceeded, 8 = InvalidParameter, 9 = InvalidParameterValue + ReturnCount (number) - Count of report results + ReportResults (array) - Array of objects of type ReportResult + Body { "errorDetails":[], "status":"Success", "message":"", "callDuration":0.7120407, "donationReportResponse":{ "__type":"DonationReportData:http://reportapi.networkforgood.org/", "ReportRequestId":1974, "ReportRequestDate":"2015-06-19T12:55:56 -04:00", "ReportStatus":1, "ReturnCount":1, "ReportResults":[ { "DonationDetail":{ "PartnerSource":"NFGWEBSERVICE", "PartnerNFGAPIARYTEST":"", "DonationDate":"2015-06-05T02:50:10 -04:00", "PartnerTransactionId":"230cf1c9-4d5d-4e70-be1d-1acbd21b5ebb", "TotalDonationAmount":125 }, "DonorDetail":{ "DonorToken":"06b45827-85d1-4abd-a48c-317714e71fc8", "DonorEmail":"FrancisGCarter@teleworm.us", "DonorFirstName":"Vinayak", "DonorLastName":"Chitre", "DonorAddress1":"Jerry Toth Drive", "DonorAddress2":"", "DonorCity":"Elmendorf", "DonorState":"AK", "DonorZip":"90001", "DonorCountry":"US", "DonorPhone":"907-551-6347" }, "BatchDetails":{ "BatchIdentifier":null, "BatchComment":null }, "ChargeDetails":{ "ChargeId":1251450304, "ChargeStatus":"Successful", "ChargeStatusDate":"2015-06-05T02:50:13 -04:00", "OriginalChargeAmount":125, "CurrentChargeAmount":125, "DonorPaymentType":"CreditCard" }, "StoredValueDetails":{ "PartnerSVAccountId":null, "PartnerBulkAccountId":null }, "DonationItems":[ { "NpoEIN":"956041245", "NpoName":"FIRST CHURCH OF GOD OF LOS ANGELES", "DonorVisibility":"ProvideNameAndEmailOnly", "DonationItemAmount":25, "NpoTPC":1.18, "NfgTPC":0, "RecurringPeriod":"Monthly", "DonationItemCustomData":[ { "Name":"Dedication", "Value":"In honor of Jane Doe" } ], "DisbursementDetails":{ "PaymentID":0, "PaymentDate":null, "PaymentType":null, "PaymentStatus":"", "CheckCashedDate":null }, "MatchingDonationDetails":{ "MatchType":"", "MatchFor":"", "OriginalDonationDate":null, "OriginalDonationAmount":null, "OriginalDonationReference":"", "OriginalDonationPartnerTransactionID":"", "Notes":"" } }, { "NpoEIN":"956041245", "NpoName":"FIRST CHURCH OF GOD OF LOS ANGELES", "DonorVisibility":"ProvideNameAndEmailOnly", "DonationItemAmount":100, "NpoTPC":4.75, "NfgTPC":0, "RecurringPeriod":"NotRecurring", "DonationItemCustomData":[ { "Name":"Dedication", "Value":"" } ], "DisbursementDetails":{ "PaymentID":0, "PaymentDate":null, "PaymentType":null, "PaymentStatus":"", "CheckCashedDate":null }, "MatchingDonationDetails":{ "MatchType":"", "MatchFor":"", "OriginalDonationDate":null, "OriginalDonationAmount":null, "OriginalDonationReference":"", "OriginalDonationPartnerTransactionID":"", "Notes":"" } } ], "DonationCustomData":null } ] } } ## Donation Summary report endpoint [/report/rest/donation/summary] ### Request donation summary report [POST] The response would be an HTTP 202 (Accepted), with the location being a temporary resource representing the report request id + Attributes + source (string, required) - Source of the donation + reportRequestData (object, required) - Object of type ReportRequestData, contains list of objects of type ReportParameter. Available Parameter List. 1) PartnerCampaign (String) - Identifier assigned by NFG. Should be a Valid Value 2) StartDate (date) - Format - UTC Timestamp "YYYY-MM-DDTHH:MM:SSZ". Valid date format Start Date ≤ Current Date 3) EndDate (date) - Format - UTC Timestamp "YYYY-MM-DDTHH:MM:SSZ". Valid date format. End Date >= Start Date (if specified) & End Date <= Current Date (Note: The End Date does not need to be included and can be left blank.) 4) ChargeId (integer) - Unique transaction identifier specified by NFG 5) ChargeStatus (string) - Donation charge status. Possible Valid Value List: All, Successful, Refunded, Pending 6) Recurring Type (string) - Donation charge status.Possible Valid Value List: NotRecurring, Monthly, Quarterly, Annually 7) DonorToken (string) - Unique donor identifier specified by the partner 8) PartnerTransactionId (integer) - Unique transaction identifier specified by the partner 9) BatchIdentifer (string) 10) PartnerSVAccountId (integer) 11) NPO EIN (string) + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { "source":"NFGAPIARYTEST", "campaign":"API", "reportRequestData":{ "reportParameters":[ { "name":"StartDate", "value":"2015-06-04" } ] } } + Response 202 + Headers Location: https://api.dev.local/report/rest/donation/queue/1983?source=TEST + Attributes + reportRequestResponse (object) - Object of type ReportRequestResponse, Contains report response data + Body { "errorDetails": [], "status": "Success", "message": "", "callDuration": 2.8661639, "reportRequestResponse": { "ReportRequestId": 1983, "ReportRequestDate": "2015-06-29T04:56:11 -04:00", "ReportStatus": 1 } } ### Get donation summary report data [GET /report/rest/donation/summary/{reportid}{?source}] This endpoint is used to get donation summary report data + Parameters + source: NFGAPIARYTEST (string, required) - Source of the donation + reportid: 104574 (number, required) - Request report id + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { } + Response 200 + Attributes + donationReportResponse (object) - Donation report response + __type (string) - Specifies type of report + ReportRequestId (number) - Request id associated with report. + ReportRequestDate (string) - Date of the report request + ReportStatus (number) - Indicates report status value. Possible values are 0 = Unk, 1 = Success, 2 = NoMatchingResults, 3 = RequestPending, 4 = AccessDenied, 5 = InvalidRequest, 6 = ExpiredRequest, 7 = MaxResultsExceeded, 8 = InvalidParameter, 9 = InvalidParameterValue + ReturnCount (number) - Number of results returned + ReportResults (array) - array of report results. Maximum 1 + ReportResult (object) - report result + PartnerSource (string) - Partner source for donation + campaign (string) - Partner campaign for donation + StartDate (string) - This date specifies the start of report period + EndDate (string) - This date specifies the end of report period + ChargeStatus (string) - Status of the charge. Possible values are All, Successful, Refunded, Pending + TotalDonationAmount (number) - Total donation amount + TotalNumDonations (number) - Total number of donations returned in report result + Body { "errorDetails":[ ], "status":"Success", "message":"", "callDuration":1.241071, "donationReportResponse":{ "__type":"DonationSummaryReportData:http://reportapi.networkforgood.org/", "ReportRequestId":1975, "ReportRequestDate":"2015-06-19T02:11:09 -04:00", "ReportStatus":1, "ReturnCount":1, "ReportResults":[ { "PartnerSource":"TEST", "campaign":null, "StartDate":"2015-06-04T12:00:00 -04:00", "EndDate":"", "ChargeStatus":"Successful", "TotalDonationAmount":3070.85, "TotalNumDonations":45 } ] } } ## Report queue operations [/report/rest/donation/queue] ### Get status of report [GET /report/rest/donation/queue/{reportid}{?source}] This endpoint is used to get the status of requested report. If the progress is ready, it would return an HTTP status code of 303 (location /service/rest/donation/summary/{id} or /service/rest/donation/{id}) Otherwise, it would return HTTP status code of 200 with the status of the report + Parameters + source: NFGAPIARYTEST (string, required) - Source of the donation + reportid: 104574 (number, required) - Request report id + Request + Headers Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCIsImtpZCI6InpXOW4tazFiRU5Wd085RldsSTVUQ00yYzd4MCJ9.eyJjbGllbnRfaWQiOiJORkdBUElBUllURVNUVVNFUiIsImNsaWVudF9wYXJ0bmVyX2lkIjoiMTAxMDEwIiwiY2xpZW50X2NhcGFiaWxpdGllcyI6WyI0IiwiNiIsIjgiLCI5IiwiMTAiLCIxMSIsIjEyIiwiMTMiLCIxNCIsIjE2IiwiMTgiXSwiY2xpZW50X2NhbXBhaWduQ2FwYWJpbGl0aWVzMTE0MDkiOlsiMCIsIjEiLCI1IiwiNiIsIjciLCI4Il0sImNsaWVudF9jYW1wYWlnbkNhcGFiaWxpdGllczExNDEwIjpbIjAiLCIxIiwiNCIsIjUiLCI2IiwiNyIsIjgiLCI5Il0sInNjb3BlIjpbImRvbmF0aW9uIiwiZG9uYXRpb24tcmVwb3J0aW5nIl0sImp0aSI6IjM1YTVmNzBiZjFjNTg4NjlkNGI5MjM5NmJmNzczMzY3IiwiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS1uZmctc2FuZGJveC5uZmdwcm9kLm9yZyIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHktbmZnLXNhbmRib3gubmZncHJvZC5vcmcvcmVzb3VyY2VzIiwiZXhwIjoxNTk1MzgwNDU1LCJuYmYiOjE0Mzc1OTI0NTV9.WigragTG47NdGopWKeykUpLlLwE25HK80HCEMpqwN3jbunTOypS2AqIoZT0dsPhDC02yuhFBBx1xXbwEpRw7cuHNckPKqWHo3bqpL9nTJUwACkHNisKQDJf9HX9uKYvZ_xEHJ3bhDyZ8rFEMRWzwu0NXfQS66epsI18GqgfoQm3O1qxy5bxGWRlkCE4UOAQzh1ULxwN2tWMRpuxpPRDs-Afv6h7yGwuWyyWYAheuAZX5NLKxnl7HNeBhzKYgirvb6QnPIdFyUp5khv4snBRtGU-3rZG6eQYXjyuCm2lPvOuvvYmafWKkjDTtn3Fl6YkNY3F3bOktKRyTcfGxJ-eNwg Content-Type: application/json + Body { } + Response 200 { "errorDetails":[], "status":"Success", "message":"", "callDuration":0.5090291, "reportProgressStatus":"Initiated", }