Webhooks (API)
Updated over a week ago

Webhooks

Anedot can post Action Page Submissions, Donations, and Commitment data to other applications in real-time when there's a change in your Anedot fundraising account.

Webhooks allow an application to be notified of changes in Anedot. They are intended to provide an efficient way for integrations that react to creations or state changes in Anedot. Allow your integration to take action only when something is created or changed.

You will need to set up an endpoint URL to accept POST JSON requests.

Signatures are provided for each webhook request to verify the authenticity of the request. Verify the signature by producing a SHA-256 HMAC hexdigest using the webhook's secret token as the private key and the webhook body represented as a JSON string. The hexdigest you calculate should match the value in our "X-Request-Signature" header for that webhook request.


Webhook Objects

  • Submission - Immutable required container with lead information, and 1 or more donation entries if available.

  • Donation - Immutable, hosted gift, recurrence of a commitment, or payment.

  • Product - Immutable product description optional associated with a donation and submission.

  • Commitment - Mutable optional commitment from donor to be charged on a scheduled interval.


Webhook Events

Subscribing to events for more than one of the above objects on a single webhook will trigger the webhook once for each object (e.g., a submission with a donation would trigger the webhook twice, once with the Submission payload and once with the Donation payload).

Setting Name

event

Description

Commitment Created

commitment_created

A new recurring commitment was created

Commitment Failed To Process

commitment_failed_to_process

A recurrence of a commitment failed to charge the donor an automated donation

Commitment Updated

commitment_updated

Changes were made to commitment, name, address, amount, or schedule frequency, or commitment canceled

Donation ACH Returned

donation_ach_returned

Check return

Donation Chargeback

donation_chargeback

Check chargeback

Donation Chargeback Reversed

donation_chargeback_reversed

Chargeback reversed

Donation Completed

donation_completed

Successful donation from a submission or commitment

Donation Partially Refunded

donation_partially_refunded

Refund less than the full donation amount

Donation Refunded

donation_refunded

Full refund, with or without fees

Donation Voided

donation_voided

Donation void occurred, no charge was made

Submission Created

submission_created

A new submission was created

Donation Settled

settlement_date

Associated settlement was completed

Payload Message Examples:

attribute examples

format

example value

submission_id

uuid

f42e7e4f-c93d-4956-a5a2-efab4eef4558

event_date

ISO UTC date

2020-12-11 22:06:26 UTC

net_amount

decimal money as string

23.70

Donation Created via Donation Page:

amount_in_dollars

full amount of donation or payment

net_amount

payment minus fees

commitment_uid

if present associated commitment

origin

hosted if via form, recurring if via commitment schedule

custom_field_responses

example radio custom field

products > internal_identifier

Product id or SKU created via Action Pages > Products

created_at

Original submission date (UTC)

updated_at

Any subsequent changes to a message payload (UTC)

Other Commitment Attributes of Interest:

attribute

value

explanation

cancellation_reason

failure

When a commitment is canceled because of multiple declines

account_cancellation

Indicates that an account admin canceled a commitment

schedule

Indicates that the commitment had a set expiration date that passed

nil

Indicates that an Anedot staff member canceled a commitment at a donor's request

donor

Indicates that the donor canceled their commitment.

whodunnit

email of user

Indicates the user that made a change to the commitment. Nil if changed internally by Anedot.

payment_status_message

varies

Relays a value from the payment provider first-time payment is declined on a recurring.


Action Page Webhook Templates

While the Submissions, Donations, and Commitments templates share several common properties, they are not identical.

For that reason, it is not recommended to subscribe to different template types on the same webhook.

Create a new webhook for each template type (use one webhook for Submissions, one for Donations, etc).


Submission Template

