Overview
Webhooks deliver instant notifications to your server when events occur — most critically, when a payment is completed. This is how your POS knows to show “Payment Received” to the cashier.Setup
Via Partner Dashboard
- Go to Webhooks in the Partner Dashboard
- Click Create Webhook
- Enter your endpoint URL and select events
- Save — you’ll receive a webhook secret for signature verification
Via API
Events
Payment Events
| Event | Description | When |
|---|---|---|
payment.completed | Payment successful | Customer completed bank authorization and payment settled |
payment.failed | Payment failed | Bank rejected, customer abandoned, or payment expired |
Merchant Events
| Event | Description | When |
|---|---|---|
merchant.activated | Merchant is now active | Sent when merchant status transitions to active (e.g. after approval). Use this to create stores via the API. |
merchant.deactivated | Merchant deactivated | Sent when merchant status transitions to inactive. |
merchant.activated is dispatched as soon as the merchant becomes active. Subscribe to it so your system can automatically create stores for the merchant (e.g. POST /v1/partner/merchants/:merchantId/stores) and start accepting payments.
Payload Format
All webhooks use the same envelope:event, timestamp, and data. The data object varies by event.
payment.completed / payment.failed
merchant.activated / merchant.deactivated
merchantId and clientId from the payload to create stores (POST /partner/merchants/:merchantId/stores) or to start sending payments for this merchant.
Signature Verification
Every webhook includes anX-Webhook-Signature header containing an HMAC-SHA256 signature of the request body, using your webhook secret.
Always verify signatures to ensure webhooks are from AcountPay.
- Node.js
- Python
Testing Webhooks
Send a test webhook from the Partner Dashboard or via API:Best Practices
- Respond quickly: Return 200 within 10 seconds. Process asynchronously.
- Idempotency: Use
paymentIdorX-Webhook-Idheader to deduplicate. - Retry: Failed deliveries are not retried automatically. Use polling as a fallback.
- HTTPS: Always use HTTPS for webhook endpoints.

