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:| Event | Description |
|---|---|
account.credit | Money has been credited to your merchant account. |
account.debit | Money has been deducted from your merchant account. |
virtual_account.transfer | A customer has successfully transferred funds to a generated virtual account. |
Sample payload
Signature verification
Each webhook request includes anX-Pasteaza-Signature header.
X-Pasteaza-Signature header.
Only process the webhook when both values match.
Verification flow
Hash the raw body
Generate an HMAC SHA-256 hash from the raw request body using your webhook secret.
Retry policy
If your server does not return a successful2xx 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
2xxresponse 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.
Related guides
Authentication
Learn how to authenticate API requests with your secret key.
Idempotency
Prevent duplicate processing when requests or events are retried.