← All webhook events

Subscribe to donation.created

A donor initiates a donation - UPI, card or net-banking. Fires BEFORE payment confirmation, so a paired donation.paid listener is required to credit your ledger.

When does donation.created fire?

A donor lands on a checkout flow and submits payment intent. The donation row exists in the database with status='pending'; the gateway has been called but hasn't confirmed payment yet.

What developers build with it

  • Pre-populate a thank-you queue ready to fire on .paid
  • Real-time fundraising dashboards showing live donation attempts
  • Anti-fraud screening before the payment clears
  • Wallet / loyalty-points accrual prep

Sample payload

The full envelope (with HMAC-SHA256 signature, delivery UUID and headers) is documented on the webhooks hub page. Below is the per-event data block for donation.created:

{
    "donation_id": 12345,
    "ngo_id": 7,
    "donor": {
        "id": 482,
        "name": "Vandana Kapoor",
        "email": "vandana@example.com",
        "phone": "+919876543210",
        "pan": "ABCDE1234F"
    },
    "amount": 5000,
    "currency": "INR",
    "campaign_id": 18,
    "status": "pending",
    "payment_method": "upi",
    "created_at": "2026-05-15T10:23:14+05:30"
}

Subscribe to this event

From your NGO dashboard, head to System · Webhooks · Add new. Paste your HTTPS endpoint, copy the signing secret, tick donation.created in the events list, save. The first matching event fires within seconds. Verify the X-Donateazy-Signature header on every request.

// PHP example - drop into your webhook receiver
$raw = file_get_contents('php://input');
$expected = hash_hmac('sha256', $raw, $WEBHOOK_SECRET);
if (! hash_equals($expected, $_SERVER['HTTP_X_DONATEAZY_SIGNATURE'] ?? '')) {
    http_response_code(401); exit;
}

$payload = json_decode($raw, true);
if ($payload['event'] !== 'donation.created') {
    http_response_code(202); exit; // not for this handler
}

// $payload['data'] is the block documented above.
handleDonationCreated($payload['data'], $payload['id']);
http_response_code(200);

Build your first integration in 10 minutes.

Webhooks ship on Pro and above. Full API reference, signature verification and idempotency on the hub.

Read the full reference See pricing
Chat with us