API Integrations: Connecting Your Website, CRM, and Accounting Software

API Integrations: Connecting Your Website, CRM, and Accounting Software

An API integration lets your systems pass data to each other automatically, so an order on your website becomes a contact in the CRM, an invoice in the accounting software and a shipment with the courier without anyone retyping it. The programming is usually the smaller part of the job. The bigger part is deciding which system owns which data, what triggers each transfer, and what happens when one side is down or rejects the data. Settle those questions first; skip them and you get duplicate customers, missing invoices and totals that never quite match.

What an integration actually does

An API (application programming interface) is a documented way for one program to ask another for data or tell it to do something. Most business integrations use one or more of three patterns:

  • Requests. Your system calls the other one: "create a shipment", "what is the status of order 1045", "how many units are in stock".
  • Notifications (webhooks). The other system calls you when something happens, for example when a payment is confirmed or refunded.
  • Files on a schedule. One side publishes a CSV or XML file (a feed) and the other imports it regularly – still common for price lists, stock and product catalogues.

A courier API shows what is on offer. The Speedy Web API documentation, for instance, describes methods for creating shipments, printing labels, requesting pickups, tracking parcels, calculating prices and validating addresses. With these, a shop can show the delivery price at checkout, create the waybill with one click and send the customer a tracking number automatically.

Common connections for a small or mid-sized business

ConnectionWhat movesTypical trigger
Website → CRMEnquiry details and the page the visitor came fromForm submitted
Online shop → courierAddress, parcel details, cash-on-delivery amount; back: waybill number and statusOrder confirmed; regular status checks
Online shop → invoicing or accountingCustomer, items, VAT, payment methodOrder paid or shipped
Payment provider → shopPayment confirmed, failed or refundedNotification from the provider
Supplier → shopPrices and stockScheduled file import
Your database → partners or appsCatalogue dataRequests to your own API

In the last row you become the provider. The car specifications catalogue auto-data.net serves its multilingual website, Android and iOS apps and a paid API from one database, as described in one API for a website and a mobile app.

Decide which system owns which data

Before anything is connected, write down where each type of data is created and where it is edited:

  • One owner per field. Customers might live in the CRM, prices in the shop, invoices in accounting. If two systems can edit the same field, sooner or later they will disagree.
  • Stable identifiers. Link records by IDs stored on both sides, such as the shop's order number next to the invoice number. Matching by name or email is how duplicates are born.
  • A field map. The field in system A, the field in system B, and any conversion between them – VAT rates, units, currency, address format, language codes.

Small format differences cause a surprising number of problems. In the auto-data.net mobile app, an Italian user found that the app stayed in English after the language codes changed from "it" to "it,it-IT,it-CH". The fix was to normalise language codes in the API, so every variant maps to the right language. A field map is where you catch most edge cases like this before your customers do.

One-way or two-way, real-time or scheduled

One-way flows, such as shop to accounting, are much simpler than two-way synchronisation, because nobody has to decide which change wins when both sides edit the same record. Start one-way wherever you can.

Not everything needs to be instant either. Stock on a busy shop should update often; invoices can often be created in a batch at the end of the day. Faster means more moving parts, so choose the speed the business actually needs.

Real-time notifications need care. Stripe's webhook documentation is a useful reference even if you never use Stripe: it tells developers to return a success response quickly, before any complex logic – for example, before marking a customer's invoice as paid in the accounting system – and to process incoming events through a queue so a sudden spike does not overwhelm the server.

Plan for failure, because it will happen

Connections fail: the other system is down for maintenance, a request times out, a field is rejected. A good integration expects this. Stripe, for example, says it retries an undelivered event for up to three days in live mode, does not guarantee that events arrive in the order they were generated, and may occasionally deliver the same event more than once – so you should log the IDs of processed events and skip ones you have already seen.

In the other direction, Stripe's API supports idempotency keys, which let a request be repeated safely after a connection error without creating a second object. Whatever you connect, ask directly: if the connection drops halfway, could we end up with two invoices or two waybills for one order?

A practical minimum:

  • a log of every transfer: data sent, answer received;
  • automatic retries for temporary errors, an error list for the rest;
  • a named person alerted when errors pile up, and a "send again" button;
  • a periodic check that shop orders match invoices in accounting.

Security and personal data

  • Keep keys on the server. API keys never belong in the browser or in a mobile app's code. Give each integration its own key with the narrowest permissions, so one can be revoked without stopping the rest.
  • Treat incoming data as untrusted. The OWASP API Security Top 10 (2023) includes "Unsafe Consumption of APIs", noting that developers tend to trust data from third-party APIs more than user input. Validate it like a web form.
  • Verify notifications. Stripe warns that without verification an attacker could send fake webhook events to trigger actions such as fulfilling orders, which is why it signs every event so the receiver can check it.
  • Know where personal data goes. Make sure your contracts and privacy notice cover each new flow of customer data.
  • Collect data politely. When our product search engine gega.bg downloads product images from shops, it uses an honest User-Agent and gracefully accepts it when a shop blocks bots.

Integrations need attention when something real changes

A working integration does not need rebuilding just because newer tools exist. It does need attention when the other side changes:

  • A provider retires an interface. Speedy stopped supporting its older web service on 30 September 2024 and directs developers to its REST API. Integrations built on it had to move – a real reason for work.
  • The rules change. Under the EU's "VAT in the Digital Age" (ViDA) package, digital reporting requirements based on e-invoicing will apply to cross-border B2B transactions from 1 July 2030, and member states can already introduce mandatory e-invoicing under certain conditions. If you sell to businesses elsewhere in the EU, ask your accounting software provider how they will support this.

Keep a small budget for this kind of occasional work, and make sure the integration is documented.

Plugin, integration platform or custom code?

A ready-made plugin for your shop platform is usually the cheapest option if it covers your process as it is – check what it does on errors and whether anyone maintains it. Integration platforms that link popular services without programming suit simple, low-volume flows. Custom code makes sense when your process is specific, volumes are large, one side has no ready connector, or you need full control over errors and data. Often the answer is a mix: a plugin for the courier, custom code for the part of the process that is unique to you.

Questions to answer before you start

  1. Which systems are involved, and does each have a documented API and a test environment?
  2. Which data moves, in which direction, and which system owns each field?
  3. What triggers each transfer, and how quickly must it happen?
  4. How are records matched between the systems?
  5. What happens when a transfer fails, who is told, and how is it sent again?
  6. Who owns the API accounts and keys? (See who controls your domain, hosting, code and accounts.)
  7. What will it cost to run: API fees, connector subscriptions, hosting and maintenance?

Still moving data between spreadsheets by hand? See when has your business outgrown spreadsheets.

If your website, CRM, courier and accounting software do not talk to each other, we can map the data flows with you and build the connections as part of our web-based software development work. Get in touch and tell us which systems you use.

Sources

← All articles

Have an idea for a website, app or system?

Tell us briefly what you need – we will get back to you for a short call and a clear quote.