Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
E-commerce API security protects the storefront, mobile, partner, and webhook interfaces that modern retail platforms expose, where authorisation flaws leak orders and weak controls enable fraud.

What Is E-Commerce API Security?
A decade ago a retail website was a single application with a database behind it. Today the storefront is one consumer of a set of APIs that also serve mobile applications, marketplace integrations, warehouse systems, loyalty platforms, and whatever the marketing team connected last quarter. The security boundary moved with it. The checkout page is no longer where the rules are enforced; the API is, and it is reachable directly by anyone who opens the network tab in a browser.
Broken object level authorisation is first in the OWASP API Security Top 10 for good reason. An endpoint such as a request for an order by its identifier checks that the caller is authenticated, and forgets to check that the order belongs to them. Change the number, read somebody else’s order: their name, delivery address, telephone number, and basket. Where identifiers are sequential, an attacker enumerates the entire customer base in an afternoon.
The pattern recurs across retail incidents. The T-Mobile disclosure in January 2023 involved an API that allowed retrieval of customer data for around 37 million accounts, and the Optus breach in September 2022 involved an endpoint reachable without authentication at all. Neither needed a clever exploit chain; both needed somebody to check the request against the caller’s entitlement.
Beyond data exposure, commerce APIs carry business logic that can be manipulated directly.
Improper inventory management is the quiet entry in the OWASP list and the one that most often explains a breach. Retail platforms accumulate endpoints: a version the mobile application stopped using two releases ago but which is still deployed, a staging environment with production data, a partner integration built for a campaign that ended, a GraphQL endpoint whose introspection is enabled, and documentation that lists more than the gateway knows about.
The remedy is dull and effective. Maintain a discovered inventory from gateway and traffic analysis rather than from documentation, compare it against what the architecture diagram claims, and put a retirement date on every version at the moment it is superseded. Anything reachable that nobody owns is the most likely entry point you have.
Put every external interface behind a gateway that enforces authentication, applies per-consumer quotas, validates against a published schema, and logs with enough context to investigate. Use opaque, non-sequential identifiers so that enumeration yields nothing even when an authorisation check is missed. Scope tokens narrowly and keep lifetimes short, with mutual TLS for partner integrations where you control both ends.
Test authorisation specifically. Automated scanners find injection and misconfiguration; they do not find that customer A can read customer B’s order, because that requires knowing what the application means. Authorisation testing needs two accounts, a list of endpoints, and someone methodically trying each identifier in the other account’s session. Broader principles are covered in API security, and GraphQL security adds its own query depth and batching concerns.
Mobile applications deserve a separate look, because teams routinely ship API keys and secrets inside the binary on the assumption that nobody will extract them. They will, within minutes, and any endpoint protected only by that key is public.
In the UK, a customer data exposure through an API is a personal data breach reportable to the ICO within 72 hours where it is likely to risk individuals’ rights, and card data exposure brings PCI DSS obligations and acquirer notification with it. At Privia Security, we test commerce APIs, including the partner and webhook paths that rarely appear in a scope document, through our web application security services.
Because an automated tool has no idea which records a given user is entitled to see. A request for order 10492 returns a well-formed response with a 200 status whether or not the order belongs to the caller, so nothing looks wrong. Finding these flaws requires at least two test accounts and a deliberate attempt to access one account’s objects while authenticated as the other.
No, but it is the right place to start. A gateway gives you consistent authentication, quotas, schema validation, and logging, and it reveals what you actually expose. It cannot decide whether a particular user should see a particular order, which is application logic. Treat the gateway as the control plane and keep authorisation decisions inside the service that owns the data.
Verify the provider’s signature on every request using a shared secret or public key, reject anything outside a short timestamp window to prevent replay, and treat the webhook as a notification rather than as truth. Before fulfilling an order, confirm the payment status by querying the provider’s API directly. An endpoint that marks orders paid on an unverified callback is a self-service discount.
An endpoint that is live and reachable but absent from your inventory: a deprecated version kept for an old mobile release, a partner integration from a finished campaign, a staging environment exposed to the internet, or a service someone deployed without telling the platform team. They receive no patching, no monitoring, and no testing, which makes them the most likely route into a retail platform.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.