AES Webhooks

Updated by Jon Doehling

AES webhooks

AES uses webhooks to let your application know when events happen, such as receiving a New Sale or New Payment. When the event occurs, AES makes an HTTP request (POST) to the URL you provide for the webhook. AES's request will include details of the event such as the contributor ID and eventcontributor ID, and details about the purchase and/or payment.

To handle a webhook you only need to build a small web application that can accept the HTTP requests. If you already have a web application set up, handling a webhook is usually as easy as adding a new URL to your application.

All requests will be formatted in JSON.

Validate that webhook requests are coming from AES

Once you have AES sending requests to your web application, you may start validating that your incoming webhooks are actually from AES. This ensures that third parties can't issue requests to your webhook URL. AES signs each HTTP request to your web application with an AES-SIGNATURE HTTP header. The signature uses the HMAC-SHA1 in hex format hashing algorithm with your AES API KEY as the secret key.

Additional header information

You may also choose to configure incoming webhooks to include aditional header Key/Value pairs. This can be useful if you wish to include additional information in each call to identify AES as the sender.

Purchase webhook

The request will contain information about the purchase, including event, contributor, sale and payment data. This is fired from the AES ticketing microsite upon sucessful completion of checkout.

Requests can be validated in the application logs found at /logs/elp.webhooks.txt

Field

Detail

event_id

Unique identifyer for the event

Contributor array

These values can be used to retrieve detailed inforamtion about the person making the purchase via the /getContributor and /getEventContributor API calls.

Field

Detail

event_contributor_id

Unique identifyer for the event contributor

contributor_id

Unique identifyer for the contributor

first_name

Contributor first name

last_name

Contributor last name

email

Contributor email address

address1

Contributor first line address

address2

Contributor second line address

country

Contributor country

city

Contributor city

state

Contributor state

zip

Contributor zip code

contributor_types

Contributor types

company_individual

Company or Individual designation

company

Company name

Sales array

Field

Multi-Unit Packages

General and Checkout Donations

package_number

Package number for the event

null

package_id

Unique Package ID

null

purchase_id

‘MU’ + internal unique identifier for the sale

‘DON’ + internal unique identifier for the sale

package_name

Short description field of the package

null

category_name

Name of the package category

null

type_name

Name of the package type

  • Registration Extras
  • Tickets and Admission
  • Donation
  • Multi-unit
  • Sponsorship

“Donation“

admissions

Total admissions (qty * admission per package)

0 (zero)

quantity

Quantity purchased

1 (one)

amount

Total sale including tax (qty * amt)

Donation Amount

timestamp

Date/time of the sale

Date/time of the sale

value

Total value (qty * unit value)

0 (zero)

is_checkout_donation

always false

True for round-up and processing fee donations, otherwise, false.

Payments array

Field

Credit Card

Check

Cash

payment_id

Unique identifier

Unique identifier

Unique identifier

payment_type

“CREDIT CARD”

“CHECK”

“CASH”

payment_amount

Amount field

Amount field

Amount field

check_number

null

Check Number

null

masked_card

Masked credit card number

null

null

cardholder_name

Cardholder name

null

null

expiration_date

Expiration date field

null

null

payment_date_time

Date/time of the payment

Date/time of the payment

Date/time of the payment

credit_card_type

VISA, DSC, AMEX or MC

null

null

Sample call

{
"event_id": 2503,
"contributor": {
"event_contributor_id": 75737,
"contributor_id": 39484,
"first_name": "Test",
"last_name": "Country",
"email": "jon@aes-oc.com",
"address1": "7 Cottage Hill Ln",
"address2": "#123",
"country": "United States of America",
"city": "Ladera Ranch",
"state": "CALIFORNIA",
"zip": "92694",
"contributor_types": [
"Patron",
"Online"
],
"company_indivual": "company"
},
"payments": [
{
"payment_id": 5317,
"payment_type": "CREDIT CARD",
"payment_amount": 10.38,
"check_number": null,
"masked_card": "************2220",
"cardholder_name": "country test",
"expiration_date": "01/2023",
"payment_date_time": "2021-05-04T19:53:41.273",
"credit_card_type": "VISA"
}
],
"purchases": [
{
"purchase_id": "DON78188",
"package_id": 0,
"package_number": null,
"package_name": null,
"category_name": null,
"type_name": "Donation",
"admissions": 0,
"quantity": 1,
"amount": 10,
"date": "2021-05-04T19:53:41.847",
"value": 0,
"is_checkout_donation": false
},
{
"purchase_id": "DON78189",
"package_id": 0,
"package_number": null,
"package_name": null,
"category_name": null,
"type_name": "Donation",
"admissions": 0,
"quantity": 1,
"amount": 0.38,
"date": "2021-05-04T19:53:41.857",
"value": 0,
"is_checkout_donation": true
}
]
}


How did we do?