Create Donation

The Create Donation request creates a new donation record and payment record. The payment record is attached to the donation record. The donation record is attached to an account. To create a payment, you’ll need to know the tender type. The individual or organization account must have been created before a donation record can be created.

REST

Request

https://api.neoncrm.com/neonws/services/api/donation/createDonation?responseType=json&userSessionId=[sessionId]&donation.accountId=150290&donation.amount=50&Payment.amount=50&donation.date=2016-03-30&Payment.tenderType.id=4&Payment.creditCardOnlinePayment.cardNumber=4444111111111111&Payment.creditCardOnlinePayment.expirationMonth=01&Payment.creditCardOnlinePayment.expirationYear=2020&Payment.creditCardOnlinePayment.cardType.name=Visa&Payment.creditCardOnlinePayment.CVV2=999&Payment.creditCardOnlinePayment.cardHolder=Example%20Person

Response


    {
        "createDonation":
        {
            "operationResult": "SUCCESS",
            "responseMessage": "Donation created.",
            "responseDateTime": "2016-06-28T20:45:16.018+0000",
            "donationId": 52937,
            "transaction":
            {
                "transactionId": 72223,
                "transactionStatus": "SUCCEED",
                "payments":
                {
                    "payment":
                    [
                        {
                            "paymentId": 56415,
                            "amount": 50,
                            "paymentStatus": "SUCCEED",
                            "tenderType":
                            {
                                "id": "4",
                                "name": "Credit Card (Online)"
                            },
                            "creditCardOnlinePayment":
                            {
                                "cardNumber": "***********1111",
                                "expirationMonth": 1,
                                "expirationYear": 20,
                                "cardType":
                                {
                                    "code": "v",
                                    "name": ""
                                },
                                "cardHolder": "Example Person"
                            }
                        }
                    ]
                }
            }
        }
    }

SOAP

Request

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:neon="http://www.z2systems.com/schemas/neonws/">
   <soapenv:header>
       <soapenv:body>
          <neon:createdonationrequest>
             <usersessionid>T1361753723533</usersessionid>
             <donation>
               <accountid>123941</accountid>
                <amount>41</amount>
                <purpose>
                   <id>26</id>
                </purpose>
               <campaign>
                   <id>243</id>
                </campaign>
               <fund>
                   <id>11</id>
                </fund>
               <donorname>Xiao Ma</donorname>
                <date>2012-02-24</date>
                <acknowledgee>
                  <name>Andrew Jones</name>
                   <email>ajones@z2systems.com</email>
                   <address>
                     <addressline1>14/284 Sussex Street</addressline1>
                      <addressline2></addressline2>
                      <addressline3></addressline3>
                      <addressline4></addressline4>
                      <city>Chicago</city>
                      <state>
                         <code>IL</code>
                      </state>
                      <country>
                         <id>1</id>
                      </country>
                      <zipcode>610000</zipcode>
                      <zipcodesuffix>235</zipcodesuffix>
                   </address>
                </acknowledgee>
                <honormemory>
                   <name>xiao</name>
                   <hmtype>Memory</hmtype>
                </honormemory>
                <customfielddatalist>
                   <customfielddata>
                      <fieldid>603</fieldid>
                      <fieldoptionid>2295</fieldoptionid>
                   </customfielddata>
                </customfielddatalist>
                <source>
                   <id>12</id>

                <solicitation>
                   <id>6</id>
                </solicitation>
                <anonymoustype>DonorNameAnonymous</anonymoustype>
             </donation>
             <payment>
               <amount>41</amount>
               <note>testing payment</note>
                <tendertype>
                   <id>4</id>
                </tendertype>
                <creditcardonlinepayment>
                   <cardnumber>4757077614429236</cardnumber>
                   <expirationmonth>9</expirationmonth>
                   <expirationyear>14</expirationyear>
                   <cardtype>
                       <code>V</code>
                   </cardtype>
                   <cvv2>231</cvv2>
                  <cardholder>William Smith</cardholder>
                   <billingaddressline1>14/349 Geoge Street</billingaddressline1>
                   <billingaddressline2></billingaddressline2>
                   <city>Chicago</city>
                   <state>
                      <code>IL</code>
                   </state>
                   <country>
                      <id>1</id>
                  </country>
                   <zipcode>60000</zipcode>
                   <zipcodesuffix>123</zipcodesuffix>
               </creditcardonlinepayment>
             </payment>
          </neon:createdonationrequest>
       </soapenv:body>
    </soapenv:header>
</soapenv:envelope>

Response

