Donation Payload

This document describes the Action Network webhook payload for donations.

Donations represent the action an activist took when they filled out and donated on a specific fundraiser on Action Network (called fundraising pages on the API), donations POSTed to fundraising pages over the API, transactions uploaded as part of a transaction upload, or manually entered donations from our user interface.

The donation format is closely related to the record donation helper and donation resources on the Action Network API. Please refer to that documentation for a fuller explanation of fields, format, and how they relate to other resources.

Donations are linked to the person resource corresponding to the activist who donated, as well as the fundraising page that was used to donate.

Sections:

Type

Donation events are identified by their type, which is the JSON closure that surrounds the hash in the POSTed array.

The donation type is osdi:donation.

Back To Top ↑

Field names and descriptions

Donation fields:
Field Name Type Description
identifiers strings[] An array of identifiers in the format [system name]:[id]. See the general concepts document for more information about identifiers.
created_date datetime The date and time the resource was created.
modified_date datetime The date and time the resource was last modified.
amount string The amount of money donated.
currency string ISO 4217 designation of currency used to donate.
recipients Recipients[] An array of hashes identifying the recipients of the donation.
payment Payment A hash of payment information about this donation for reporting purposes.
action_network:recurrence Recurrence A hash of details about the recurring nature of this donation. Action Network-only.
action_network:referrer_data Referrer Data A hash of referrer data such as source code and referrer code. Action Network-only.
person Person* A hash representing person data to associate with this donation. Contains only the fields entered by the activist when they created the donation, not full fields on their record. See the people document for more information about people.
add_tags strings[] An array of strings representing tags that were added to the person's record during this donation. Note: The person may have already had these tags applied to their record before taking action, and in a network these tags may not exist on parent groups. This array only represents what tags were attempted to be added to the person's record, not the actual result of those operations.
action_network:sponsor Sponsor A hash of sponsor data indicating the sponsor (if the group sponsored the action) or referrer (if the group used their referrer code to send activists to take action). Useful for determining where in a network the event originated. Action Network-only.
idempotency_key string A hash of webhook message id. Unique per webhook message, consistent across retries.
Recipient fields:
Field Name Type Description
display_name string The name of the recipient of this part of the donation.
amount string The amount donated to this recipient. Will be added together with other recipient amounts to come up with the amount field above.
Payment fields:
Field Name Type Description
method enum The method of payment. One of ['Credit Card' 'Check' 'Cash' 'Electronic Funds Transfer']. System generated, always Credit Card.
reference_number string A check number, transaction ID, or some other information referencing the payment. System generated.
authorization_stored boolean Indicates if payment information has been stored for future automatic payments. System generated.
Recurrence fields:
Field Name Type Description
recurring boolean Indicates whether this is a recurring donation or not.
period enum Indicates the frequency with which this donation recurs. One of ['Weekly' 'Monthly' 'Every 3 Months' 'Yearly'].
Referrer Data fields:
Field Name Type Description
source string The source code of this donation. Equivalent to someone taking action with the url argument ?source=[your source]. Corresponds to the sources chart in this action's manage page. Action Network-only.
referrer string The referrer code of this donation. Equivalent to someone taking action with the url argument ?referrer=[your referrer code]. Must be a valid Action Network referrer code. Read-only. Corresponds to the referrers chart in this action's manage page. Action Network-only.
website string The website referrer for this donation. Equivalent to someone taking action after clicking a link on the listed website. Action Network-only.
Sponsor fields:
Field Name Type Description
title string The name of the sponsoring or referring group.
browser_url string The URL to the group's public page.
Back To Top ↑

Links

Link Name Description
self A link to this individual donation resource. Click here for donation documentation.
osdi:person A link to the person who made this donation. Click here for people documentation.
osdi:fundraising_page A link to the fundraising page this donation was left on. Note: If this donation was created via a referral code, this link may not be accessible because your API key does not give you permission to access the fundraising page itself. Click here for fundraising page documentation.
Back To Top ↑

Related resources

Back To Top ↑

Example

If an activist takes action on a fundraiser and your webhook's trigger matches the event, a donation webhook payload like the below will be fired off to your server's webhook URL. The below example does not show all possible fields. As noted in the webhooks documentation, only fields that were entered by the activist while taking action will be included in the payload.

Request

						
POST https://your-webhook-url.com

Header:
Content-Type: application/json


[
  {
    "osdi:donation": {
      "created_date": "2018-11-07T19:49:26Z",
      "modified_date": "2018-11-07T19:49:26Z",
      "currency": "USD",
      "amount": "20.01",
      "recipients": [
        {
          "display_name": "John Doe",
          "amount": "6.67"
        },
        {
          "display_name": "Progressive Action Now",
          "amount": "6.67"
        },
        {
          "display_name": "Jane Black",
          "amount": "6.67"
        }
      ],
      "payment": {
        "method": "Credit Card",
        "reference_number": "f1119c4e-b8ca-44ff-bfa7-f78f7ca3ec16",
        "authorization_stored": false
      },
      "action_network:recurrence": {
        "recurring": true,
        "period": "Monthly"
      },
      "identifiers": [
        "action_network:32b6df18-014f-4e0c-b112-f1bacfc41a61"
      ],
      "person": {
        "created_date": "2018-11-07T17:56:40Z",
        "modified_date": "2018-11-07T19:46:40Z",
        "family_name": "Smith",
        "postal_addresses": [
          {
            "primary": true,
            "address_lines": [
              "1600 Pennsylvania Ave NW"
            ],
            "locality": "Washington",
            "postal_code": "20036",
            "region": "District of Columbia",
            "country": "US",
            "location": {
              "latitude": 41.2967,
              "longitude": -73.6698,
              "accuracy": "Approximate"
            }
          }
        ],  
        "email_addresses": [
          {
            "primary": true,
            "address": "jsmith@mail.com",
            "status": "subscribed"
          }
        ],
        "phone_numbers": [
          {
            "primary": true,
            "number": "12024444444",
            "number_type": "Mobile",
            "status": "subscribed"
          }
        ],
        "languages_spoken": [
          "en"
        ],
        "custom_fields": {
          "phone_number": "123.456.7890"
        }
      },
      "action_network:referrer_data": {
        "source": "facebook"
      },
      "add_tags": [
        "volunteer",
        "member"
      ],
      "_links": {
        "self": {
          "href": "https://actionnetwork.org/api/v2/fundraising_pages/48de2ac1-2398-41db-8d19-699e23bec035/donations/32b6df18-014f-4e0c-b112-f1bacfc41a61"
        },
        "osdi:fundraising_page": {
          "href": "https://actionnetwork.org/api/v2/fundraising_pages/48de2ac1-2398-41db-8d19-699e23bec035"
        },
        "osdi:person": {
          "href": "https://actionnetwork.org/api/v2/people/0df69aaf-3614-4315-b73a-088866b404e8"
        }
      }
    },
    "action_network:sponsor": {
      "title": "Progressive Action Now",
      "url": "https://actionnetwork.org/groups/progressive-action-now"
    },
   "idempotency_key": "1679091c5a880faf6fb5e6087eb1b2dcdon"
  }
]
					
Back To Top ↑