Online Giving Webhooks
If your church keeps its own church management, accounting or donor system, webhooks keep it current without imports. Each time a gift or payment comes in, OnlineGiving.org sends the details to a web address you choose, within seconds. Your system records it, and if it is later refunded or returned by the bank, your system hears about that too.
Everything lives in the Transaction Webhook Center: your webhook address, the format you receive, a log of every delivery, test events, a payload reference with samples, and copy-ready signature code.
Contents
- Open the Transaction Webhook Center
- Webhooks v1 and v2
- Set up your endpoint
- Events
- What each request contains
- Verify the signature
- Delivery log, retries and resends
- Reconciling with the signed export
- Frequently asked questions
Open the Transaction Webhook Center
In your control panel, go to Giving Settings → Developer → Transaction Webhook Center, or Payments Settings → Developer → Transaction Webhook Center. Both open the same page. From any gift's details you can also choose View in Transaction Webhook Center to see that gift's deliveries.
The Transaction Webhook Center has six tabs: Setup, Delivery Log, Test, Payload Reference, Verify Signatures and Retries & Help.
Webhooks v1 and v2
Webhooks v1 (legacy) sends completed gifts and payments only, in the original format. If your system already receives v1 webhooks, nothing changes until you choose to switch.
Webhooks v2 is what we recommend for new setups. It adds:
- Refunds, ACH returns and cancellations, each naming the original transaction
- An event type on every request, so your system knows what kind of update it is receiving and whether it is a gift or a payment
- A signature on every request, so your system can confirm it came from OnlineGiving.org
- Automatic retries for up to 3 days if your server is down
- A delivery log with your server's responses, plus Retry and Resend
To switch, choose Use Webhooks v2 on the Setup tab. Update your receiver for the v2 format first; the Payload Reference tab shows a sample of every event.
Set up your endpoint
- Enter your webhook address under Webhook URL and choose Save URL. It must start with
https://and be reachable from the internet. - Choose Use Webhooks v2. A signing secret is created for you; use Reveal or Copy to add it to your receiver.
- On the Test tab, pick an event and choose Send test. We post a signed sample marked
"test": trueand show the request we sent and your server's reply right on the page. The tab also has a cURL command for testing a receiver on your own computer.
Your receiver should answer with any 2xx status to confirm. To turn webhooks off, clear the URL and save.
Events
Each request is one event. Its type is <category>.<event>: gift for donations and payment for registrations, store orders, tuition and fees. Each fund line is classified on its own, so one checkout can send both a payment.completed and a gift.completed.
| Event type | When it is sent |
|---|---|
gift.completed | A donation is accepted: card approved, bank (ACH) gift submitted, check or cash entered, or a recurring gift runs |
gift.refunded | A donation is refunded in full or in part, or the church loses a card dispute |
gift.bank_rejected | The donor's bank returns an ACH gift, usually 2 to 5 business days later |
gift.cancelled | A donation that was already sent to you is cancelled or voided |
payment.completed | A payment is accepted: event registration, store order, tuition or fee |
payment.refunded | A payment is refunded in full or in part, or the church loses a card dispute on it |
payment.bank_rejected | The payer's bank returns an ACH payment |
payment.cancelled | A payment that was already sent to you is cancelled or voided |
- Amounts are always positive.
data.amountis the money in the event (the refunded part, for a partial refund). The event type tells you which way it moved: add on*.completed, subtract on the others. - ACH gifts are sent when they are submitted, not when the bank settles. If the bank returns the payment, you receive
*.bank_rejected. - Each reversal names the transaction it reverses in
data.original_transaction_id. For a partial refund,data.partialis true. - A
*.completedevent is always delivered before its reversal, even if your server was down in between. A reversal is only sent for a transaction your endpoint was sent. - A gift split across several funds arrives as separate transactions that share
data.transaction.group_id.
What each request contains
Each event is an HTTPS POST with a JSON body:
id: the delivery id. Retries and resends reuse it, so store it and ignore repeats.type,api_version(2),createdandtestdata.category(giftorpayment),data.amount,data.occurred_at,data.transaction_id,data.original_transaction_idanddata.partialdata.transaction: the transaction record, including ids, amount, dates, status, gift type, fund and sub-fund with fund options, batch, recurring gift, giving page, how the donor heard about you, the text or chat message for text and chat gifts, the processor's transaction id, processing fee and Cover the Fee details. Internal processor data, stored payment tokens and fraud scores are never sent.data.transaction.external_ids: the gift's ids in the church management and accounting systems your account syncs with, using the same names as Webhooks v1, such asf1_idfor Fellowship One orpco_idfor Planning Center. Every key is always sent, withnullwhen the gift has no value for it.data.donor: name, email, phone, address and campusdata.payment_method: type, last four digits, and the check number for paper checks (entered by hand or scanned)data.batch: for cash, check, scanned check and non-cash gifts, the batch on the Batches page, with its name, date and type (checkscan,check,cashornoncashasset)data.non_cash_asset: for stock, crypto, property and other non-cash gifts, the asset type, name, quantity, value, status and dates. For crypto gifts,data.non_cash_asset.cryptoadds the network, the blockchain transaction hash, when the coins arrived and the sale price and total.data.form: the form answers, when the gift came through a form
Dates use your church's timezone (ISO-8601 with offset). Money is a number with two decimals. Every id in the payload is a string, such as "id": "345" and "transaction_id": "345". Treat ids as opaque text and don't convert them to numbers: they may change format or include letters. Postal codes and other stored values are text too, so leading zeros are kept. The Payload Reference tab explains every field and has a full sample of every event that you can copy.
Headers sent with every request:
X-OG-Event: the event typeX-OG-Delivery: the delivery idX-OG-Signature:t=<unix time>,v1=<signature>
Verify the signature
Compute an HMAC-SHA256 of <t>.<raw request body> using your signing secret and compare it with v1 using a constant-time comparison. Use the raw body exactly as received, before parsing the JSON, and reject requests whose t is more than five minutes old.
$body = file_get_contents('php://input');
parse_str(str_replace(',', '&', $_SERVER['HTTP_X_OG_SIGNATURE'] ?? ''), $sig);
$expected = hash_hmac('sha256', $sig['t'] . '.' . $body, getenv('OG_WEBHOOK_SECRET'));
if (abs(time() - (int)$sig['t']) > 300 || !hash_equals($expected, $sig['v1'] ?? '')) {
http_response_code(401);
exit;
}
The Verify Signatures tab has the same check, ready to copy, in PHP, Node.js, Python, Ruby, C#, Java and Go. If you rotate the secret, update your receiver at the same time; signatures made with the old secret stop matching immediately.
Delivery log, retries and resends
With Webhooks v2, every delivery appears in the Delivery Log with its event type, transaction, amount, status, number of attempts and your server's response. Search by transaction number (the transaction and its reversals) or by donor name or email, and filter by date, event type and status.
- Sent: your server answered with a 2xx status.
- Failed: your server answered with an error or did not answer within 15 seconds. We retry automatically, starting after 30 seconds and backing off to once an hour, for up to 3 days.
- Queued: on its way. A reversal also waits here until its completed event has been delivered.
- Skipped: not sent, with the reason shown. For example, a pending gift that is cancelled before it completes is never reported, so its cancellation is skipped as well.
When deliveries have not reached your server, a red bar at the top of the log shows how many, with Retry all. You can also tick rows and choose Retry selected, or press Retry on one row.
Delivery details. Click any row to open its details: the event, status, transaction, times and attempts, the event data as JSON you can copy, and the request headers. For a failed delivery you also see each failed attempt's response from your server, with its headers and body (up to 64 KB), so you can see exactly why it failed. Failed-attempt details are kept for 30 days. From the details you can Retry a failed delivery, and the panel updates when it goes through, or Resend one that was already delivered.
Reconciling with the signed export
If you reconcile by file as well, the Donations Table offers Export → Transaction Export (Signed Amounts). Choose a date range first. Each gift appears as a positive line on its gift date, and each refund, ACH return or cancellation appears as a negative line on the date it happened, so a period's lines add up to what your church kept.
The full Export CSV Spreadsheet no longer includes internal payment hash and gateway detail columns. If your import maps columns by position rather than by header name, check the mapping once.
Frequently asked questions
Our server was down for a few hours. Did we miss gifts?
With Webhooks v2, no. Failed deliveries are retried automatically for up to 3 days. To catch up right away after an outage, open the Delivery Log and choose Retry all.
Can we choose which fields are sent?
Every event carries the same set of fields, listed with examples on the Payload Reference tab, so your system can use the fields it needs and ignore the rest. If your mapping changes later, nothing needs to change on our side.
Do events include our church management system ids?
Yes. data.transaction.external_ids holds the gift's ids in the systems your account syncs with, using the same names as Webhooks v1. For Fellowship One, that's f1_id (with f1_id_type, which says whether it's an individual, f1_indv, or a household, f1_hh), f1_fund_id and f1_txn_id. Every key is always sent, with null when there's no value. The person and fund ids are there as soon as the gift happens. The gift's own id in that system, such as f1_txn_id, is filled in after our sync runs, so it may be null on the *.completed event. Retries and resends include any ids filled in since.
Why are refund amounts positive?
The event type says the money went back; the amount says how much. Subtract the amount when you receive *.refunded, *.bank_rejected or *.cancelled.
Why is a refund still "Queued"?
Its completed event has not been delivered yet. Reversals always follow the transaction itself; once the completed event goes through, the refund is sent.
Can we test without a real gift?
Yes. Use the Test tab. Test events are marked "test": true and are not logged.
Who can change webhook settings?
Donation Administrators. The same address also receives gifts, so a Payments Administrator without donation access can follow payment deliveries, retry them and send test events, but cannot change the URL, the version or the signing secret. Every change to these is recorded in your audit log.
Questions? Email support@onlinegiving.org.