{
"account_name": "{{account_name}}",
"account_uid": "{{account_uid}}",
"action_page_id": "{{action_page_id}}",
"action_page_name": "{{action_page_name}}",
"address_line_1": "{{address_line_1}}",
"address_line_2": "{{address_line_2}}",
"address_city": "{{address_city}}",
"address_region": "{{address_region}}",
"address_postal_code": "{{address_postal_code}}",
"address_country": "{{address_country}}",
"card_type": "{{card_type}}",
"card_last_digits": "{{card_last_digits}}",
"card_expiration": "{{card_expiration}}",
"communications_consent_email": "{{communications_consent_email}}",
"communications_consent_phone": "{{communications_consent_phone}}",
"created_at": "{{created_at}}",
"currently_employed": "{{currently_employed}}",
"custom_field_responses": "<<custom_field_responses>>",
"donation_amount": "{{donation_amount}}",
"donations": "<<donations>>",
"donor_profile_id": "{{donor_profile_id}}",
"email": "{{email}}",
"employer_name": "{{employer_name}}",
"first_name": "{{first_name}}",
"id": "{{id}}",
"ip_address": "{{ip_address}}",
"last_name": "{{last_name}}",
"middle_name": "{{middle_name}}",
"occupation": "{{occupation}}",
"payment_method_type": "{{payment_method_type}}",
"phone": "{{phone}}",
"product_code": "{{product_code}}",
"product_id": "{{product_id}}",
"product_name": "{{product_name}}",
"product_value": "{{product_value}}",
"referrer": "{{referrer}}",
"referrer_to_form": "{{referrer_to_form}}",
"source_code": "{{source_code}}",
"suffix": "{{suffix}}",
"title": "{{title}}",
"updated_at": "{{updated_at}}",
"utm_campaign": "{{utm_campaign}}",
"utm_content": "{{utm_content}}",
"utm_medium": "{{utm_medium}}",
"utm_source": "{{utm_source}}",
"utm_term": "{{utm_term}}"
}


Donation Template

{
"account_name": "{{account_name}}",
"account_uid": "{{account_uid}}",
"submission_id": "{{submission_id}}",
"donation": "<<donation>>",
"origin": "{{origin}}",
"commitment_uid": "{{commitment_uid}}",
"event_amount": "{{event_amount}}",
"amount_in_dollars": "{{amount_in_dollars}}",
"net_amount": "{{net_amount}}",
"frequency": "{{frequency}}",
"action_page_id": "{{action_page_id}}",
"action_page_name": "{{action_page_name}}",
"donor_profile_id": "{{donor_profile_id}}",
"payment_method_id": "{{payment_method_id}}",
"created_at": "{{created_at}}",
"updated_at": "{{updated_at}}",
"address_line_1": "{{address_line_1}}",
"address_line_2": "{{address_line_2}}",
"address_city": "{{address_city}}",
"address_region": "{{address_region}}",
"address_postal_code": "{{address_postal_code}}",
"address_country": "{{address_country}}",
"email": "{{email}}",
"phone": "{{phone}}",
"first_name": "{{first_name}}",
"last_name": "{{last_name}}",
"middle_name": "{{middle_name}}",
"occupation": "{{occupation}}",
"employer_name": "{{employer_name}}",
"title": "{{title}}",
"suffix": "{{suffix}}",
"ip_address": "{{ip_address}}",
"referrer": "{{referrer}}",
"referrer_to_form": "{{referrer_to_form}}",
"source_code": "{{source_code}}",
"custom_field_responses": "<<custom_field_responses>>",
"communications_consent_email": "{{communications_consent_email}}",
"communications_consent_phone": "{{communications_consent_phone}}",
"currently_employed": "{{currently_employed}}",
"check_number": "{{check_number}}",
"commitment_recurring_until": "{{commitment_recurring_until}}",
"date": "{{date}}",
"name": "{{name}}",
"payment_description": "{{payment_description}}",
"recurring": "{{recurring}}",
"is_recurring_commitment": "{{is_recurring_commitment}}",
"source": "{{source}}",
"status": "{{status}}"
}


Commitment Template

