Skip to content

Use cases_

Dynamic pricing & FX

Price in local currency at a live central-bank rate.

Present prices in the buyer’s own currency, converted at a rate you can attribute to a central bank, with staleness reported. Reconcile historical orders at the rate that actually applied on the day.

Why it works_

Local prices, defensible rates

Central-bank rates

No reseller markup; each rate names its source and date.

dynamic-pricing-fx.sh
curl "https://api.localesense.com/v1/fx?base=USD" \
  -H "Authorization: Bearer ls_live_..."

Money-safe conversion

bcmath at scale 12, strings end to end — never a float.

Historical reconciliation

The rate as it stood on any past date, on the Business tier.

The data behind it

What your code sees, per request.

A sample of the real response shape for a visitor in the United States — every value attributable, nothing guessed. Point the same call at any of the 197 markets.

Live FX Currency
Try it live in the docs
GET /v1/self 200 OK · sample
  • FX 1 USD = 1.00 USD · pivot
  • Currency USD · 2dp · $123,456.78

Keep exploring_

Related use cases

FAQs

Dynamic pricing & FX — frequently asked

How do I show prices in a visitor's local currency?

Detect their currency from the same call that localizes the rest of the checkout, then convert your base price at a live central-bank rate. Amounts are strings converted in bcmath, so the figure you display is exact, not a rounded float.

Can I reconcile past orders at the rate that applied that day?

Yes — on the Business tier you can query the historical rate for any past date, so refunds, chargebacks and accounting reconcile against the rate that actually applied on the order date, not today's.

Is a central-bank rate the right one for pricing?

It is the most defensible reference rate: public, attributable and free of reseller markup. For display and reconciliation it gives you a number you can point to a source for. If you need a margin, you add your own spread on top of a rate you can name.

Get started

Try it free

10,000 requests a month, no card. Every tier includes live FX and the full formatting engine.

Get your API key