Skip to content

Integrations

BoxBilling supports integrations with external systems for accounting, CRM, and payment processing. Each organization can connect one integration per provider type.

TypeDescriptionSupported providers
payment_providerPayment processingStripe, Adyen, GoCardless
accountingFinancial syncNetSuite, Xero
crmCustomer syncHubSpot, Salesforce
taxTax calculationAnrok, Avalara
FieldTypeDescription
iduuidUnique integration ID
organization_iduuidOwning organization
integration_typestringType category (e.g. accounting, crm)
provider_typestringProvider name (e.g. xero, stripe)
statusstringCurrent status (active, inactive, error)
settingsobjectProvider-specific configuration
last_sync_atdatetimeLast successful sync timestamp
error_detailsobjectDiagnostic info when status is error
created_atdatetimeCreation timestamp
updated_atdatetimeLast update timestamp
Terminal window
curl -X POST /v1/integrations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"integration_type": "accounting",
"provider_type": "xero",
"settings": {
"client_id": "...",
"client_secret": "...",
"tenant_id": "..."
}
}'

Update status or settings of an existing integration:

Terminal window
curl -X PUT /v1/integrations/{integration_id} \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "inactive",
"settings": { "tenant_id": "new-tenant" }
}'

Updatable fields: status, settings, error_details.

Terminal window
POST /v1/integrations/{id}/test

Returns:

{
"success": true,
"details": {
"connected": true,
"organization_name": "My Company"
}
}

BoxBilling uses a strategy-based adapter pattern. Each provider implements the IntegrationAdapter interface:

MethodDescription
sync_customer(customer_id)Sync customer data to external system
sync_invoice(invoice_id)Sync invoice to external system
sync_payment(payment_id)Sync payment to external system
process_webhook(payload)Handle incoming webhooks
test_connection()Verify credentials and connectivity

All adapter methods return an IntegrationSyncResult:

{
"success": true,
"external_id": "EXT-12345",
"external_data": {"name": "Customer Inc"},
"error": null
}

Integration mappings track the relationship between BoxBilling entities and their external counterparts.

FieldTypeDescription
iduuidMapping ID
integration_iduuidThe integration this mapping belongs to
mappable_typestringEntity type (e.g. customer, invoice)
mappable_iduuidBoxBilling entity UUID
external_idstringExternal system’s ID
external_dataobjectCached data from external system
last_synced_atdatetimeLast synchronization timestamp
created_atdatetimeCreation timestamp
updated_atdatetimeLast update timestamp
Terminal window
curl /v1/integrations/{integration_id}/mappings \
-H "Authorization: Bearer $API_KEY"

Supports skip and limit query parameters.

Direct customer-level mappings between BoxBilling customers and their external representations.

FieldTypeDescription
iduuidMapping ID
integration_iduuidParent integration
customer_iduuidBoxBilling customer UUID
external_customer_idstringExternal system’s customer ID
settingsobjectCustomer-specific integration settings
created_atdatetimeCreation timestamp
updated_atdatetimeLast update timestamp
Terminal window
curl /v1/integrations/{integration_id}/customers \
-H "Authorization: Bearer $API_KEY"

View all integrations a specific customer is mapped to:

Terminal window
curl /v1/customers/{customer_id}/integration_mappings \
-H "Authorization: Bearer $API_KEY"

Response fields:

FieldTypeDescription
iduuidMapping ID
integration_iduuidIntegration UUID
integration_namestringIntegration display name
integration_providerstringProvider type
external_customer_idstringExternal customer ID
settingsobjectCustomer-specific settings
created_atdatetimeCreation timestamp

Track synchronization activity for an integration, including successes and failures:

Terminal window
curl "/v1/integrations/{integration_id}/sync_history?status=failed" \
-H "Authorization: Bearer $API_KEY"

Supports status, resource_type, skip, and limit query filters.

FieldTypeDescription
iduuidSync record ID
integration_iduuidParent integration
resource_typestringEntity type synced (e.g. customer, invoice)
resource_iduuidBoxBilling entity ID
external_idstringExternal system entity ID
actionstringSync action performed
statusstringSync result status
error_messagestringError details if failed
detailsobjectAdditional sync metadata
started_atdatetimeSync start time
completed_atdatetimeSync completion time
created_atdatetimeRecord creation timestamp
StatusDescription
activeIntegration is operational
inactiveIntegration is disabled
errorIntegration has encountered errors

When an integration encounters errors, the error_details JSON field contains diagnostic information.

MethodPathDescription
POST/v1/integrationsCreate integration
GET/v1/integrationsList integrations
GET/v1/integrations/{id}Get integration details
PUT/v1/integrations/{id}Update integration
DELETE/v1/integrations/{id}Delete integration
POST/v1/integrations/{id}/testTest connection
MethodPathDescription
GET/v1/integrations/{id}/customersList customer mappings
GET/v1/integrations/{id}/mappingsList field mappings
GET/v1/integrations/{id}/sync_historyList sync history
GET/v1/customers/{customer_id}/integration_mappingsList customer’s integration mappings