{
"id": "{{id}}",
"total_amount_in_dollars": "{{total_amount_in_dollars}}",
"fund_allocations": "<<fund_allocations>>",
"next_capture_on": "{{next_capture_on}}",
"cancelled_on": "{{cancelled_on}}",
"token": "{{token}}",
"frequency": "{{frequency}}",
"action_page_id": "{{action_page_id}}",
"action_page_name": "{{action_page_name}}",
"donor_profile_id": "{{donor_profile_id}}",
"payment_method_id": "{{payment_method_id}}",
"submission_id": "{{submission_id}}",
"created_at": "{{created_at}}",
"updated_at": "{{updated_at}}",
"address_line_1": "{{address_line_1}}",
"address_line_2": "{{address_line_2}}",
"address_city": "{{address_city}}",
"address_region": "{{address_region}}",
"address_postal_code": "{{address_postal_code}}",
"address_country": "{{address_country}}",
"email": "{{email}}",
"phone": "{{phone}}",
"first_name": "{{first_name}}",
"last_name": "{{last_name}}",
"middle_name": "{{middle_name}}",
"occupation": "{{occupation}}",
"employer_name": "{{employer_name}}",
"title": "{{title}}",
"suffix": "{{suffix}}",
"ip_address": "{{ip_address}}",
"referrer": "{{referrer}}",
"referrer_to_form": "{{referrer_to_form}}",
"communications_consent_email": "{{communications_consent_email}}",
"communications_consent_phone": "{{communications_consent_phone}}",
"currently_employed": "{{currently_employed}}",
"payment_status_message": "{{payment_status_message}}",
"changed_attributes": "<<changed_attributes>>",
"cancellation_reason": "{{cancellation_reason}}",
"whodunnit": "{{whodunnit}}"
}


Example Messages

Submission Created

{
"event": "submission_created",
"payload": {
"account_name": "Washington for President",
"account_uid": "ad603181ae28962ff2611",
"action_page_id": "991bd598-f047-4719-ace6-f6ec46123e4b",
"action_page_name": "Donation Page 3",
"address_line_1": "123 Somewhere Way",
"address_line_2": "",
"address_city": "Aneware",
"address_region": "TX",
"address_postal_code": "75409",
"address_country": "US",
"card_type": "visa",
"card_last_digits": "4242",
"card_expiration": "02/2023",
"communications_consent_email": "",
"communications_consent_phone": "",
"created_at": "2022-03-31 15:38:56 UTC",
"currently_employed": "",
"custom_field_responses": {
"appeal_id": "1",
"batch_prefix": "ANE"
},
"donation_amount": "$33.10",
"donations": [
{
"id": "d412f04fddbe6b4dbb456",
"fees": {
"anedot_fees": {
"amount": "1.09"
},
"vendor_fees": []
},
"fees_paid_by_donor": "false",
"fund": {
"id": "3bfe8049-aa5a-4db1-840c-c1ede521dd5c",
"identifier": "1412",
"name": "General Fund"
},
"gross_amount": "19.86",
"net_amount": "18.77",
"product": {}
},
{
"id": "db40ee7bd45a80ab1347e",
"fees": {
"anedot_fees": {
"amount": "0.83"
},
"vendor_fees": []
},
"fees_paid_by_donor": "false",
"fund": {
"id": "b39b768f-3874-46cd-be10-042a18d2b174",
"identifier": "1412",
"name": "Multifunded"
},
"gross_amount": "13.24",
"net_amount": "12.41",
"product": {}
}
],
"donor_profile_id": "",
"email": "[email protected]",
"employer_name": "",
"first_name": "Gandy",
"id": "f0bb1f8d-cebc-4f00-921a-46006306c6ee",
"ip_address": "127.0.0.1",
"last_name": "Grey",
"middle_name": "",
"occupation": "",
"payment_method_type": "credit_card",
"phone": "9036341111",
"product_code": "",
"product_id": "",
"product_name": "",
"product_value": "",
"referrer": "http://secure.anedot.me:3000/washington/991bd598-f047-4719-ace6-f6ec46123e4b",
"referrer_to_form": "http://secure.anedot.me:3000/washington/991bd598-f047-4719-ace6-f6ec46123e4b",
"source_code": "",
"suffix": "",
"title": "",
"updated_at": "2022-03-31 15:38:57 UTC",
"utm_campaign": "",
"utm_content": "",
"utm_medium": "",
"utm_source": "",
"utm_term": ""
}
}

