Skip to main content
Carbn webhooks allow you to receive real-time notifications when payment events occur in your Carbn account. This guide covers registering, implementing, and enabling webhooks using Carbn’s REST API.

Prerequisites

  • A Carbn account with API access
  • Carbn API credentials (API key)
  • HTTPS endpoint with valid certificate
  • Development environment with your preferred language

Step 1: Create Your Webhook Endpoint

First, create an endpoint on your server to receive webhook notifications.

Webhook Payload Structure

All webhook payloads follow this structure:

HTTP Headers

When Carbn sends webhook events, your endpoint will receive these headers:
  • Content-Type: application/json
  • User-Agent: Java/17.0.14
  • X-Webhook-Event-Id: Unique identifier for this delivery attempt
  • X-Webhook-Id: Identifier of the webhook configuration
  • X-Webhook-Signature: Base64 encoded signature for payload verification

Example Webhook Handler


Step 2: Register Your Webhook

Once your endpoint is ready, register it with Carbn. You must specify both url and event_category. Important: Webhooks are created with status: "disabled" by default and must be enabled separately.

Webhook event categories

Choose one event category per webhook. Each webhook receives only events for its category:
Response:
Save the webhook_id from the response - you’ll need it to enable the webhook.

Step 3: Enable Your Webhook

Before your webhook can receive events, you must enable it using the PUT endpoint:

Payment Status Events

Carbn webhooks notify you when payment statuses change. The main status values are:
  • PAYMENT_PROCESSED - Payment has been successfully processed
  • PAYMENT_FAILED - Payment processing failed
Example payload:

What’s Next?

Webhook Verification

Learn how to verify webhook authenticity using RSA signatures
Your webhook is now configured to receive real-time payment notifications from Carbn. Next, implement proper signature verification to ensure webhook security.