APIs and integrations
Connecting systems so data is entered once and failures are visible.
Integrations fail quietly. A webhook is missed, a retry charges twice, a nightly file stops arriving and nobody notices for a week. These articles are for product teams, CTOs and finance or operations leads who need two or more systems to agree, and they cover the patterns that prevent silent failure as well as the common Indian integrations: UPI, GST e-invoicing, Tally, ONDC, payment gateways and identity.
Core integration patterns
- Replacing nightly CSV files with real integration: how to make a fragile batch job observable, then replace it one interface at a time.
- API errors: what to return when something goes wrong: which status codes and error fields let a developer fix their own mistakes.
- Idempotency keys: making retries safe: how to stop a repeated request from creating a second order or charge.
- Webhooks that arrive: delivery and receipt: signing, retries, duplicates and out-of-order events on both ends.
- Calling third-party APIs without inheriting their outages: timeouts, circuit breakers and what to do when a dependency is down.
- Reconciliation: the system nobody designs: matching your records against the provider and the bank every day, not every month.
Common questions
- Can we connect to UPI directly, or do we need a bank? What UPI integration actually involves explains the sponsor bank, data residency and grievance obligations.
- What happens if an invoice is not registered on the e-invoicing portal in time? See GST e-invoicing: what integration involves.
- Should we use a GST Suvidha Provider or connect to the GST system ourselves? GSP or direct sets out the trade-off.
- How do we get data from our product into Tally or Zoho Books? Read integrating with Indian accounting systems.
- Do saved cards and mandates move with us if we switch payment gateway? Changing payment gateway without losing customers covers tokens, mandates and running both in parallel.
- Is ONDC just another sales channel to plug in? Integrating with ONDC explains the protocol, roles and onboarding gate.
See also our API and system integration and ERP and CRM pages.
Start here
Replacing nightly CSV files with real integration
The batch file that runs at 2am is the most fragile thing in most enterprises, and the only one nobody is watching… Read article
API errors: what to return when something goes wrong
Returning 500 with a stack trace tells an attacker more than it tells your integration partner… Read article
Idempotency keys: making retries safe
The client will retry whether or not you designed for it, and the second request is the one that hurts… Read article
What UPI integration actually involves
You cannot join UPI directly. Everything about the integration follows from that one structural fact, including who your customer complains to when a payment fails. Read article
GST e-invoicing: what integration involves
An invoice without a valid IRN is not a valid invoice, and your customer cannot claim credit on it. That single fact is why e-invoicing integration is a billing-critical path, not a reporting feature. Read article
Bharat Bill Payment System: how it fits together
Two roles, one network, and an escrow requirement that decides whether you participate directly or build on somebody who does. Read articleMore on APIs & integrations
-
Server-Sent Events vs WebSockets: picking the simpler one
Teams reach for WebSockets by default for any real-time feature, and half the time a much simpler technology already built into every browser would have done the job…
-
Reconciliation: the system nobody designs
Every payments product eventually employs someone whose whole job is a spreadsheet that explains why three systems disagree. That job was a design decision.
-
GST's Invoice Management System: what it changes
Doing nothing is now a decision. An invoice you never looked at is deemed accepted, and its credit lands in your return whether it should or not.
-
Integrating with India's credit bureaus
Four bureaus, four formats, four views of the same borrower. Which one you pull decides what you see, and none of them sees everything.
-
GSP or direct: connecting to the GST system
You can integrate with the GST portal directly or through an intermediary. The decision looks technical and is really about who you want to be on the phone to at month-end.
-
Card tokenisation: what you may no longer store
Since October 2022 no merchant, gateway or aggregator may hold card-on-file data. Products built before that, or ported from abroad, frequently still do.
-
Treating your API as a product
An API you expose to customers is a product with users, support costs and a compatibility promise. Most are shipped as a feature and then discovered to be neither.
-
Running more than one payment gateway
Gateways have bad days. If your checkout depends on exactly one, so do your revenues — and the outage always lands during your busiest hour.
-
Changing payment gateway without losing customers
The saved cards and the active mandates do not come with you, and that is the part that decides whether the migration is survivable.
-
Using DigiLocker for document verification
Users uploading photographs of documents is slow, error-prone and hard to verify. Fetching the issued document directly solves all three.
-
Credit on UPI: what changes for merchants
A UPI transaction funded by a credit line behaves differently from one funded by a bank account, and merchant systems often assume they are the same.
-
Integrating with ONDC: what it takes
ONDC is a protocol, not a marketplace. That distinction is the whole story, and it is why integrating feels less like adding a channel and more like joining a network.
-
WhatsApp Business API: costs and constraints
Meta switched to per-message billing in July 2025, and the twenty-four hour service window is now the single biggest lever on what your messaging costs.
-
ABDM integration for health software
Certification is per-software but deployment is per-facility, and confusing the two is why hospital rollouts stall after the vendor declares success.
-
E-way bill integration: rules that bite
Validity is computed from distance, Part B cannot be re-entered, and from August this year ship-to GSTIN became mandatory. Each of those is a design constraint, not a form field.
-
Adding video calling: build, buy, or avoid
The demo takes an afternoon. Everything after the demo is the project.
-
Integrating your product with Indian accounting systems
Whatever you build, the finance team will want it in their accounting package. How hard that is depends entirely on which package.
-
Event-driven architecture: the pitfalls nobody mentions
Decoupling services is easy. Understanding what the system did last Tuesday is the hard part…
-
API versioning and deprecation done properly
Versioning is easy to add and almost impossible to remove. The discipline is in the retirement, not the release…
-
Pagination that does not skip or repeat rows
OFFSET works until the data changes underneath you, and gets slower the deeper anyone goes…
-
Calling third-party APIs without inheriting their outages
Your uptime is capped by every service you call synchronously, unless you design for them failing…
-
Webhooks that arrive: delivery and receipt
Both ends of a webhook are harder than they look, and the characteristic failure is silence…
-
REST or GraphQL: choosing for a real team
The comparison is usually framed as modern against old, which is the least useful way to decide…
-
REST, GraphQL or gRPC: choosing an API style
The right answer usually depends on who is calling you, not on which is technically superior…
-
Sending webhooks your customers can rely on
Your customer's endpoint will be down, slow and wrong at various times. That is your delivery problem, not theirs…
-
Choosing a message broker: queue or log
Kafka and RabbitMQ are not competitors so much as different data structures with different jobs…
-
Importing large files without breaking anything
Customers will upload a two-hundred-megabyte spreadsheet with a row that has one extra comma in it…
-
API documentation developers can actually use
A generated endpoint list is a reference, not documentation. The gap between them is your integration time…
Other topics
Have a question these articles don't answer? Send it to the engineers who wrote them.
Ask an engineer