Skip to main content
PATCH
/
api
/
v3
/
integrator
/
webhook
Update webhook configuration
curl --request PATCH \
  --url https://sandbox-api.kotanipay.io/api/v3/integrator/webhook \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "webhook_url": "https://your-domain.com/webhooks/kotani",
  "webhook_secret": "whsec_1234567890abcdef1234567890abcdef",
  "webhook_events": [
    "transaction.deposit.status.updated",
    "transaction.withdrawal.status.updated",
    "payment.confirmed"
  ]
}
'
{
  "success": true,
  "message": "Integrator webhook settings updated successfully.",
  "data": {
    "organization": "A&B Company",
    "first_name": "John",
    "last_name": "Doe",
    "email": "ab@gmail.com",
    "phone": "+xxx xxx xxx xxx",
    "id": "xxxxxxxxxxxxxxxxxxxxxxxx",
    "webhook_url": "https://example.com/kotani/webhooks",
    "webhook_events": [
      "transaction.deposit.status.updated",
      "payment.confirmed"
    ]
  }
}
Update your integrator’s webhook URL, secret, and event subscriptions for receiving real-time notifications.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
webhook_url
string

HTTPS URL on your server where Kotani Pay will POST webhook events. Must be publicly reachable. Respond with HTTP 200 to acknowledge receipt.

Example:

"https://your-domain.com/webhooks/kotani"

webhook_secret
string

A secret string used by Kotani Pay to sign outbound webhook payloads with HMAC-SHA256. Use this on your server to verify that incoming requests genuinely come from Kotani Pay. Choose a strong random string (e.g. 32+ random hex characters). This value is stored encrypted and is never returned in API responses.

Example:

"whsec_1234567890abcdef1234567890abcdef"

webhook_events
enum<string>[]

List of event types this integrator should receive. Omit or send an empty array to receive all supported events. Only events in this list will be delivered to your webhook_url.

Available options:
transaction.status.updated,
transaction.deposit.status.updated,
transaction.withdrawal.status.updated,
transaction.onramp.status.updated,
transaction.offramp.status.updated,
payment.confirmed,
kyc.status.changed,
refund.lightning.invoice_needed,
refund.completed,
refund.failed,
settlement.approved,
settlement.rejected,
settlement.processed,
settlement.cancelled,
settlement.paused,
settlement.batch.approved,
settlement.batch.rejected,
settlement.batch.processed,
settlement.batch.partial,
settlement.batch.cancelled,
system.event
Example:
[
"transaction.deposit.status.updated",
"transaction.withdrawal.status.updated",
"payment.confirmed"
]

Response

success
boolean
Example:

true

message
string
Example:

"Integrator webhook settings updated successfully."

data
object