Two approaches: 1) No-code via Zapier: connect Paystack + Google Sheets in Zapier, trigger on charge.success, map fields to columns. 2) Direct via Google Apps Script: deploy a web app script that accepts POST requests, parse the Paystack webhook payload, and append a row to your sheet. Configure Paystack to send webhooks to the Apps Script URL.
For a free, code-based option, deploy a Google Apps Script web app that receives Paystack webhooks:
// In Google Apps Script (Tools > Script Editor in your Google Sheet)
function doPost(e) {
var payload = JSON.parse(e.postData.contents);
// Basic event filter — in production, validate HMAC here
if (payload.event !== 'charge.success') {
return ContentService.createTextOutput('ignored');
}
var txn = payload.data;
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.appendRow([
txn.reference,
txn.amount / 100, // convert from minor unit
txn.currency,
txn.customer.email,
txn.channel,
txn.paid_at,
txn.gateway_response,
]);
return ContentService.createTextOutput('ok');
}
Deploy as Web App (Execute as: Me, Who has access: Anyone). Copy the deployment URL and add it to Paystack webhook settings. Paystack will POST to your Apps Script on every event.
Get weekly developer tips
Join 25,000+ developers. Practical guides, job tips, and new content — straight to your inbox.
No spam. Unsubscribe anytime.
For full reconciliation, see Paystack with Xero or QuickBooks.
KES 2,999
The definitive guide to building payment systems with Paystack — from your first transaction to production-grade payment infrastructure across Africa. 9 modules, 47 lessons. Free preview available.
Start Paystack Course