DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsGlobal DataCurrency & Pricing
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
getGlobalData()Currency & PricingFeature FlagsMaintenance Mode
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Currency & Pricing

Currency configuration and price formatting.

Updated March 29, 2026

On this page
  • Overview
  • Reading Currency
  • Formatting Prices
  • Price Fields
  • Next Steps

Overview

Currency and pricing settings are configured at the organization level and returned in the global data.

Reading Currency

typescript
import dash from "@/lib/dash"

const { global } = await dash.getGlobalData()
console.log(global.currency)  // "USD"

Formatting Prices

typescript
function formatPrice(price: string, currency = "USD") {
  return new Intl.NumberFormat("en-US", {
    style: "currency",
    currency,
  }).format(Number(price))
}

formatPrice("29.99")     // "$29.99"
formatPrice("29.99", "EUR")  // "€29.99"

Price Fields

All prices in the API are returned as strings to avoid floating-point precision issues:

json
{
  "price": "29.99",
  "discounted_price": "24.99",
  "subtotal": "59.98"
}
Tip: Always use Number(price) or parseFloat(price) when doing math with prices, and convert back to a fixed-point string for display.

Next Steps

  • getGlobalData() — Full global settings
  • List Products — Product pricing
PreviousgetGlobalData()NextFeature Flags

On this page

  • Overview
  • Reading Currency
  • Formatting Prices
  • Price Fields
  • Next Steps