# SafeCharge

SafeCharge is 3DS 2.0 only

Activate the SafeCharge gateway tile

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FedTfVF0LuFXczPq5VaKX%2Fimage.png?alt=media&#x26;token=cbe4ee8f-be8d-49a2-a8ca-86ec48ad03de" alt=""><figcaption></figcaption></figure>

Enter SafeCharge credentials on your account

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FXluie5S578FRQEFjjr9x%2Fimage.png?alt=media&#x26;token=9bf42a78-cfbb-4488-a631-af12ce511533" alt=""><figcaption></figcaption></figure>

3DS processing requires browser data be passed on the initial order/import API call. Review this example of one method to send browserData parameter.

```
browserData input to be added to checkout page:
<input type="hidden" name="browserData" value="" id="browserData">

Script to get browserData:
<script type="text/javascript">
    const navigator = window.navigator;
    const browserData = {
        acceptHeader: 'application/json',
        userAgent: navigator.userAgent,
        language: navigator.language,
        timezone: (new Date()).getTimezoneOffset().toString(),
        colorDepth: screen.colorDepth,
        screen: {
            height: screen.height.toString(),
            width: screen.width.toString()
        },
        javaScriptEnabled: true,
        javaEnabled: navigator.javaEnabled()
    };
    document.getElementById('browserData').value = JSON.stringify(browserData);
</script>
```
