BoxBilling sends webhook notifications when key events occur. Webhooks are delivered as HTTP POST requests with JSON payloads to your configured endpoints.
curl -X POST /v1/webhook_endpoints \
-H " Authorization: Bearer $API_KEY " \
-H " Content-Type: application/json " \
"url": "https://yourapp.com/webhooks/boxbilling",
You can create multiple endpoints — each will receive all webhook events.
Field Type Description iduuid Unique endpoint identifier urlstring Delivery URL (max 2048 chars) signature_algostring Signature algorithm (default: hmac) statusstring Endpoint status (active, inactive) created_atdatetime Creation timestamp updated_atdatetime Last update timestamp
You can update the URL, signature algorithm, or status of an existing endpoint:
curl -X PUT /v1/webhook_endpoints/{endpoint_id} \
-H " Authorization: Bearer $API_KEY " \
-H " Content-Type: application/json " \
"url": "https://yourapp.com/webhooks/v2",
curl /v1/webhook_endpoints \
-H " Authorization: Bearer $API_KEY "
Supports skip, limit, and order_by query parameters.
Event Trigger invoice.createdNew invoice generated invoice.finalizedInvoice finalized and ready for payment invoice.paidInvoice fully paid invoice.voidedInvoice voided
Event Trigger payment.createdPayment record created payment.succeededPayment completed successfully payment.failedPayment failed
Event Trigger subscription.createdNew subscription created subscription.startedSubscription activated subscription.plan_changedPlan upgrade or downgrade applied subscription.trial_endedTrial period expired subscription.canceledSubscription canceled subscription.terminatedSubscription terminated
Event Trigger customer.createdNew customer created customer.updatedCustomer record updated
Event Trigger credit_note.createdCredit note created credit_note.finalizedCredit note finalized
Event Trigger wallet.createdWallet created wallet.terminatedWallet terminated wallet.transaction.createdWallet transaction recorded
Event Trigger usage_threshold.crossedUsage threshold exceeded
Event Trigger payment_request.createdDunning payment request created payment_request.payment_succeededDunning payment succeeded payment_request.payment_failedDunning payment failed
Each webhook delivery record contains full details about the event and delivery status:
Field Type Description iduuid Unique webhook ID webhook_endpoint_iduuid Target endpoint webhook_typestring Event type (e.g. invoice.finalized) object_typestring Entity type (e.g. invoice) object_iduuid Entity UUID payloadobject Full event payload statusstring Delivery status (pending, succeeded, failed) retriesinteger Current retry count max_retriesinteger Maximum retry limit last_retried_atdatetime Last retry timestamp http_statusinteger HTTP response code from endpoint responsestring Response body from endpoint created_atdatetime Creation timestamp updated_atdatetime Last update timestamp
"webhook_type" : " invoice.finalized " ,
"object_type" : " invoice " ,
"object_id" : " 550e8400-e29b-41d4-a716-446655440000 " ,
"id" : " 550e8400-e29b-41d4-a716-446655440000 " ,
"invoice_number" : " INV-20250115-0001 " ,
Every webhook includes signature headers for verification:
Header Description X-Bxb-SignatureHMAC-SHA256 hex digest of the payload X-Bxb-Signature-AlgorithmSignature algorithm (default: hmac) X-Bxb-Webhook-IdUnique webhook delivery ID
def verify_webhook ( payload : bytes , signature : str , secret : str ) -> bool :
return hmac. compare_digest ( expected , signature )
const crypto = require ( ' crypto ' );
function verifyWebhook ( payload , signature , secret ) {
. createHmac ( ' sha256 ' , secret )
return crypto . timingSafeEqual (
Failed webhook deliveries are automatically retried with exponential backoff:
Retry Delay 1st 2 minutes 2nd 4 minutes 3rd 8 minutes 4th 16 minutes 5th 32 minutes
Formula: delay = 2^retries minutes
The retry task runs every 5 minutes. After the maximum number of retries (default: 5), the webhook is marked as permanently failed.
Status Description pendingQueued for delivery succeededDelivered successfully (2xx response) failedDelivery failed after all retries
Each delivery attempt is tracked individually with its own response details:
Field Type Description iduuid Delivery attempt ID webhook_iduuid Parent webhook attempt_numberinteger Sequential attempt number http_statusinteger HTTP response code response_bodystring Response body text successboolean Whether the attempt succeeded error_messagestring Error details if failed attempted_atdatetime When the attempt was made
curl /v1/webhook_endpoints/hooks/{webhook_id}/delivery_attempts \
-H " Authorization: Bearer $API_KEY "
Returns all delivery attempts for a webhook, ordered by attempt number.
Get aggregate delivery stats per endpoint to monitor webhook health:
curl /v1/webhook_endpoints/delivery_stats \
-H " Authorization: Bearer $API_KEY "
Response:
"endpoint_id" : " endpoint-uuid " ,
Field Type Description endpoint_idstring Webhook endpoint ID totalinteger Total deliveries succeededinteger Successful deliveries failedinteger Failed deliveries success_ratenumber Success percentage
curl " /v1/webhook_endpoints/hooks/list?status=failed " \
-H " Authorization: Bearer $API_KEY "
Supports skip, limit, webhook_type, and status query filters.
curl -X POST /v1/webhook_endpoints/hooks/{webhook_id}/retry \
-H " Authorization: Bearer $API_KEY "
Only webhooks with failed status can be retried.
BoxBilling also receives inbound webhooks from payment providers to update payment and invoice status:
POST /v1/payments/webhook/{provider}
Supported providers: stripe, manual, ucp, gocardless, adyen
Each provider uses its own signature header for verification:
Provider Signature Header Stripe Stripe-SignatureUCP X-UCP-SignatureOthers Webhook-Signature
Method Path Description POST/v1/webhook_endpointsCreate endpoint GET/v1/webhook_endpointsList endpoints GET/v1/webhook_endpoints/{id}Get endpoint PUT/v1/webhook_endpoints/{id}Update endpoint DELETE/v1/webhook_endpoints/{id}Delete endpoint
Method Path Description GET/v1/webhook_endpoints/hooks/listList deliveries GET/v1/webhook_endpoints/hooks/{id}Get delivery details GET/v1/webhook_endpoints/hooks/{id}/delivery_attemptsGet delivery attempts POST/v1/webhook_endpoints/hooks/{id}/retryRetry a delivery GET/v1/webhook_endpoints/delivery_statsGet delivery stats per endpoint
Method Path Description POST/v1/payments/webhook/{provider}Handle inbound payment provider webhook