Skip to main content
Pasteaza sends webhook notifications to your configured webhook URL when important transaction events happen on your account. Webhooks are delivered as HTTPS POST requests with a JSON payload.
Always verify the webhook signature before you trust or process the payload.

Configure your webhook URL

Configure your webhook endpoint in your Pasteaza merchant dashboard. Your endpoint should be publicly accessible over HTTPS.

Webhook events

Pasteaza currently supports these webhook events:

Collection webhook payload

Dedicated account webhook payload

externalReference is the reference you supplied when creating the dedicated account. Do not expect customer name, email, phone, BVN, or NIN unless you placed those values inside metadata.

Hosted checkout webhook payload

Transfer success webhook payload

Transfer failed webhook payload

Signature verification

Each webhook request includes an X-Pasteaza-Signature header.
Generate an HMAC SHA-256 hash of the JSON payload with your merchant webhook secret and prefix it with sha256=. Compare the generated value with the value in the X-Pasteaza-Signature header. Only process the webhook when both values match.
Verify the exact JSON payload sent to your webhook endpoint. Do not trust a webhook payload until the signature matches.

Verification flow

1

Receive the webhook

Accept the incoming HTTPS POST request on your webhook endpoint.
2

Read the signature header

Get the value of the X-Pasteaza-Signature header from the request.
3

Hash the raw body

Generate an HMAC SHA-256 hash from the raw request body using your webhook secret.
4

Compare signatures

Compare your generated hash with the signature header value.
5

Process the event

Process the webhook only after the signature is valid.

Retry policy

If your server does not return a successful 2xx HTTP response, Pasteaza will automatically retry delivery. Design your webhook handler to be idempotent so repeated events do not update the same transaction more than once.

Best practices

  • Always verify the webhook signature.
  • Return a 2xx response after successful processing.
  • Store processed webhook references to prevent duplicate processing.
  • Fetch the related transaction from the API when you need the latest state.
  • Never trust webhook payloads without signature verification.
  • Keep your webhook secret secure and rotate it after any suspected exposure.

Authentication

Learn how to authenticate API requests with your secret key.

Idempotency

Prevent duplicate processing when requests or events are retried.