Payment API
    • Retrieving Client Information with JavaScript
    • Sale Request
      POST
    • Status Request
      POST
    • Refund Request
      POST
    • Schemas
      • Schemas
        • Sale
        • Merchant
        • Customer
        • Billing
        • Billing-Card
        • Webhooks
        • Browser
        • Risk-Params
        • Refund-Transaction

    Retrieving Client Information with JavaScript

    Retrieving Client Information#

    Most of the following values can be obtained from the Cardholder's browser using JavaScript. Values corresponding to HTTP request headers should preferably be obtained from the incoming request on the server side.

    accept-header#

    There is no standard JavaScript API for reading the Accept header automatically generated for an HTTP request.
    The recommended approach is to obtain the actual Accept header from the Cardholder's incoming HTTP request on the server side.
    If the application explicitly sets the Accept header for the client request, the same explicitly configured value may be submitted.

    java-enabled#

    Use navigator.javaEnabled() to obtain the value.
    The returned value is a boolean:
    true
    false
    Note: In modern browsers, navigator.javaEnabled() always returns false.

    language#

    Use navigator.language to obtain the browser's preferred language.
    Example:
    ja-JP
    en-US
    The returned value is a BCP 47 language tag.

    screen-width#

    Use screen.width to obtain the total width of the Cardholder's screen in CSS pixels.
    Example:
    1920

    screen-height#

    Use screen.height to obtain the total height of the Cardholder's screen in CSS pixels.
    Example:
    1080

    screen-color-depth#

    Use screen.colorDepth to obtain the color depth of the Cardholder's screen.
    If the obtained value is not one of the supported values, the nearest supported value lower than the actual value should be used.
    Supported values:
    1, 4, 8, 15, 16, 24, 32, 48
    Example implementation:
    For example, if screen.colorDepth returns 30, the submitted value will be 24.

    time-zone#

    Use Intl.DateTimeFormat().resolvedOptions().timeZone to obtain the Cardholder's IANA time zone identifier.
    Example:
    Asia/Tokyo
    America/New_York
    Europe/London
    UTC

    user-agent#

    Use navigator.userAgent to obtain the browser's User-Agent string.
    Example:
    Mozilla/5.0 (...)
    If the exact User-Agent header from the incoming HTTP request is required, it should be obtained on the server side.
    Next
    Sale Request
    Built with