Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

2.3 Third-Party Integrations — Payments, Analytics, Logistics

Lesson 10 of 21 in the free E-Commerce notes on Siksha Sarovar, written by Rohit Jangra.

2.3 Third-Party Integrations

No e-commerce site is built end-to-end in-house. Every site integrates with specialist vendors for payments, shipping, analytics, customer support, marketing — the plumbing of commerce.

   E-Commerce Site
        │
        ├─► Payment Gateway   (Razorpay, Stripe, PayU)
        ├─► Shipping API      (Shiprocket, Delhivery)
        ├─► SMS / Email       (Twilio, SendGrid, MSG91)
        ├─► Analytics         (Google Analytics, Mixpanel)
        ├─► Customer Support  (Freshdesk, Intercom, Zendesk)
        ├─► Marketing         (MoEngage, CleverTap, Mailchimp)
        ├─► Search            (Algolia, Elasticsearch)
        ├─► Tax & Invoicing   (Cleartax, ClearGST)
        └─► Reviews           (Yotpo, Stamped.io)

---

1. Payment Gateway Integration

The single most important integration — without it, no money flows. Detailed coverage in Unit III; brief here:

What a payment gateway does

FunctionDetail
Accept payment methodsCards, UPI, wallets, net banking, EMI, COD
Tokenise card dataStore secure tokens, not raw card numbers
Authorise transactionVerify with issuing bank
Capture fundsTransfer money to merchant account
SettlementDaily/weekly payout to merchant bank
RefundsReverse the transaction
3D SecureTwo-factor auth for cards
Recurring paymentsFor subscriptions
Fraud detectionFlag suspicious transactions

Indian payment gateways

ProviderSpecial StrengthsFee Typical
RazorpayUPI, dashboards, dev-friendly2% per txn
PayUBank tie-ups, India + LATAM2%
CashfreePayouts + collection1.75-2%
CCAvenueLong-running, many banks2.5%
InstamojoSmall business focus2-5%
PhonePe Payment GatewayUPI-strong0.4-1.5%
BillDeskBill payments, B2BQuote-based
StripeGlobal, dev experience2% (India: 2.3% + ₹2)
Atom TechnologiesBanking-heavy1.5-2%

Integration pattern

---

2. Shipping & Logistics Integration

Once an order is placed, it must move physically. Aggregator APIs integrate with multiple carriers:

Indian logistics aggregators

AggregatorCarriers IntegratedCoverage
Shiprocket17+ carriers24,000+ pin codes
Pickrr10+ carriersPan-India
iThink Logistics10+ carriers27,000+ pin codes
Delhivery (direct)Self19,000+ pin codes
BlueDart (direct)SelfPremium / international
DTDC, Ecom Express, XpressbeesSelfMajor metros + tier 2/3

Logistics functions integrated

FunctionDetail
Rate calculationShow shipping cost on PDP / cart
PIN serviceability"Available in your area" check
Pickup bookingSchedule courier pickup
Label generationPrint shipping labels
TrackingLive status, customer-facing tracking page
Return / RTOReverse pickup if returned
COD remittanceCarrier collects cash, settles to merchant

Last-mile in quick-commerce

Blinkit/Zepto/Instamart don't use carriers — they operate dark stores (mini-warehouses) and gig delivery (own / partner riders). Different model: 10-minute SLA requires own infrastructure.

---

3. Analytics & Tracking

You can't improve what you don't measure. Standard analytics integrations:

ToolPurpose
Google Analytics 4 (GA4)Universal web/app analytics
Mixpanel / AmplitudeProduct analytics, funnels, cohorts
Hotjar / SmartlookSession recordings, heatmaps
Adobe AnalyticsEnterprise web analytics
Branch / AppsFlyerMobile attribution
Meta Pixel (Facebook)FB/Insta ad effectiveness
Google Ads conversion tagGoogle ad effectiveness
Tag Manager (GTM)Manage all tags in one place

Key e-commerce metrics

