# Mercado Pago

::: warning Under construction
Payment integrations are still being built. This page describes how the Mercado Pago one will work.
:::

Mercado Pago only sends the payment id. LeadStalker fetches the rest — amount, buyer and status — from its API, which is why this integration needs two credentials.

## What you need

- An **application** under **Your integrations**, in the Mercado Pago developer dashboard.
- The application's production **access token**, to read payments.
- The notifications **secret signature**, to check that each notice really came from Mercado Pago. It's created when you save the URL.

## 1. Create the integration in LeadStalker

In **Business settings → Integrations**, click **Add integration**, pick **Mercado Pago**, give it a name and click **Generate URL**. Copy the URL.

## 2. Copy the access token

1. In the [Mercado Pago developer dashboard](https://www.mercadopago.com.br/developers/panel/app), open **Your integrations** and your application. If you don't have one yet, create it.
2. Go to **Production credentials** and copy the **Access token**.
3. Paste it into the integration's **Access token** field in LeadStalker.

LeadStalker only uses the access token to read payments.

## 3. Set up notifications

1. In the same application, open **Webhooks** and then **Configure notifications**.
2. Under **Production mode**, paste the LeadStalker integration URL.
3. Select the **Payments** event and save.
4. Mercado Pago creates the **secret signature**. Copy it and paste it into the integration's **Webhook secret key** field in LeadStalker. Click **Save credentials**.

## 4. Check it

On Mercado Pago's Webhooks screen, click **Simulate notification**. In LeadStalker, the integration switches to **Receiving**.

## If something isn't working

| Status | What to do |
|---|---|
| Waiting | No notice has arrived: check that the URL is under **Production mode** and the **Payments** event is selected. |
| Token missing | Notices arrived, but the access token or the secret signature is missing. Paste both and save: stored notices are read right after. |

If you reset the secret signature in Mercado Pago, paste the new one in LeadStalker with **Change**.

::: tip Menus change
Platforms change their menus over time. Mercado Pago's notification docs are at [Configure payment notifications](https://www.mercadopago.com.br/developers/en/docs/checkout-pro-orders/notifications).
:::
