Set webhook URL

Set your webhook URL and callback token on your Monit dashboard.

Monit sends webhooks to notify you of events, such as card transactions. Set your webhook URL and callback token on your Monit dashboard, separately for sandbox and production. Monit only sends webhooks when both are set.

📘

Note

The URL must use https with a trusted CA signed SSL certificate. Self-signed certificates are not supported.

Every webhook includes your callback token in the CALLBACK-TOKEN header. Refuse the request if the token does not match.

Responses and retries

  • 200: success. Monit does not retry.
  • Any other code, a timeout (10 seconds) or a connection error: Monit retries every 10 minutes, up to 4 times.

You can also resend a webhook from the API Callbacks menu on your Monit dashboard.

See Webhook for the request format.

OTP callback URL

Set an OTP callback URL to receive card 3D Secure OTPs and deliver them to your cardholders yourself. See Card 3DS OTP for the request body.

📘

Note

This section only appears on your Monit dashboard after Monit turns it on for your organization. Contact Monit to request it.

The OTP callback URL is separate from your webhook URL, and uses the same rules: https, and the same callback token.

To enable OTP callback:

  1. Set the OTP callback URL and callback token for sandbox and production.
  2. Send a test event to your production OTP callback URL. Your server must return a 2xx code.
  3. Enable OTP callback.

Once enabled, OTPs for cards created through the API go to your OTP callback URL. Cards created on the Monit dashboard still get their OTP from Monit. If an environment has no OTP callback URL, Monit sends the OTP itself for that environment.

🚧

No fallback

If your server does not receive the OTP, Monit does not send it to the cardholder, and the transaction fails. Send a test event to a new URL before you change it.

OTP callbacks are retried differently:

  • Any 2xx: success.
  • Anything else: retried right away, 3 attempts in total, 8 seconds timeout each.