MetricDefinition
GMV (Gross Merchandise Value)Total value of orders
AOV (Average Order Value)GMV / number of orders
CR (Conversion Rate)Orders / Visitors
CAC (Customer Acquisition Cost)Marketing spend / new customers
LTV (Lifetime Value)Average revenue from a customer over their lifetime
LTV/CACHealth ratio; > 3 is good
Cart abandonment rateCarts not converted / Carts started
Return rate (RTO)Returns / Orders shipped
Repeat rateCustomers ordering more than once
NPSNet Promoter Score — likelihood to recommend

---

4. Customer Support Integration

E-commerce generates support tickets continuously. Standard integrations:

ToolSpecialty
FreshdeskIndia-built, popular SMB
ZendeskGlobal enterprise leader
IntercomModern conversational support
HelpshiftMobile-first support
Salesforce Service CloudEnterprise + CRM
WhatsApp Business APIIndia-specific powerhouse

Support channels

  • Ticket / Email — async, formal
  • Chat (live agent) — sync, fast resolution
  • Chatbot — 24×7, AI-powered (see next lesson)
  • Phone (IVR) — for older / less-tech audiences
  • WhatsApp — India's preferred channel
  • Self-serve — FAQ, help centre, order-tracking page

---

5. Marketing Automation

ToolSpecialty
MoEngageIndia-built, push/SMS/email
CleverTapIndia-built, mobile-first
BrazeGlobal enterprise
MailchimpSMB email, simple
SendGridTransactional email at scale
HubSpotAll-in-one CRM + marketing
KlaviyoShopify-focused, fastest growing

Automation use cases

  • Welcome email sequence to new sign-ups
  • Cart abandonment reminders
  • Re-engagement of dormant customers
  • Post-purchase review request, complementary product recommendations
  • Personalised newsletters based on browse history
  • Loyalty program tiering and rewards

---

6. Search

Built-in DB queries don't scale for e-commerce search. Specialist tools:

ToolStrength
ElasticsearchOpen-source, customisable
AlgoliaHosted, sub-50ms, dev-friendly
TypesenseOpen-source Algolia alternative
SolrMature, Apache stack
AWS OpenSearchManaged Elasticsearch
Vertex AI / Vector DBModern semantic search

Search features expected

  • Typo tolerance (iphonriphone)
  • Synonyms (shirt ↔ tee ↔ t-shirt)
  • Filters and facets (combined with search)
  • Auto-suggest as typing
  • Spelling correction
  • Personalised ranking
  • Sponsored placements (revenue)

---

7. Reviews and Ratings

Reviews are the single most powerful trust mechanism on a product page — Baymard and BrightLocal both report that 90%+ of buyers read reviews before purchasing, and the perceived authenticity of reviews can make or break a conversion. The two dominant patterns are first-party reviews (collected on the site itself, often via tools like Yotpo — which bundles reviews with SMS marketing and loyalty — or Stamped.io, which adds social sharing) and third-party / independent reviews on platforms like Trustpilot that buyers trust because the brand cannot easily delete bad ones. Google Customer Reviews is the third major axis: opt-in seller ratings that surface inside Google Search and Google Shopping ads, giving review-collecting brands a measurable click-through-rate bump. Other India-friendly alternatives include TrustVox and Reviews.io.

---

8. Tax, Invoicing & Compliance

In India, this is non-trivial:

NeedTool
GST e-invoice generationClearTax, Cleartax e-Invoice, ZohoBooks
HSN code mappingRequired for invoicing
Multi-state GSTDifferent rates per state, intra/interstate distinction
TDS/TCSFor marketplaces, deducted at source
Payment Aggregator licenceRBI regulation for handling payments

---

9. Recommendation Engine (overlaps next lesson)

Most brands choose one of four levels of recommendation sophistication. Plug-and-play hosted services like Algolia Recommend drop into the site as a JavaScript widget — minimum effort, decent results. Managed cloud ML like Amazon Personalize offers more sophisticated models (user-personalisation, similar-items, personalised ranking) at the cost of needing to feed clean event data and tune the model. India-built solutions like Tagalys specialise in catalog merchandising — auto-sorting category pages by likely conversion. At the top of the stack, large brands build custom recommenders in Python using scikit-learn, TensorFlow, or PyTorch — required only when proprietary signals (user clusters, supply constraints, margin) need to shape the output and off-the-shelf solutions cannot model them.

