Skip to main content
Coming Soon - Webhook functionality is currently in development. This page documents the planned implementation.

Overview

The transaction.updated event is triggered when details of an existing transaction are modified. This can include changes to donor information, transaction notes, or other editable fields.

When This Event Fires

  • Admin updates donor information on a transaction
  • Transaction note or message is added/edited
  • Transaction is marked as disputed
  • Custom fields are added or modified
  • Any other editable transaction field is changed
This event does not fire for status changes like refunds. Use transaction.refunded for refund events.

Webhook Payload

{
  "id": "evt_def456ghi789",
  "type": "transaction.updated",
  "created_at": "2024-01-16T14:22:00Z",
  "data": {
    "id": "txn_123456789",
    "amount": 5000,
    "currency": "USD",
    "status": "completed",
    "type": "donation",
    "payment_method": "card",
    "fee_covered": true,
    "gross_amount": 5000,
    "fee_amount": 250,
    "net_amount": 4750,
    "donor": {
      "id": "cont_987654321",
      "first_name": "Jane",
      "last_name": "Smith",
      "email": "[email protected]",
      "phone": "+1234567890"
    },
    "campaign": {
      "id": "camp_abc123",
      "title": "Annual Gala 2024",
      "url": "https://givebutter.com/annual-gala-2024"
    },
    "note": "In memory of John Smith - Updated with correct spelling",
    "anonymous": false,
    "updated_fields": ["donor.last_name", "donor.email", "note"],
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-16T14:22:00Z"
  },
  "account_id": "acct_xyz789"
}

Event Data Fields

id
string
required
Unique identifier for the transaction (prefixed with txn_)
amount
integer
required
Transaction amount in cents (e.g., 5000 = $50.00)
currency
string
required
Three-letter ISO currency code (e.g., USD, CAD, EUR)
status
string
required
Current transaction status: completed, pending, disputed, or failed
type
string
required
Type of transaction: donation, ticket, merchandise, registration, or other
payment_method
string
required
Payment method used: card, paypal, venmo, ach, google_pay, or daf
fee_covered
boolean
required
Whether the donor chose to cover processing fees
gross_amount
integer
required
Total amount including fees (in cents)
fee_amount
integer
required
Processing fee amount (in cents)
net_amount
integer
required
Net amount after fees (in cents)
donor
object
required
Information about the supporter who made the transaction
campaign
object
required
Campaign the transaction belongs to
note
string
Optional message or note left by the donor
anonymous
boolean
required
Whether the donor chose to remain anonymous
updated_fields
array
required
List of field paths that were changed (e.g., ["donor.email", "note"])
created_at
string
required
ISO 8601 timestamp when the transaction was originally created
updated_at
string
required
ISO 8601 timestamp when the transaction was last updated

Common Use Cases

Keep external systems updated when donor information changes:
async function handleTransactionUpdated(event) {
  const { donor, updated_fields } = event.data;

  // Only sync if donor fields changed
  const donorFieldsChanged = updated_fields.some(field => field.startsWith('donor.'));

  if (donorFieldsChanged) {
    await crm.updateContact(donor.id, {
      email: donor.email,
      firstName: donor.first_name,
      lastName: donor.last_name,
      phone: donor.phone
    });
  }
}
Log when transactions are modified for audit purposes:
async function handleTransactionUpdated(event) {
  const { id, updated_fields, updated_at } = event.data;

  await auditLog.create({
    event_type: 'transaction_updated',
    transaction_id: id,
    fields_changed: updated_fields,
    timestamp: updated_at,
    source: 'givebutter_webhook'
  });
}
Send updated receipt when donor information is corrected:
async function handleTransactionUpdated(event) {
  const { donor, updated_fields, amount, campaign } = event.data;

  // If email changed, send receipt to new address
  if (updated_fields.includes('donor.email')) {
    await sendEmail({
      to: donor.email,
      subject: `Updated receipt for your donation to ${campaign.title}`,
      body: `Your donation receipt has been updated with your current email address.`,
      amount: amount / 100
    });
  }
}