Skip to main content
Morapay delivers outbound webhooks when payments, payouts, and subscriptions change state. Configure endpoints via the Merchant API; verify deliveries on your server.

Register an endpoint

morapay.webhooks.endpoints uses the **callable resource pattern: call with no arguments to list, then use attached methods for writes:
Manage endpoints:
API path: /api/v1/merchant/webhooks/endpoints.

Event types

Subscribe only to events you handle; unused events add noise and retry load.

Verify signatures

Morapay signs the raw request body with HMAC-SHA256. The Morapay-Signature header accepts:
  • sha256=<hex>, or
  • raw hex digest
Use MorapayUtils.verifyWebhook on your server; it is synchronous and does not require a Morapay client instance:
Always verify against the raw body string before JSON parsing. Re-serialized JSON will fail signature checks.

Delivery best practices

  1. Respond 2xx quickly offload processing to a queue.
  2. Idempotent handlers the same event may be delivered more than once.
  3. Log requestId from inbound payloads when debugging with support.

FAQ

Create a new endpoint or use revealSecret if your dashboard flow supports rotation, update your server env, then delete the old endpoint.
Contact support for the current egress allowlist if your firewall requires it.

Next step

Idempotency: safe retries for payouts and ledger operations.