Skip to content

Webhook & Callback

Endpoint yang menerima panggilan dari sistem eksternal (payment gateway, mail provider, log shipper, layanan internal).

Callback di /api/v1routes/index.js

MethodPathHandlerKeterangan
POST/api/v1/refreshrefreshTokenRefresh access token
POST/api/v1/revokerevokeRefreshTokenLogout / cabut refresh token
POST/api/v1/callback-raw-lograwLogIngest log mentah dari Logstash → clean-log ES
GET/api/v1/t3st-jobtestJobEndpoint test job
POST/api/v1/callback-paymentcbXenditWebhook pembayaran Xendit
POST/api/v1/xenditxenditEndpoint Xendit
GET/api/v1/auth-zohozoho.authorizeZohoOAuth Zoho
GET/api/v1/get-tokenzoho.getTokenAmbil token Zoho
POST/api/v1/spamming-mailcompany.spamMailHandlerHandler laporan spam

Webhook pembayaran Xendit

  • Path: POST /api/v1/callback-payment
  • Auth: header x-callback-token harus cocok dengan CALLBACK_TOKEN_XENDIT.
  • Controller: controllers/callbackXendit.js.
  • Detail alur ada di Billing & Pembayaran.

Callback raw-log

  • Path: POST /api/v1/callback-raw-log
  • Controller: controllers/callbackRawLog.js.
  • Detail ada di Logging Pengiriman.

/callbackroutes/callbackRoutes.js

MethodPathHandlerAuth
POST/callback/sparkpostcallbacks.sparkpostBasic Auth (SPARKPOST_WEBHOOK_USER / SPARKPOST_WEBHOOK_PASS)

Webhook event delivery SparkPost. Handler: callbacks/sparkpostCallback/sparkpostCallback.js. Detail di Logging Pengiriman.

/api/internalroutes/internalRoutes.js

MethodPathHandlerAuth
POST/api/internal/relay-statusinternal.internalRelayAccountAPI key (internalApiKeyAuth)

Auth via header x-api-key atau Bearer token, dibandingkan dengan INTERNAL_API_KEY (timing-safe compare).

/publicroutes/publicRouter.js

MethodPathHandlerAuth
GET/public/company/script/:tokenpublic.downloadSetupScriptToken di URL

Mengunduh setup script Zimbra yang dipersonalisasi (lihat Pengiriman Email).