Donation Completed

{
"event": "donation_completed",
"payload": {
"submission_id": "f42e7e4f-c93d-4956-a5a2-efab4eef4558",
"donation": {
"id": "d467208a8376024eacd71",
"donation_project": "",
"products":
[
{
"internal_identifier": "dl332",
"name": "Slipper"
}
],
"fees": {
"anedot_fees": {
"amount": "1.30"
},
"vendor_fees": []
}
},
"origin": "hosted",
"commitment_uid": "e1c696e4-4b7d-443b-a69d-1eb1f7027e29",
"event_amount": "25.00",
"amount_in_dollars": "25.0",
"net_amount": "23.70",
"frequency": "once",
"action_page_id": "e8f8f185-9a94-4fec-8c9c-974065b4db75",
"action_page_name": "New Donation Page",
"donor_profile_id": "",
"payment_method_id": "9d19c94c-8249-4a26-b1aa-299a423bc852",
"created_at": "2020-12-11 22:06:25 UTC",
"updated_at": "2020-12-11 22:06:26 UTC",
"address_line_1": "143 S 3rd St",
"address_line_2": "",
"address_city": "Philadelphia",
"address_region": "PA",
"address_postal_code": "19106",
"address_country": "US",
"email": "[email protected]",
"phone": "5552221212",
"first_name": "Susan",
"last_name": "Anthony",
"middle_name": "",
"occupation": "",
"employer_name": "",
"title": "",
"suffix": "",
"ip_address": "10.0.0.1",
"recurring": "true",
"is_recurring_commitment": "true",
"referrer": "https://secure.anedot.com/example/slug",
"referrer_to_form": "",
"custom_field_responses": {
"turn_up": "Option One"
},
"communications_consent_email": "",
"communications_consent_phone": "",
"currently_employed": ""
}
}

Donation Voided

{
"event": "donation_voided",
"payload": {
"submission_id": "f42e7e4f-c93d-4956-a5a2-efab4eef4558",
"donation": {
"id": "d467208a8376024eacd71",
"donation_project": "",
"products": [
{
"internal_identifier": "dl332",
"name": "Slipper"
}
],
"fees": {
"anedot_fees": {
"amount": "-1.30"
},
"vendor_fees": []
}
},
"origin": "hosted",
"commitment_uid": "e1c696e4-4b7d-443b-a69d-1eb1f7027e29",
"event_amount": "-25.00",
"amount_in_dollars": "25.0",
"net_amount": "-23.70",
"frequency": "once",
"action_page_id": "e8f8f185-9a94-4fec-8c9c-974065b4db75",
"action_page_name": "New Donation Page",
"donor_profile_id": "",
"payment_method_id": "9d19c94c-8249-4a26-b1aa-299a423bc852",
"created_at": "2020-12-11 22:06:25 UTC",
"updated_at": "2020-12-11 22:06:26 UTC",
"address_line_1": "143 S 3rd St",
"address_line_2": "",
"address_city": "Philadelphia",
"address_region": "PA",
"address_postal_code": "19106",
"address_country": "US",
"email": "[email protected]",
"phone": "5552221212",
"first_name": "Susan",
"last_name": "Anthony",
"middle_name": "",
"occupation": "",
"employer_name": "",
"title": "",
"suffix": "",
"ip_address": "2600:100c:b01f:815d:456d:5903:4547:f517",
"referrer": "https://secure.anedot.com/mje-test/slug",
"referrer_to_form": "",
"custom_field_responses": {
"turn_up": "Option One"
},
"communications_consent_email": "",
"communications_consent_phone": "",
"currently_employed": ""
}
}

Commitment Failed to Process

