# Before you start

Two things to put in place in the merchant portal. Without them the API rejects charges, and that is on purpose.

> **What you will build beyond this.** Storing the charge id against your order, [configuring and verifying the webhook](/en/webhooks), discarding repeated notices, and deciding what you do if the notice never arrives. Each one has its own page.

## 1. Register your site and where the buyer returns

In the portal, under **Settings → Your site and the buyer's return**, there are two addresses:

| What         | What it is                                                                                 |
| ------------ | ------------------------------------------------------------------------------------------ |
| Your website | `https://tutienda.co`. Defines the domain a buyer is allowed to return to.                 |
| Return page  | `https://tutienda.co/gracias`. Where a payer lands when the charge does not carry its own. |

Both have to be `https`, and the return one has to belong to your own site or to a subdomain of it. That is what stops someone who steals your key from taking your buyers to somebody else's page.

> **Without this you cannot charge.** It is not bureaucracy: a charge with no return page leaves the buyer sitting in the gateway, with no way back to your store and no way to know whether their order went through.

## 2. Get your integration key

In the same portal, under **Settings → Integration key**. There are **two**:

| Key           | What for                                                 |
| ------------- | -------------------------------------------------------- |
| `evpk_live_…` | Production. Charges for real.                            |
| `evpk_test_…` | Testing. Touches no gateway and moves not a single peso. |

Each one is shown **only once**: if you lose it, you rotate it and the previous one stops working.

Start with the test key. What you can verify with it —and what you cannot yet— is in [test without charging](/en/testing).

> **The key is secret and belongs on your server only.** Never in the browser, never in your page's code, never in a mobile app: whoever holds it can charge in your name. That is why there is no JavaScript snippet to paste into your store — the integration is server to server.

## Check that everything answers

With the key in hand, this returns your merchant's details:

```bash
curl https://api.evetev.com/v1/merchants/me \
  -H "Authorization: Bearer evpk_tu_llave"
```

If it answers `401`, the key is wrong or you rotated it. If it answers `200`, you can go ahead and [create your first charge](/en/create-a-charge).

## Your merchant id

The response above carries an `id`: that is the `merchantId` every charge carries. Store it in your configuration; it does not change.