---

10. Other integrations

CategoryTools
A/B testingOptimizely, VWO, Google Optimize
PersonalisationDynamic Yield, Monetate
Loyalty programsYotpo, Smile.io, LoyaltyLion
AffiliatesCuelinks, Refersion
ChatbotsIntercom, Drift, Verloop, Yellow.ai
Sentiment analysisBrand24, Talkwalker
Image / video CDNCloudinary, ImageKit (India-built)
Tag managementGoogle Tag Manager, Tealium

---

Architecture of an Integrated E-Commerce Stack

A typical Indian e-commerce site uses 15-25 third-party services — most via webhook + REST API.

---

Key Terms — Lesson 2.3

This lesson is dense with vendor-side vocabulary. The terms below cut across payments, logistics, analytics, support and marketing — they are the words a working e-commerce ops/product team uses every day.

Payment Gateway — Software (and the regulatory entity behind it) that captures payment details from the buyer, tokenises them, authorises the transaction with the buyer's issuing bank, captures the funds, and eventually settles the money to the merchant's bank account. Razorpay, PayU, Cashfree, CCAvenue, Stripe and PhonePe Payment Gateway are the dominant choices in India. Without a payment gateway, no money can move; with one, the merchant gets a single API for cards, UPI, wallets, net-banking, EMI and even COD reconciliation.

Payment Aggregator (PA) — An RBI-licensed entity authorised to collect money on behalf of merchants. All payment gateways operating in India must hold (or operate under) a PA licence — this is what lets them legally hold customer money in a nodal account between authorisation and settlement. The PA licence requirement (RBI guidelines, 2020 / 2023 updates) is why a startup cannot just "build its own payment gateway."

Tokenisation — Replacing sensitive card data (16-digit card number, CVV) with a non-sensitive token that is useless if stolen. The actual card data is stored inside the network's (Visa, Mastercard, RuPay) vault; the merchant only handles the token. RBI's card-tokenisation mandate (October 2022) prohibits merchants from storing raw card numbers and has effectively forced every Indian e-commerce site to switch to tokens.

3D Secure (3DS / 3DS 2.0) — A two-factor authentication step for card transactions where the issuing bank asks the cardholder to confirm the transaction — historically with an OTP, increasingly with biometric or app push. 3D Secure shifts the fraud liability from the merchant to the issuer when a fraudulent transaction goes through. RBI mandates 3DS for almost all Indian card transactions.

Webhook — A server-to-server HTTP callback used to notify a system of an event in real time. When Razorpay captures a payment, it sends a webhook (payment.captured) to the merchant's URL with the order details. Webhooks are the inverse of a traditional API — instead of the merchant polling for status, the vendor pushes the event. Modern e-commerce sites handle dozens of webhook types (payment events, shipping events, customer events) and the engineering complexity is in idempotency (handling duplicates) and ordering (the network does not guarantee delivery order).

API Aggregator — A vendor that wraps multiple downstream providers behind a single API. Shiprocket is the canonical Indian example: instead of integrating separately with Delhivery, BlueDart, DTDC, Ecom Express, and Xpressbees, the merchant integrates once with Shiprocket and chooses the cheapest/fastest courier at run time. Aggregators take a markup; the merchant trades a little margin for massive integration savings.

Dark Store — A small warehouse — typically 2,000–4,000 sq ft, located inside a neighbourhood — that holds 2,000–8,000 SKUs of fast-moving items and is staffed only for picking and dispatch (no walk-in customers). Dark stores are the operational secret to quick commerce: Blinkit, Zepto, Swiggy Instamart, BBnow all run hundreds of dark stores in Indian cities to enable 10-minute delivery.

Last Mile — The final leg of the delivery — from the local warehouse/dark store/courier hub to the customer's door. Last-mile is the most expensive segment in logistics (40–60% of total shipping cost) because it does not benefit from consolidation: each parcel goes to a different doorstep. Last-mile cost-per-drop is the make-or-break number for quick commerce and tier-3 e-commerce.