{
"event": "commitment_failed_to_process",
"payload": {
"id": "c89cc126-853d-42ec-85dd-d56834722413",
"total_amount_in_dollars": "10.3",
"fund_allocations": [
{
"amount_in_dollars": "10.3",
"fund": {
"id": "3bfe8049-aa5a-4db1-840c-c1ede521dd5c",
"identifier": "95263a32-4dc8-4e41-8ea1-174d527472f9",
"name": "General Fund"
}
}
],
"next_capture_on": "2021-04-03 12:55:10 UTC",
"cancelled_on": "",
"expired_on": "",
"failed_on": "",
"paused_on": "",
"token": "1500139abd7729e85079362ae4a8c768cd5d0b70",
"frequency": "monthly",
"action_page_id": "b9cb82d0-2e19-4ff1-9cf1-3a8a4b8f02ce",
"action_page_name": "Commitment Page",
"donor_profile_id": "",
"payment_method_id": "952219f9-b345-46c2-9e88-c362e4ba626f",
"submission_id": "3af17864-9db0-4083-b18b-d88d043266dc",
"created_at": "2021-01-03 12:55:10 UTC",
"updated_at": "2021-03-17 16:44:50 UTC",
"address_line_1": "123 Pelinor Way",
"address_line_2": "",
"address_city": "Pelinor",
"address_region": "TX",
"address_postal_code": "76545",
"address_country": "US",
"email": "[email protected]",
"phone": "8765456789",
"first_name": "Gandalf",
"last_name": "Thegrey",
"middle_name": "",
"occupation": "retired",
"employer_name": "",
"title": "",
"suffix": "",
"ip_address": "127.0.0.1",
"referrer": "http://secure.anedot.me:3000/washington/b9cb82d0-2e19-4ff1-9cf1-3a8a4b8f02ce",
"referrer_to_form": "",
"communications_consent_email": "",
"communications_consent_phone": "",
"currently_employed": "false",
"payment_status_message": "Declined",πŸ‘ˆ
"changed_attributes": {},
"cancellation_reason": "",
"whodunnit": ""
}
}

Commitment Updated with Cancellation Reason

{
"event": "commitment_updated",
"payload": {
"id": "c89cc126-853d-42ec-85dd-d56834722413",
"total_amount_in_dollars": "10.3",
"fund_allocations": [
{
"amount_in_dollars": "10.3",
"fund": {
"id": "3bfe8049-aa5a-4db1-840c-c1ede521dd5c",
"identifier": "95263a32-4dc8-4e41-8ea1-174d527472f9",
"name": "General Fund"
}
}
],
"next_capture_on": "2021-04-03 12:55:10 UTC",
"cancelled_on": "2021-03-17 00:00:00 UTC",
"expired_on": "",
"failed_on": "",
"paused_on": "",
"token": "1500139abd7729e85079362ae4a8c768cd5d0b70",
"frequency": "monthly",
"action_page_id": "b9cb82d0-2e19-4ff1-9cf1-3a8a4b8f02ce",
"action_page_name": "Commitment Page",
"donor_profile_id": "",
"payment_method_id": "952219f9-b345-46c2-9e88-c362e4ba626f",
"submission_id": "3af17864-9db0-4083-b18b-d88d043266dc",
"created_at": "2021-01-03 12:55:10 UTC",
"updated_at": "2021-03-17 16:52:48 UTC",
"address_line_1": "123 Pelinor Way",
"address_line_2": "",
"address_city": "Pelinor",
"address_region": "TX",
"address_postal_code": "76545",
"address_country": "US",
"email": "[email protected]",
"phone": "8765456789",
"first_name": "Gandalf",
"last_name": "Thegrey",
"middle_name": "",
"occupation": "retired",
"employer_name": "",
"title": "",
"suffix": "",
"ip_address": "127.0.0.1",
"referrer": "http://secure.anedot.me:3000/washington/b9cb82d0-2e19-4ff1-9cf1-3a8a4b8f02ce",
"referrer_to_form": "",
"communications_consent_email": "",
"communications_consent_phone": "",
"currently_employed": "false",
"payment_status_message": "",
"changed_attributes": {
"cancelled_on": [
null,
"2021-03-17 00:00:00 UTC"
],
"updated_at": [
"2021-03-17 16:44:50 UTC",
"2021-03-17 16:52:48 UTC"
]
},
"cancellation_reason": "failure",πŸ‘ˆ
"whodunnit": ""
}
}

Did this answer your question?