Use cases

Detecting country of origin for compliance reporting

Selling digital goods across borders comes with a reporting obligation that a lot of smaller sellers underestimate until it becomes a problem: knowing, with reasonable confidence, which country each transaction actually took place in, since tax treatment and reporting requirements for digital sales often depend specifically on the buyer's location rather than the seller's own. A self-declared country on a checkout form is a start, but it is also trivially easy for a buyer to get wrong or misrepresent, intentionally or not, and a compliance-minded seller needed a second, independent signal to check that declaration against.

The seller added a server-side check at the point of purchase. /v1/ip resolved the buyer's IP address into a country field, checked automatically against whatever country the buyer had entered or selected during checkout. Where the two agreed, which was the overwhelming majority of transactions, nothing further happened, the declared country stood as the transaction's country of record. Where they disagreed, the transaction was flagged for a closer look before being finalized, since a mismatch could mean anything from a buyer traveling abroad and using their home billing details, to someone routing through a VPN, to a genuine attempt to misrepresent their location for a pricing or tax advantage.

The seller was careful not to treat every mismatch as evidence of wrongdoing, since plenty of legitimate transactions involve someone temporarily outside their home country making a purchase using their normal payment details. The flag triggered a review step rather than an automatic block, and the review looked at the transaction as a whole, payment method country, billing address, and IP-detected country together, rather than rejecting anything based on IP mismatch alone.

For its own compliance recordkeeping, the seller retained both the declared country and the IP-detected country against each transaction, along with a note on how any disagreement had been resolved. That record gave the company something concrete to point to if a tax authority or payment processor ever asked how it determined the country of a given sale, a documented, consistent process rather than an unverifiable claim based on checkout form data alone.

None of this is a substitute for proper tax and legal advice specific to the jurisdictions a seller operates in, and the company treated the IP check as one input into a broader compliance process built with guidance from its own accountants, not a complete solution on its own. What IP geolocation contributed specifically was a cheap, consistent, server-side signal that did not depend on a buyer filling out a form honestly, which meaningfully strengthened a compliance process that had previously relied on self-reported data alone.

Volume matched transaction volume directly, one lookup per purchase, which for a digital goods seller of moderate size fits comfortably inside the free daily allowance most months, moving into prepaid credit during a strong sales period without requiring any advance planning, since the per-request cost scales in the same direction as revenue does.

Getting country detection right matters more the moment a business starts taking tax and reporting obligations seriously, and a reliable, independent signal that does not depend on what a buyer chooses to type is worth having in place before it is needed rather than after. Documentation for the endpoint is at /docs/ipv4-lookup/ and /docs/ipv6-lookup/.