This method processes a donation by a constituent to a Donations 2 (not "Donations Classic") donation form.
Client Servlet | Server Servlet | HTTP Methods Supported | Requires Authentication |
---|---|---|---|
CRDonationAPI | None. | POST | No. |
Important: This method is used to process online credit card donations. To maintain PCI data security standards for payment card transactions, call this method directly from the client's browser and never proxy the call through an external server.
2021 Update: You can now provide Google reCAPTCHA v3 protection on your API-based donation form. See Secure donations with Google reCAPTCHA v3 in our new Luminate Online API site.
The Donation API must reference a shadow Donation Form on the Luminate Online web site. This shadow form is used to perform validation and to associate donations with the appropriate fundraising Campaign. The ID of this shadow Donation Form is passed in the required form_id parameter. The API also requires the ID of the appropriate Donation Level in the level_id parameter.
The donate method is intended specifically to enable online donation processing by payment card or bank transfer. To process payments via other online payment services (PayPal or Amazon), you must use instead startDonation. These methods do not support eCommerce purchases, TeamRaiser registration fees, additional registration gifts or offline gifts, or Personal Fundraising gifts.
Other API methods may also process payment card transactions, including:
Effect on Session State and Constituent Record
If donate is called in the context of a logged-in user session, the transaction will be credited to the logged-in constituent and the donor's constituent record will be updated with the name and address information provided in the call (billing information fields are used if the donor information fields are not included in the form).
If donate is called in the context of a session established by a remember-me cookie, the donation is credited to the constituent identified by the session, and updates are made to some tracking and status fields, however the constituent record is not updated with new contact information. The same is true when donate is called outside of any session context, but when the donor's email address matches exactly one existing constituent record.
Otherwise, if donate is called without a user session and the donor's email address cannot be matched to an existing constituent, a new constituent record will be created for the donor, a session will be established for the new constituent, and a session cookie will be pushed to the caller.
Validation
The reason for two sets of name and address fields is to allow the constituent record of the donor to be different from the name and address used for payment processing.
Important: For security reasons, payment information may not be passed in the POST URL, and must be passed as multi-part form data of type Content-type: application/x-www-form-urlencoded in the request body.
Boolean Parameters in HTML Forms
Boolean parameters such as donor.email_opt_in and remember_me expect a value of "true" (ignoring case) to be set. Any other value is interpreted as "false". To set this in an HTML checkbox, include value="true" in the checkbox attributes.
Custom Fields
In the Donation Management application, administrators can define new custom fields to add to donation forms. To set a custom field with this method, the name of the API parameter is derived from the "Data Element Name" provided for the custom field. The Data Element Name is converted into a valid identifier by converting all letters to lower case and replacing all non-alphanumeric characters with underscores. So a Data Element Name of "My Custom String" should be passed into the donation API as "my_custom_string". Note that the "Data Element Name" is the same across all donation forms, and is not the same as the label that you actually specify in the form.
If validation is disabled (validate=false) and a Custom Field contains text longer than the maximum length for the field the text will be truncated to the maximum length and saved without an error.
Designated Giving
The Designated Giving feature in Online Giving allows you to set up Designees within your organization and then assign all funds from a donation form to a specific designee or permit your donors to specify which Designee(s) they would like to target with their gifts. To use this feature, you must first set up your list of Designees and Designation Types. Designation Types help organize your designees for display to your donors. For example, an educational institution might create the following Designation Types: Academic, Athletic, and Administrative. Individual designees, such as the football program or the biology department, can then be assigned to the appropriate Type.
To get the designation types and designees to use for a form, call the getDesignationTypes and getDesignees methods. To specify designations for a donation, use the designated.X.id and designated.X.amount parameters, substituting numbers for the "X" part of the parameter names to identify ID and amount pairs (the numbers do not need to be sequential). To specify "write-in" designations, use the designated_write_in.X.name, designated_write_in.X.contact, and designated_write_in.X.amount parameters.
Sustaining (Recurring) Gifts
Sustainer giving lets donors set up recurring, automatic gifts, with either pre-set amounts and durations or flexible donor-specified commitments. Use the sustaining.frequency and sustaining.duration parameters to make sustaining donations. The shadow donation form must contain one of the sustaining giving donation level elements.
Installment programs enable higher-dollar giving levels with payment programs that offer the benefits of large gifts but automatically pay out over the schedules you design and donors select. Use the installment.frequency and installment.duration parameters to make installment donations. The shadow donation form must contain the installment plan donation level element.
Donation Errors
If the call to the API succeeds but one or more errors are encountered during transaction processing, a donationResponse object will be returned listing reasons for the error. To correlate with the standard donation form processing, pageError elements in the response are the same messages that would be displayed near the top of the page and are sometimes generic. The fieldError elements in the response are the same messages that would be displayed near input fields throughout the page and are always specific to the validation of input for an input field.
Soft-crediting Gifts to TeamRaiser Participants, Teams, or Events
You can soft-credit donations processed through the donate or startDonation methods to TeamRaiser particpants, teams or events. In each case, you must include the TeamRaiser Event ID in the fr_id parameter. To soft-credit the gift to a participant: specify soft_credit_type as TR_PARTICIPANT, and pass the Constituent ID of the particpant in soft_credit_id. To soft-credit the gift to a team: specify soft_credit_type as TR_TEAM, and pass the Team ID in soft_credit_id. To soft-credit the gift to an event: specify soft_credit_type as TR_EVENT, and pass the Event ID (the same value as in fr_id) in soft_credit_id. The system returns an error if you attempt to soft-credit a donation to an event that is not currently accepting donations or to a team that does not accept team gifts.
Error Responses
For common API errors such as authentication errors, the common error response is returned. An XML example:
<errorResponse xmlns="http://convio.com/crm/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd"> <code>2</code> <message>Incorrect API key. Verify that the value of the parameter api_key matches the value of the SDP CONVIO_API_KEY.</message> </errorResponse>
A JSON example:
{"errorResponse":{ "code": "2", "message": "Incorrect API key. Verify that the value of the parameter api_key matches the value of the SDP CONVIO_API_KEY.", }}
For donation-specific errors, the "donationResponse" is returned and contains a list of the error messages. An XML example:
<donationResponse xmlns="http://convio.com/crm/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd"> <errors> <code>101</code> <message>Error: There was a problem encountered while processing your donation.</message> <reason>FIELD_VALIDATION</reason> <pageError>There was a problem processing your request. Please see below.</pageError> <fieldError>An email address is required.</fieldError> <fieldError>Billing state or province is required.</fieldError> <fieldError>Billing last name is required.</fieldError> <fieldError>Billing zip or postal code is required.</fieldError> <fieldError>Billing street address is required.</fieldError> <fieldError>Billing first name is required.</fieldError> <fieldError>Billing city is required.</fieldError> </errors> </donationResponse>
A JSON example:
{"donationResponse": {"errors": {"code":"101", "reason":"FIELD_VALIDATION", "message":"Error: There was a problem encountered while processing your donation.", "fieldError":["An email address is required.", "Billing state or province is required.", "Billing last name is required.", "Billing zip or postal code is required.", "Billing street address is required.", "Billing first name is required.", "Billing city is required."], "pageError":"There was a problem processing your request. Please see below."} } }
See topic Common Parameters.
Required. The billing address of the credit card owner. If not supplied, defaults to donor.address.city.
Type xsd:string.
Required. The billing address of the credit card owner. If not supplied, defaults to donor.address.state.
Type xsd:string.
Required. The billing address of the credit card owner. If not supplied, defaults to donor.address.street1.
Type xsd:string.
Required. The billing address of the credit card owner. If not supplied, defaults to donor.address.zip.
Type xsd:string.
Required. The billing name of the credit card owner. If not supplied, defaults to donor.name.first.
Type xsd:string.
Required. The billing name of the credit card owner. If not supplied, defaults to donor.name.last.
Type xsd:string.
Required. The donor's email address.
Type xsd:string.
Required. The ID of the donation form.
Type xsd:nonNegativeInteger.
Required. The ID of the donation level.
Type xsd:nonNegativeInteger.
Optional. ACH (debit) account number.
Type xsd:string.
Optional. ACH account type (CHECKING/SAVINGS).
Type xsd:string.
Default is CHECKING.
Optional. ACH bank number (Canada).
Type xsd:string.
Optional. ACH routing number.
Type xsd:string.
Optional. ACH transit number (Canada).
Type xsd:string.
Optional. Donation amount in addition to level amount.
Type xsd:string.
Optional. Whether to mark the donation as "anonymous".
Type xsd:boolean.
Optional. The billing address of the credit card owner.
Type xsd:string.
Optional. The billing address of the credit card owner.
Type xsd:string.
Optional. The billing address of the credit card owner.
Type xsd:string.
Optional. The billing address of the credit card owner.
Type xsd:string.
Optional. The billing name of the credit card owner.
Type xsd:string.
Optional. The billing name of the credit card owner.
Type xsd:string.
Optional. The billing name of the credit card owner.
Type xsd:string.
Optional. The billing name of the credit card owner.
Type xsd:string.
Optional. Credit card Verification Value. This is usually required, depending on the configuration of the Luminate Online site.
Type xsd:string.
Optional. Credit card expiration date in MM/YYYY format. Use either this or both card_exp_date_month and card_exp_date_year.
Type xsd:string.
Optional. Credit card expiration month (1-12).
Type xsd:nonNegativeInteger.
Optional. Credit card expiration year.
Type xsd:nonNegativeInteger.
Optional. Credit card number. For security, this must be specified in the form -- it is an error to include it in the URL.
Type xsd:string.
Optional. Credit card type
Type xsd:string.
Optional. The amount of a donation to designate to a designee. The "X" part of the parameter must be an integer used to correspond to designated.X.id or, in the case of write-in designations, designated.X.name and designated.X.contact. This allows multiple pairs of ID/amount for multiple designations.
Type xsd:nonNegativeInteger.
Optional. The ID of a designee to which to designate all or part of a donation. The "X" part of the parameter must be an integer used to correspond to designated.X.amount. This allows multiple pairs of ID/amount for multiple designations.
Type xsd:nonNegativeInteger.
Optional. The amount of a donation to designate to a designee. The "X" part of the parameter must be an integer used to correspond to designated_write_in.X.name and designated_write_in.X.contact. This allows multiple pairs of ID/amount for multiple designations.
Type xsd:nonNegativeInteger.
Optional. The contact information of an organization to which to designate all or part of a donation. The "X" part of the parameter must be an integer used to correspond to designated_write_in.X.name and designated_write_in.X.amount. This allows multiple sets of name/contact/amount for multiple designations.
Type xsd:string.
Optional. The name of an organization to which to designate all or part of a donation. The "X" part of the parameter must be an integer used to correspond to designated_write_in.X.contact and designated_write_in.X.amount. This allows multiple sets of name/contact/amount for multiple designations.
Type xsd:string.
Optional. The donor's address.
Type xsd:string.
Optional. The donor's address.
Type xsd:string.
Optional. The donor's address.
Type xsd:string.
Optional. The donor's address.
Type xsd:string.
Optional. The donor's address.
Type xsd:string.
Optional. The donor's address.
Type xsd:string.
Optional. The donor's address.
Type xsd:string.
Optional. The donor's address.
Type xsd:string.
Optional. The donor's email opt-in selection.
Type xsd:string.
Optional. The donor's employer.
Type xsd:string.
Optional. The donor's name.
Type xsd:string.
Optional. The donor's name.
Type xsd:string.
Optional. The donor's name.
Type xsd:string.
Optional. The donor's name.
Type xsd:string.
Optional. The donor's name.
Type xsd:string.
Optional. The donor's name.
Type xsd:string.
Optional. The donor's occupation.
Type xsd:string.
Optional. The donor's phone number.
Type xsd:string.
Optional. The type of the donor's phone number .
Type xsd:string.
Optional. Whether to send a copy of the e-card to the sender.
Type xsd:boolean.
Optional. The unique ID of the pre-defined Luminate Online e-card template to use.
Type xsd:nonNegativeInteger.
Optional. The message body of the e-card.
Type xsd:string.
Optional. The email addresses of intended e-card recipients (RFC-5322 format) e.g. 'John Doe<user1@host.org>, Jane Roe<user2@host.com>'.
Type xsd:string.
Optional. Whether or not to send an e-card recognizing the gift.
Type xsd:boolean.
Default is false.
Optional. Date to send the e-card (ISO 8601 format) e.g. '2009-12-31'.
Type xsd:date.
Optional. The subject of the e-card.
Type xsd:string.
Optional. Specifies the ID of the TeamRaiser event associated with this donation.
Type xsd:nonNegativeInteger.
Optional. Gift aid status (UK Only).
Type xsd:string.
Optional. The duration of an installment plan donation, which is the number of payments that the donation is divided into. To make an installment plan donation, both installment.frequency and installment.duration must be specified.
Type xsd:nonNegativeInteger.
Optional. The frequency of an installment plan donation, which is the interval between payments. To make an installment plan donation, both installment.frequency and installment.duration must be specified.
Type crm:donationSustainingFrequency.
Optional. The name for a joint donor.
Type xsd:string.
Optional. The name for a joint donor.
Type xsd:string.
Optional. The name for a joint donor.
Type xsd:string.
Optional. The name for a joint donor.
Type xsd:string.
Optional. The name for a joint donor.
Type xsd:string.
Optional. Whether or not the "recurring gift" option on the Donation Level shadow form should be selected. Valid only for Level shadow forms on which a recurring gift option has been defined.
Note: The parameter value is not checked, only the presence of the parameter. Use level_autorepeat only if the donation level has its own recurring behavior. Otherwise, the duration and frequency needs to be specified in your API call.
Optional. Whether or not the donation is eligible for a matching gift.
Type xsd:boolean.
Optional. The name of organization on whose behalf donor is making the gift.
Type xsd:string.
Optional. User specified donation amount.
Type xsd:string.
Optional. Unique ID of premium.
Type xsd:nonNegativeInteger.
Optional. Premium option.
Type xsd:string.
Optional. Whether to set a log-in cookie.
Type xsd:boolean.
Optional. Whether to send a receipt email to the donor. The default behavior is to send a receipt.
Type xsd:boolean.
Default is true.
Optional. If a new constituent record is created for the donor, this specifies whether to send a registration "welcome" email to the donor. The default behavior is to send it.
Type xsd:boolean.
Default is true.
Optional. Shipping address for premium.
Type xsd:string.
Optional. Shipping address for premium.
Type xsd:string.
Optional. Shipping address for premium.
Type xsd:string.
Optional. Shipping address for premium.
Type xsd:string.
Optional. Shipping address for premium.
Type xsd:string.
Optional. Shipping address for premium.
Type xsd:string.
Optional. Shipping address for premium.
Type xsd:string.
Optional. Shipping address for premium.
Type xsd:string.
Optional. Email address of the recipient.
Type xsd:string.
Optional. Premium recipient's name.
Type xsd:string.
Optional. Premium recipient's name.
Type xsd:string.
Optional. Premium recipient's name.
Type xsd:string.
Optional. Premium recipient's name.
Type xsd:string.
Optional. Premium recipient's name.
Type xsd:string.
Optional. Premium recipient's name.
Type xsd:string.
Optional. Phone number of the recipient.
Type xsd:string.
Optional. Specifies the ID of the entity to which this donation will be soft credited. This will be either the event ID, team ID, or participant (constituent) ID, depending on the value specified for soft_credit_type.
Type xsd:nonNegativeInteger.
Optional. Specifies type of entity to which this donation will be soft credited. Donations that specify a soft credit type must also specify a soft_credit_id value.
Type xsd:string.
Optional. The type of donation summary to return. There are three options:'data' returns a structured list of information about every form field; 'page' returns the HTML content (within the "body" element) of the "Thank you" page shown after donations via web page; 'both' returns both types of summary.
Type xsd:string.
Optional. The duration of a sustaining donation, which is the interval between payments. Specify zero to indicate that the donation should repeat indefinitely. To make a sustaining donation, both sustaining.frequency and sustaining.duration must be specified.
Type xsd:nonNegativeInteger.
Optional. The frequency of a sustaining donation, which is how often the donation is repeated. To make a sustaining donation, both sustaining.frequency and sustaining.duration must be specified.
Type crm:donationSustainingFrequency.
Optional. If this donation is a TeamRaiser Gift, the body of the message to send to the TeamRaiser participant.
Type xsd:string.
Optional. If this donation is a TeamRaiser Gift, the recognition name.
Type xsd:string.
Optional. If this donation is a TeamRaiser Gift, whether or not to the TeamRaiser gift is publicly visible.
Type xsd:boolean.
Optional. Whether the tribute honoree is deceased. If set, it overrides "tribute.type" by setting it to "memorial" if true (deceased) and "tribute" if false (not deceased).
Type xsd:boolean.
Optional. The first name of the person to honor with the tribute. Takes precedence over tribute.honoree.name.full.
Type xsd:string.
Optional. The full name of the person to honor with the tribute. Only used if the first and last names are not specified.
Type xsd:string.
Optional. The last name of the person to honor with the tribute. Takes precedence over tribute.honoree.name.full.
Type xsd:string.
Optional. The name title of the person to honor with the tribute.
Type xsd:string.
Optional. The body of the tribute notification message.
Type xsd:string.
Optional. The closing of the tribute notification message.
Type xsd:string.
Optional. Whether to include the donation amount in the tribute notification message.
Type xsd:boolean.
Optional. The signature of the tribute notification message.
Type xsd:string.
Optional. The address of the person to notify of the tribute.
Type xsd:string.
Optional. The address of the person to notify of the tribute.
Type xsd:string.
Optional. The address of the person to notify of the tribute.
Type xsd:string.
Optional. The address of the person to notify of the tribute.
Type xsd:string.
Optional. The address of the person to notify of the tribute.
Type xsd:string.
Optional. The address of the person to notify of the tribute.
Type xsd:string.
Optional. The address of the person to notify of the tribute.
Type xsd:string.
Optional. The address of the person to notify of the tribute.
Type xsd:string.
Optional. The full name of the person to notify of the tribute.
Type xsd:string.
Optional. The name title of the person to notify of the tribute.
Type xsd:string.
Optional. The type of tribute.
Type xsd:string.
Optional. Whether to enforce validation of every field according to the specification in the ghost form ("true" or "false"). Some validation is always in effect, such as ensuring that the campaign, form, and level IDs reference published entities and that there is sufficient information to process the transaction.
Type xsd:boolean.
Default is false.
Required when using reCAPTCHA v3 protection on the donation form. Use the getDonationFormInfo method to retrieve a publicKey for the Google reCAPTCHA v3 library. Include the publicKey value with this parameter.
Type xsd:string.
See topic HTTP Status Codes.
XML response<?xml version="1.0" encoding="UTF-8"?> <donationResponse xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd" xmlns="http://convio.com/crm/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <donation> <cons_id>1006789</cons_id> <confirmation_code>0-0000-0-0000-0000</confirmation_code> <date_time>2018-10-03T11:01:11.056-05:00</date_time> <org_tax_id>00-0000000</org_tax_id> <reward_points_earned>100</reward_points_earned> <transaction_id>100101</transaction_id> <amount> <decimal>100</decimal> <formatted>$100.00</formatted> </amount> <tax_deductible_amount> <decimal>100</decimal> <formatted>$100.00</formatted> </tax_deductible_amount> <value_of_goods> <decimal>0</decimal> <formatted>$0.00</formatted> </value_of_goods> <summary_data> <field header="false"> <label>Transaction Date:</label> <value>1/0/201</value> <name>date_id</name> </field> <field header="true"> <label>Gift Information</label> <value/> <name>section-header</name> </field> <field header="false"> <label>Amount:</label> <value>$100.00</value> <name>level_id</name> </field> <field header="true"> <label>Billing Information</label> <value/> <name>section-header</name> </field> <field header="false"> <label>Billing First Name:</label> <value>John</value> <name>billing.name.first</name> </field> <field header="false"> <label>Billing Last Name:</label> <value>Doe</value> <name>billing.name.last</name> </field> <field header="true"> <label>Payment Information</label> <value/> <name>section-header</name> </field> <field header="false"> <label>Payment Type:</label> <value>Credit Card</value> <name>payment_type</name> </field> <field header="false"> <label>Credit Card Number:</label> <value>***************1111</value> <name>card_number</name> </field> </summary_data> </donation> </donationResponse>JSON response
{"donationResponse":{"donation":{"transaction_id":"100101","org_tax_id":"00-0000000","amount":{"formatted":"$100.00","decimal":"100"},"confirmation_code":"0-0000-0-0000-0000","date_time":"2018-10-03T11:01:11.057-05:00","summary_data":{"field":[{"name":"date_id","header":"false","label":"Transaction Date:","value":"1/0/201"},{"name":"section-header","header":"true","label":"Gift Information","value":{}},{"name":"level_id","header":"false","label":"Amount:","value":"$100.00"},{"name":"section-header","header":"true","label":"Billing Information","value":{}},{"name":"billing.name.first","header":"false","label":"Billing First Name:","value":"John"},{"name":"billing.name.last","header":"false","label":"Billing Last Name:","value":"Doe"},{"name":"section-header","header":"true","label":"Payment Information","value":{}},{"name":"payment_type","header":"false","label":"Payment Type:","value":"Credit Card"},{"name":"card_number","header":"false","label":"Credit Card Number:","value":"***************1111"}]},"reward_points_earned":"100","value_of_goods":{"formatted":"$0.00","decimal":"0"},"cons_id":"1006789","tax_deductible_amount":{"formatted":"$100.00","decimal":"100"}}}}