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/jsonUser-Agent: Java/17.0.14X-Webhook-Event-Id: Unique identifier for this delivery attemptX-Webhook-Id: Identifier of the webhook configurationX-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 bothurl 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:| Event category | Description |
|---|---|
ONRAMP_TRANSACTION_STATUS | Onramp (fiat-to-crypto) transfer status updates (e.g. initiated, funds received, payment processed). |
OFFRAMP_TRANSACTION_STATUS | Offramp (crypto-to-fiat) transfer status updates. |
PAYOUT | Payout status updates for local currency payouts (e.g. INITIATED, PAYOUT_PROCESSED, FAILED). |
USER_STATUS_UPDATE | User KYC and onboarding status changes (e.g. under_review, active, rejected, incomplete). |
CUSTODY_WALLET_TRANSACTION | Custody wallet transfer status updates (e.g. initiated, in_review, completed). |
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 processedPAYMENT_FAILED- Payment processing failed
What’s Next?
Webhook Verification
Learn how to verify webhook authenticity using RSA signatures