RTO (Return-to-Origin) — When a shipped order comes back to the seller without being accepted — buyer refused COD, address was undeliverable, recipient was untraceable, or buyer returned the unopened parcel. RTO costs (forward shipping + return shipping + restocking + lost margin) can run 8–15% of order value in COD-heavy categories and is the largest single profit-killer for many Indian sellers.

Mobile Attribution — Tools and protocols (AppsFlyer, Branch, Adjust) that identify which marketing channel (Google ad, Facebook ad, influencer link, organic) drove a mobile-app install or in-app event. Attribution is what lets a brand measure ROI on its ad spend — without it, marketing budget is being allocated blind.

Google Analytics 4 (GA4) — The current generation of Google's web/app analytics product, event-based rather than session-based, and the de-facto default for SMB and mid-market e-commerce in India. Replaces "Universal Analytics" (sunset July 2023).

Mixpanel / Amplitude — Product-analytics tools that go beyond GA's traffic focus and answer questions like "what % of users who add to cart complete checkout within 24 hours?", "which user cohorts are retaining?", "what is the median time from sign-up to first order?". They are the standard for product and growth teams at modern D2C brands.

Cohort — A group of users defined by a shared characteristic and time window — "users who signed up in March 2026", "users acquired via Instagram Reels", "users from Bengaluru pincodes". Cohort analysis tracks behaviour over time for the same group of users and is the single most informative analytics view for retention.

Customer Acquisition Cost (CAC) — Total marketing and sales spend ÷ number of new customers acquired. CAC is half of the most important unit-economics ratio in commerce.

Lifetime Value (LTV / CLV) — Total expected revenue from a single customer over their relationship with the brand. The healthier the LTV, the more a brand can afford to spend on acquisition. The LTV:CAC ratio is the headline number; > 3:1 is the rule-of-thumb threshold for a healthy business.

Net Promoter Score (NPS) — A single-question loyalty metric: "How likely are you to recommend us to a friend or colleague, on a scale of 0–10?" Promoters (9–10) minus detractors (0–6), expressed as a number from −100 to +100. NPS above +50 is excellent; below 0 is alarming.

Marketing Automation — Tools (MoEngage, CleverTap, Braze, Klaviyo, Mailchimp) that send the right message to the right user via the right channel at the right time, based on user attributes and event triggers. Typical automated journeys include welcome-series, cart-abandonment, browse-abandonment, post-purchase reviews, and dormant-user re-engagement.

WhatsApp Business API — A programmatic API (Meta-owned) that lets a business send transactional and marketing messages to opted-in users on WhatsApp. In India, WhatsApp is the highest-engagement channel — open rates of 80–95% vs 15–25% for email — and is increasingly used for order confirmations, shipping updates, cart-abandonment recovery, and even catalog browsing within the chat.

A/B Test — An experiment that splits traffic between two versions of a page or flow and measures which performs better on a defined metric. A/B testing is how the largest e-commerce companies improve — Amazon and Flipkart run hundreds of A/B tests per day. Tools: Optimizely, VWO, Google Optimize (sunset 2023, replaced by GA4 + native experiments).

Sandbox / Test Mode — A simulated, non-production version of an external API. Payment gateways (Razorpay test mode), logistics APIs (Shiprocket test creds), and SMS gateways all expose a sandbox where the developer can run fake transactions to validate integration before going live.

---

Study deep

  1. Buy not build for plumbing. Building your own payment gateway is illegal (RBI licence needed). Building your own analytics is reinventing what GA does free. Use specialists for plumbing; build your differentiator.
  1. Integration is the new platform. Modern e-commerce platforms (Shopify, BigCommerce) win on quality of their app marketplace. Shopify has 10,000+ apps — every integration imaginable.
  1. API-first is non-negotiable. Every integration uses REST API or webhooks. A well-documented public API is a competitive advantage.
  1. Webhook hell is real. A site may receive 50+ webhook types from various vendors — payment events, shipping events, customer events. Idempotency and ordering are critical.
  1. Vendor lock-in is a real risk. Switching payment gateways or analytics tools requires migration of data, code changes, and historical reporting. Plan for portability where possible.
PYQ pattern: "Discuss third-party integrations in an e-commerce website." — List 5-6 categories (payments, shipping, analytics, support, marketing), name 2-3 tools per category, explain why each integration matters.