<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:body>
      <ns2:createdonationresponse xmlns:ns2="http://www.z2systems.com/schemas/neonws/">
         <operationresult>SUCCESS</operationresult>
         <responsemessage>Donation created.</responsemessage>
         <responsedatetime>2013-02-24T19:08:32.156-06:00</responsedatetime>
         <donationid>41734</donationid>
         <transaction>
            <transactionid>55597</transactionid>
            <transactionstatus>Succeed</transactionstatus>
            <payments>
               <payment>
                  <paymentid>44093</paymentid>
                  <amount>41.0</amount>
                  <paymentstatus>Succeed</paymentstatus>
                  <note>testing payment</note>
                  <tendertype>
                     <id>4</id>
                     <name>Credit Card(Online)</name>
                  </tendertype>
                  <creditcardonlinepayment>
                     <cardnumber>************9236</cardnumber>
                     <expirationmonth>9</expirationmonth>
                     <expirationyear>14</expirationyear>
                     <cardtype>
                        <code>V</code>
                        <name>Visa</name>
                     </cardtype>
                     <cardholder>William Smith</cardholder>
                     <billingaddressline1>14/349 Geoge Street</billingaddressline1>
                     <billingaddressline2>
                     <city>Chicago</city>
                     <state>
                        <code>IL</code>
                     </state>
                     <country>
                        <id>1</id>
                        <name>United States</name>
                     </country>
                     <zipcode>60000</zipcode>
                     <zipcodesuffix>123</zipcodesuffix>
                  </billingaddressline2></creditcardonlinepayment>
               </payment>
            </payments>
         </transaction>
      </ns2:createdonationresponse>
   </soap:body>
</soap:envelope>

Request Parameters

