Skip to content

Webhooks

Inbound events are accepted only when the HMAC-SHA512 of the raw body matches the school’s webhook secret. A bad signature is refused with 401 and never touches the ledger. A repeated event id is acknowledged with "duplicate": true and does not credit the parent twice.

Paystack · x-paystack-signature

BODY='{"event":"charge.success","data":{"reference":"pstk_demo","amount":1500000,
"authorization":{"sender_name":"Amina Bello","sender_bank":"GTBank",
"sender_bank_account_number":"0123456789","receiver_bank_account_number":"NUBAN"}}}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha512 -hmac "$WEBHOOK_SECRET" | awk '{print $2}')
curl -s https://pay.schoolcloud.ng/api/v1/webhooks/paystack \
  -H "Content-Type: application/json" \
  -H "x-paystack-signature: $SIG" \
  -d "$BODY"

Monnify · monnify-signature

Same HMAC-SHA512, header monnify-signature. amountPaid is naira with two decimals, for example "15000.00", and is converted to kobo without binary floats. Only eventType: SUCCESSFUL_TRANSACTION credits the ledger.

Outbound · x-schoolcloud-signature

When a school has a webhook URL, ledger updates are POSTed and signed with HMAC-SHA512 of the JSON body using the school’s webhook secret. Deliveries are logged and retried; retry from the desk records the HTTP status or the connection error. Seeded rows are labelled as such: they were not delivered to a live server.