
API Access: Connect SAFE Billing Platform with Your Systems
A reseller’s customer and service records usually exist in more than one system: a CRM for sales, a provisioning system for activations, an accounts package for the ledger, and the billing platform. Wherever the same information is held twice, it needs keeping consistent. SAFE’s REST API lets those systems read from and write to the billing platform directly, so changes reach billing without someone re-entering them.
Key Takeaways
- SAFE’s REST API covers customers, services, numbers, features, calls, invoices, payments, KPIs and more
- Exact-match lookups find records by account number, invoice number or phone number
- Access is read-only on Standard, read and write on Premium and full on Enterprise; webhooks are on Premium and Enterprise
- You can issue your own sandbox tokens to build and test integrations away from live data
- Accounting transfers to Xero have a dedicated integration, rather than needing custom API work
Key terms in this article
What does REST mean?
REST (representational state transfer) is the most common style of web API. A REST API exposes data through standard HTTP requests and JSON responses, so developers can work with it using the tools they already know.
What is a webhook?
A webhook is a message one system sends to another when something happens, such as a payment clearing. SAFE can send webhooks for the events you configure, so your other systems learn about a change without polling for it.
What the API Covers
The API reference documents an endpoint for each main record type, including:
- Customers and contacts: create, retrieve and update customer records
- Services, numbers and features: manage what each customer has, with the tariffs and recurring charges attached
- Calls and CDR files: retrieve rated calls and the files they came from
- Invoices and transactions: retrieve invoices, line items and payment status
- Payments: work with payments, Direct Debit and card payment runs and expected payments
- KPIs: retrieve the same KPI figures as the platform’s own reports, for your own dashboards
Requests and responses use JSON, with standard HTTP status codes, token-based authentication and pagination.
Package Access
API access depends on your package:
- Standard: read-only access, for reading billing data into your other systems
- Premium: read and write access, with webhooks
- Enterprise: full API access, with webhooks
The Startup package does not include API access. The pricing page sets out the full comparison.
Exact-Match Lookups
Lookups by the identifiers your team already uses are among the most common API calls, so there are dedicated search parameters:
- Customer: by account number (
?accountNumber=C12345) - Invoice: by invoice number (
?invoiceNumber=C12345/123) - Number: by phone number (
?number=02079460000)
These can be combined with other filters to narrow the results.
An Example Integration
Suppose your CRM is the master record for customer details and SAFE handles billing:
- A salesperson updates a customer’s address in the CRM after a move.
- The CRM calls a small script you control.
- The script sends the new address to SAFE’s customer endpoint.
- SAFE updates the billing record and returns a confirmation.
- The next invoice goes to the new address.
The same pattern applies to new customers and service activations. How much development it takes depends on your CRM and how its fields map to SAFE’s, so start with a single record type and extend from there.
Common Uses
Resellers use the API to:
- Create customers and services from web sign-ups, so a new order is ready for billing without manual set-up
- Mirror closed deals from a CRM, carrying the customer and agreed services into SAFE (SAFE CRM, in early access, does this within the platform)
- Keep CRM and billing details consistent once an account is live
- Feed dashboards in Power BI, Looker or your own tools with KPI data, alongside the reports built into SAFE
- Hold an independent copy of customers, invoices and payments on a schedule, in addition to the Disaster Recovery Files the platform produces
For transfers to Xero, the Xero integration handles customers, invoices and payments with dedicated tasks.
Getting Started
- Get API credentials for your platform.
- Read the API reference, starting with authentication.
- Issue a sandbox token and try a simple read, such as fetching one customer.
- Build out to the records your integration needs, checking each against the sandbox.
- Move to production credentials once the integration behaves as expected.
To discuss an integration with your own systems, arrange a demonstration and bring a developer along.
Dr Paul Barrass
Founder & Technical Director, Safe Online Billing
Paul founded Safe Online Billing in 2005 and has built telecoms billing software for UK resellers for over 20 years. About the team →