GlideCurrencyCode - Scoped, Global

  • Release version: Zurich
  • Updated July 31, 2025
  • 1 minute to read
  • The GlideCurrencyCode API provides methods to convert between ISO 4217 alphabetic and numeric codes for a currency.

    Currency code information is also available in the Currency [fx_currency] table, but this API has built-in caching that minimizes the queries issued to fx_currency.

    Use this API to work with third-party APIs that use numeric currency codes, such as credit card network systems.

    This API requires the FX Currency (com.glide.currency2) plugin, which is available by default. This API is provided within the sn_currency namespace.

    GlideCurrencyCode - getCurrencyCode(String numberCode)

    Returns the corresponding alphabetic currency code for a given numeric currency code.

    Table 1. Parameters
    Name Type Description
    numberCode String ISO 4217 numeric currency code.
    Table 2. Returns
    Type Description
    String ISO 4217 alphabetic currency code.

    This example returns the alphabetic currency code for the given currency.

    gs.info(sn_currency.GlideCurrencyCode.getCurrencyCode("840"));

    Output:

    USD

    GlideCurrencyCode - getNumericCurrencyCode(String letterCode)

    Returns the corresponding numeric currency code for a given alphabetic currency code.

    Table 3. Parameters
    Name Type Description
    letterCode String ISO 4217 alphabetic currency code.
    Table 4. Returns
    Type Description
    String ISO 4217 numeric currency code.

    This example returns the numeric currency code for United States dollars (USD).

    gs.info(sn_currency.GlideCurrencyCode.getNumericCurrencyCode("USD"));

    Output:

    840