Constants
All constants exported by @flopay/shared, including SDK version, themes, element types, card brands, and currency mappings.
SDK Version and API
SDK_VERSION
Current SDK version string.
DEFAULT_API_BASE_URL
Default FloPay API base URL used by @flopay/node.
DEFAULT_API_VERSION
Default API version header value.
Themes
DEFAULT_APPEARANCE
The default appearance applied when no custom appearance is provided.
FLAT_APPEARANCE
Flat theme with minimal borders and shadows. Inherits all variables from DEFAULT_APPEARANCE except borderRadius.
NIGHT_APPEARANCE
Night (dark) theme with a dark background.
Element Types
ELEMENT_TYPES
All supported element type identifiers. Used to validate element creation.
Card Brands
SUPPORTED_CARD_BRANDS
List of supported card brands.
Currency
CURRENCY_MAP
Maps ISO 3166-1 alpha-2 country codes to currency information. Includes entries for:
| Region | Countries | Currency |
|---|---|---|
| Eurozone + EU | AT, BE, BG, CY, CZ, DE, DK, EE, ES, FI, FR, GR, HR, HU, IE, IT, LT, LU, LV, MT, NL, PL, PT, RO, SE, SI, SK | EUR |
| United Kingdom | GB | GBP |
| United States | US | USD |
| Canada | CA | CAD |
| New Zealand | NZ | NZD |
| Australia | AU | AUD |
Each entry is a CurrencyInfo object with currency, symbol, country, countryCode, and tax (0 or 1).
DEFAULT_CURRENCY
Default currency information returned when a country is not in CURRENCY_MAP.
Countries, States & Provinces
COUNTRY_OPTIONS
The full list of ISO 3166-1 alpha-2 countries used by the AVS country dropdown. Priority countries (US, GB, CA, AU, NZ, EU) appear first; the remainder are sorted alphabetically. Each entry has code, name, and flag (emoji).
Use getCountryByCode to look up a single entry.
US_STATES
51 entries — all 50 US states plus District of Columbia. Codes are 2-letter USPS abbreviations (e.g. 'AL', 'CA', 'WY').
Used by the SDK to render a <select> for the AVS state field when country === 'US'.
CA_PROVINCES
13 entries — all 10 Canadian provinces plus 3 territories. Codes are 2-letter ISO 3166-2:CA subdivisions (e.g. 'AB', 'ON', 'QC').
Used by the SDK to render a <select> for the AVS state field when country === 'CA'.
See getStateOptions and getStateLabel for the helpers that consume these.