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

EventWhen
transaction.createdYour API create succeeded (API-created transactions only)
transaction.approvedBuyer completed consent; the salary-deduction mandate is active
transaction.cancelledCancelled (by you, the buyer, or GP)
transaction.completedFully repaid

Delivery

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.