Webhooks
When a transaction changes state, GP pushes the event to your server — no polling needed. Events fire no matter which channel caused the change (buyer consent on GP, dashboard, POS, your API calls).
Events
| Event | When |
|---|---|
transaction.created | Your API create succeeded (API-created transactions only) |
transaction.approved | Buyer completed consent; the salary-deduction mandate is active |
transaction.cancelled | Cancelled (by you, the buyer, or GP) |
transaction.completed | Fully repaid |
Delivery
POSTJSON to the URL the GP admin configured for your account.- Headers:
X-GP-Event(event name),X-GP-Signature: sha256=...,X-GP-Timestamp. - Signature = HMAC-SHA256 of the raw request body with your account's webhook secret (issued once when the URL is set; rotated whenever the URL changes).
- Any 2xx response = delivered. Anything else: 5 retries with exponential backoff (2, 4, 8, 16, 32 minutes), then marked failed.
- Deliveries run on GP's scheduler — expect events within ~5 minutes of the change.
Verify the signature
// PHP
$raw = file_get_contents('php://input');
$given = $_SERVER['HTTP_X_GP_SIGNATURE'] ?? '';
$expect = 'sha256=' . hash_hmac('sha256', $raw, WEBHOOK_SECRET);
if (!hash_equals($expect, $given)) { http_response_code(401); exit; }
// Node (Express)
const crypto = require('crypto');
app.use(express.raw({ type: 'application/json' }));
const expect = 'sha256=' + crypto.createHmac('sha256', process.env.GP_WEBHOOK_SECRET)
.update(req.body).digest('hex');
if (expect !== req.get('X-GP-Signature')) return res.status(401).end();
Verify the signature BEFORE trusting anything in the body. Always compare the raw bytes, not a re-serialized JSON object.
Payload
{
"event": "transaction.approved",
"transaction_id": "GRT-PAY:0001328",
"status": "approved",
"raw_status": "Approved",
"amount": 10000,
"monthly_installment": 3683.33,
"total_amount_expected": 11050,
"repayment_period": 3,
"description": "Order #1234",
"merchant_reference": "ORDER-1234",
"customer_number": "155508",
"buyer_name": "ISAH YAHAYA",
"is_test": false,
"merchant_serial": 20,
"occurred_at": "2026-11-25T13:02:11+01:00"
}
Respond 2xx quickly; do heavy work after. Treat merchant_reference as your idempotency key on receipt — retries may re-deliver an event you already processed.