Name Required Description
donation.accountId Yes Account ID of constituent to whom this donation will be credited
donation.amount Yes Dollar amount of donation
donation.date Yes Donation date. Format: 2012-12-30
donation.anonymousType Possible values: No, DonorNameAnonymous, DonationAmountAnonymous
donation.donorName Specify the donor name if it is different from the account being credited for the donation.
sendAcknowledgeEmail Determines whether the donation will trigger the default system email. Value must be TRUE or FALSE. FALSE is the default value if the parameter is not provided.
donation.campaign.id Possible values can be retrieved from List Campaigns method. Required if campaign.name is not provided.
donation.campaign.name Possible values can be retrieved from List Campaigns method. Required if campaign.id is not provided.
donation.purpose.id Possible values can be retrieved from List Purposes method. Required if purpose.name is not provided.
donation.purpose.name Possible values can be retrieved from List Purposes method. Required if purpose.id is not provided.
donation.fund.id Possible values can be retrieved from List Funds method. Required if fund.name is not provided.
donation.fund.name Possible values can be retrieved from List Funds method. Required if fund.id is not provided.
donation.source.id Possible values can be retrieved from List Sources method. Required if source.name is not provided.
donation.source.name Possible values can be retrieved from List Sources method. Required if source.id is not provided.
donation.solicitation.id
donation.solicitation.name
Acknowledgee
If you specify the acknowledgee fields, a new account will be created and credited as the acknowledgee for this donation.
donation.acknowledgee.name
donation.acknowledgee.email
donation.acknowledgee.address.shippingAddress
donation.acknowledgee.address.addressType.id
donation.acknowledgee.address.addressType.name
donation.acknowledgee.address.addressLine1
donation.acknowledgee.address.addressLine2
donation.acknowledgee.address.addressLine3
donation.acknowledgee.address.addressLine4
donation.acknowledgee.address.city
donation.acknowledgee.address.state.code
donation.acknowledgee.address.state.name
donation.acknowledgee.address.province
donation.acknowledgee.address.county
donation.acknowledgee.address.country.id
donation.acknowledgee.address.country.name
donation.acknowledgee.address.zipCode
donation.acknowledgee.address.zipCodeSuffix
donation.acknowledgee.address.startDate
donation.acknowledgee.address.endDate
Honor / Memory
donation.honorMemory.name
donation.honorMemory.hmType
Donation Custom Fields
donation.customFieldDataList.customFieldData.fieldId Donation custom fields can be retrieved from the List Custom Fields method.
donation.customFieldDataList.customFieldData.fieldValue Donation custom fields can be retrieved from the List Custom Fields method.
donation.customFieldDataList.customFieldData.fieldOptionId Donation custom fields can be retrieved from the List Custom Fields method.
Payments
Payment.amount Yes Payment amount
Payment.fairMarketValue When using the “In-Kind” tender type (ID #5), you may supply the fair market value amount for the donation.
Payment.tenderType.id Yes * Possible values can be retrieved from List Tenders method. Required if tenderType.name is not provided.
Payment.tenderType.name Yes * Possible values can be retrieved from List Tenders method. Required if tenderType.id is not provided.
Payment.note
Credit Card Online Payment
The following fields are applicable if tenderType = 4 (credit card online)
Payment.creditCardOnlinePayment.cardNumber Yes * Required unless using Neon Payment Processing.
Payment.creditCardOnlinePayment.token Yes * Required if using Neon Payment Processing. Use Stripe Elements client library to generate this token. Stripe API Key can be retrieved using the Retrieve Payment Processor Settings method.
Payment.creditCardOnlinePayment.expirationMonth Yes
Payment.creditCardOnlinePayment.expirationYear Yes
Payment.creditCardOnlinePayment.cardType.id Yes * Possible values can be retrieved from List Credit Card Types method. Required when cardType.name is not provided.
Payment.creditCardOnlinePayment.cardType.name Yes * Possible values: American Express, Discover, MasterCard, Visa. Can be retrieved from List Credit Card Types method. Required when cardType.id is not provided.
Payment.creditCardOnlinePayment.CVV2 Yes
Payment.creditCardOnlinePayment.cardHolder Yes Name of credit card holder, as shown on the card.
Payment.creditCardOnlinePayment.cardHolderEmail Yes * Required if using Neon Payment Processing.
Payment.creditCardOnlinePayment.billingAddressLine1
Payment.creditCardOnlinePayment.billingAddressLine2
Payment.creditCardOnlinePayment.city
Payment.creditCardOnlinePayment.state.code Possible values can be retrieved from the List States method. Required when state.name is not provided.
Payment.creditCardOnlinePayment.state.name Possible values can be retrieved from the List States method. Required when state.code is not provided.
Payment.creditCardOnlinePayment.province
Payment.creditCardOnlinePayment.country.id Possible values can be retrieved from the List Countries method. Required when country.name is not provided.
Payment.creditCardOnlinePayment.country.name Possible values can be retrieved from the List Countries method. Required when country.id is not provided.
Payment.creditCardOnlinePayment.zipCode
Payment.creditCardOnlinePayment.zipCodeSuffix
Credit Card Offline Payment
The following fields are applicable if tenderType = 2 (credit card offline, on-site credit card machine)
Payment.creditCardOfflinePayment.cardNumber
Payment.creditCardOfflinePayment.expirationMonth
Payment.creditCardOfflinePayment.expirationYear
Payment.creditCardOfflinePayment.cardType.id Possible values can be retrieved from List Credit Card Types method. Required when cardType.name is not provided.
Payment.creditCardOfflinePayment.cardType.name Possible values can be retrieved from List Credit Card Types method. Required when cardType.id is not provided.
Payment.creditCardOfflinePayment.CVV2
Payment.creditCardOfflinePayment.cardHolder
Payment.creditCardOfflinePayment.billingAddressLine1
Payment.creditCardOfflinePayment.billingAddressLine2
Payment.creditCardOfflinePayment.city
Payment.creditCardOfflinePayment.state.code Possible values can be retrieved from the List States method. Required when state.name is not provided.
Payment.creditCardOfflinePayment.state.name Possible values can be retrieved from the List States method. Required when state.code is not provided.
Payment.creditCardOfflinePayment.province
Payment.creditCardOfflinePayment.country.id Possible values can be retrieved from the List Countries method. Required when country.name is not provided.
Payment.creditCardOfflinePayment.country.name Possible values can be retrieved from the List Countries method. Required when country.id is not provided.
Payment.creditCardOfflinePayment.zipCode
Payment.creditCardOfflinePayment.zipCodeSuffix
eCheck / ACH Payment
The following fields are applicable if tenderType = 12 (E-Check/ACH)
Payment.echeckPayment.institution
Payment.echeckPayment.routingNumber Yes
Payment.echeckPayment.accountNumber Yes
Payment.echeckPayment.accountOwner
Payment.echeckPayment.CheckNumber
Payment.echeckPayment.accountType Possible values: Checking, Saving
Check Payment
The following fields are applicable if tenderType = 3 (Check)
Payment.checkPayment.institution
Payment.checkPayment.routingNumber
Payment.checkPayment.accountNumber
Payment.checkPayment.accountOwner
Payment.checkPayment.CheckNumber
Payment.checkPayment.accountType Possible values: Checking, Saving

Response Parameters

Name Required Description
donationId Yes The ID of the donation transaction (not the account).
transaction.transactionId Yes Transaction ID
transaction.transactionStatus Yes Possible values: Pending, Processing, Succeed, Declined, Error, Scheduled, Cancelled, Deferred
transaction.payments.payment Yes Transaction details of the payment

Error Codes

Code Text Description
50 CustomField id is required.
51 CustomField id is invalid.
52 CustomField option value is required.
53 CustomField option id is required.
54 CustomField option id is invalid.
55 CustomField option id is duplicated.
56 CustomField id is duplicated.
101 Payment amount is required.
102 Tender type id or name is required.
103 Tender type id or name is invalid.
104 Echeck routing number is required.
105 Echeck account number is required.
106 Echeck account owner is required.
107 Credit card number is required.
108 Credit card expiration date is required.
109 Credit card CVV2 is required.
110 Credit card type is invalid.
111 Billing Address state id or name is invalid.
112 Billing Address country id or name is invalid.
150 Unable to process payment.
151 Payment id is invalid.
152 Payment id is required.
153 Succeed credit card online or e-check payment cannot be reprocessed.
10014 Source id or name is invalid.
10130 Address Type is invalid.
10133 Address country is invalid
10134 Address state is invalid
11003 Amount is required
11004 Donation date is required.
11005 Fund ID or Name is invalid
11006 Campaign ID or Name is invalid
11007 Purpose ID or Name is invalid