Generate webhook secret
Generate a new webhook secret for your Vesicash account. This secret is used to sign outgoing webhook payloads, allowing you to verify that incoming notifications genuinely originate from Vesicash.
How It Works
Each time this endpoint is called, Vesicash generates a new cryptographic secret tied to your account. You use this secret on your server to validate the mor-signature header on every incoming webhook request.
Call this endpoint
POST to /v1/account/generate-webhook-secretwith your secret-key. No request body is needed.Store the secret securely
Save the returned
webhook_secretin your environment variables or secret manager. Never expose it in client-side code or logs.Verify incoming webhooks On every Vesicash webhook, compute an HMAC-SHA256 signature of the raw request body using your secret, then compare it against the
mor-signatureheader.
POST : v1/account/generate-webhook-secret
Headers
secret-key
string
Your Vesicash secret key
Response
On a successful request, the API will return a response with the following structure:
webhook_secret(string): The generated webhook secret that will be used for authentication.
{
"status": "",
"code": 0,
"message": "",
"data": {
"webhook_secret": ""
}
}
NOTE: Webhook Authentication Using HMAC-SHA256 After authentication using the specified method, the generated webhook token must be stored in a secure location (for example, a secrets manager or encrypted configuration store). The webhook signature is created by computing an HMAC-SHA256 hash on a single string that must be reconstructed exactly on your server.
Last updated