# GETTING STARTED

Installing ECS could not be easier.

## Step 1: Sign up

Go the following [URL](https://cryptoskillz.com/) and follow the sign up instructions.

### Step 2: Add email

Add a valid email address.  Whenever you receive and order we will send the details of the order to this email address.

![](/files/-LnWaIxn9f0iTWnY3Ukf)

## Step 3: Add Bitcoin address

Add a Bitcoin address, this is the address we will send the funds to after you make a sale. We never keep your funds on the full node longer than we have to, as soon as we have 3 confirmations we forward the funds on to you.

![](/files/-LnWam3RunGqLqyhqecj)

## Step 4: Copy the code&#x20;

Copy the code from this step and add it to your website.

![](/files/-LnWb8vyHd0Wk_ZBIj5M)

## Step 5: Add code to your website

This is an example of the code you will get something like the following output.&#x20;

```
<!-- Payment button -->
<a href="#0" 
id="sr-add-to-cart" 
cart-type="2"
class="sr-add-to-cart" 
data-price="100000" 
data-name="Entity T" 
data-preview="">Add To Cart</a>

<!-- add this to the footer -->
<script type="text/javascript">2
SR.init(
["https://ecstest.cryptoskillz.com",
15,
"https://cryptoskillz.com/srcrypto/prod/cdn/theme/",
"27",
1,
"GB",
0,
"",
1]);
</script>
```

### Step 5a: Payment button

Let us take a look at the payment button as you see this is a simple \<a> tag.  It can be any html element you want and can be styled how you want it, that is none of our business.  As you can it has a number of unique parameters which we will break down here.

We currently support 2 cart types

```
cart-type="0" //default cart type
cart-type="1" //donation cart type
```

This is the class that tells ECS that this is a payment button.

```
id="sr-add-to-cart" 
class="sr-add-to-cart" 
```

This is the price you want to charge for the product. ECS will use this to either update a product in the database or create a new one with this price if one is not found. The price is in Satoshi's.

```
data-price="100000" 
```

This is the name of the product. ECS will use this to either update a product in the database or create a new one with this price if one is not found.

```
data-name="Entity T" 
```

This is a preview image that it will use in the cart.  This is an optional setting

```
data-preview=""
```

### Step 5b: Initialisation code

This is the code you place in the footer of your website to load the ECS cart and be able to take payments in Bitcoin.  It has a number of configuration options let us take a look at them.

```
server url
quantity
cdn url
uid
shipping address
start country
serverless
serverless btc address
lightning
```

**server url**

The first one is the URL of the ECS server.  Currently we have 2 ECS urls one the bitcoin testnet and one for the mainnet.  Please use the correct one to serve your requirements.

***Testnet***

```
https://ecstest.cryptoskillz.com
```

***Mainnet***

```
https://ecslive.cryptoskillz.com
```

**quantity**&#x20;

This parameter controls the max quantity of the product you can buy.

```
15
```

**uid**

This parameter is your unique ID you got whilst signing up.

```
"27"
```

**cdn url**

This parameter is the url that hosts the ECS cart's theme

```
https://s3.eu-west-1.amazonaws.com/cryptoskillz.com/srcrypto/prod/cdn/
```

**shipping address**

This parameter is a boolean that sets if you want to capture a shipping address&#x20;

```
0/1
```

**serverless**

This parameter is a boolean mode that sets serverless mode.  Basically when you run this you do not require a full node or ECS to be running it uses the simply sends the funds to the BTC address that you specify.

Note, this does not validate the transactions so it is not the safest way to run a BTC ecommerce on your site.  However it does allow you to run ECS on static sites and you do not have to have an ECS server or a full node running.

Note, you cannot use Lightning in serverless mode.

```
0/1
```

&#x20;**serverless BTC address**

This parameter sets the BTC address that the funds are to be sent to.&#x20;

```
2Mxuxecw9ZV6LkK5QwdGgiB8bZUBddydDBo
```

**lightning**

This parameter is a boolean to set use Lightning or not.&#x20;

```
0/1
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ecs-2.gitbook.io/ecs/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
