Connecting Mercado Pago in Lueira

Step-by-step guide to connect your Mercado Pago account to Lueira and take payments in your online store: what details you need, where to get them in Mercado Pago and where to paste them in Lueira.

On this page
  1. How it works:
  2. Before you start you need:
  3. What data you need and where it comes from
  4. 1. Create an application in Mercado Pago
  5. 2. Copy your production credentials
  6. 3. Connect Mercado Pago in Lueira
  7. 4. Add the webhook secret key (optional, recommended)
  8. 5. Activate MercadoPago in your online store
  9. Optional: test before taking real payments
  10. Related articles

With Mercado Pago you can take payments in your online store using your own Mercado Pago account (Checkout Pro): the customer pays on Mercado Pago's secure page and the money goes straight to your account. It is available for Argentina, Brazil, Chile, Colombia, Mexico, Peru and Uruguay.

The connection is done once and takes about 15 minutes. You don't need to know how to code: you just create an "application" in Mercado Pago, copy two keys and paste them into Lueira. This guide tells you where to click and where each piece of data comes from.

How it works:

For Lueira to be able to take payments on your behalf, Mercado Pago needs to give it permission. That permission is granted with two keys, called credentials, which Mercado Pago generates for an application that you create inside your account.


Before you start you need:

  • A Mercado Pago account that you want to take payments with, from the same country as your company in Lueira.

  • The currency of your company in Lueira must be that of your Mercado Pago account (for example, Argentine pesos (ARS) if your account is from Argentina).

  • Administrator access to Lueira.

  • Two browser tabs open: one with Mercado Pago and one with Lueira. You will copy data from one and paste it into the other.

💡 If you don't see the MercadoPago card in Settings > Payments, it may not be activated on your account yet. Write to us at support@lueira.com and we will activate it.

What data you need and where it comes from

This is a summary of everything you will copy and paste. Below you have each step in detail.

Data

What it is

Where you get it

Public key (required)

Public key of your application. It starts with APP_USR-.

From Mercado Pago: Integrations > your application > PRODUCTION > Production credentials.

Access token (required)

Private key that lets Lueira create charges on your account. It also starts with APP_USR-. Do not share it with anyone.

From Mercado Pago: the same screen as the Public key.

Notification URL (optional)

A Lueira address, unique to your account, which is registered in Mercado Pago to obtain the secret key.

From Lueira: Settings > Payments > MercadoPago card. It appears when you save the credentials.

Webhook secret key (optional, recommended)

A password that lets Lueira check that payment notifications really come from Mercado Pago. In Mercado Pago it appears as "Secret key" ("Clave secreta").

From Mercado Pago: Integrations > your application > NOTIFICATIONS > Webhooks > Configure notifications, after saving the notification URL.

1. Create an application in Mercado Pago

This part is done on the Mercado Pago website, not in Lueira. Each business creates its own application inside its account.

Full-size preview
  1. Go to Mercado Pago Developers (if your account is from another country, use the Mercado Pago website for your country) and log in with the account you want to take payments with.

  2. Click Integrations ("Integraciones"), at the top right. The Integration management ("Gestión de integraciones") screen will open, where your applications appear.

  3. Click + Create application ("+ Crear aplicación"), at the top right. If you don't have any application yet, you will see the message "Create your first application" and the Create application button in the middle of the screen.

    Full-size preview

  4. Under "Choose a solution to integrate", tick Checkout Pro ("Use a ready-made checkout that redirects to Mercado Pago"). The other options don't work for Lueira.

    Full-size preview

  5. Expand the Other data section and check that API type is Preferences API. It comes like this by default: don't change it.

  6. In Application name, Mercado Pago suggests an automatic one (for example, "App-Checkout-Pro-…"). You can keep it or write your own. We recommend "Lueira - " followed by your business name (for example, "Lueira - Surf Mar del Plata").

  7. Tick the authorisation checkbox (Privacy Statement and Terms and conditions).

  8. Click Create application.

2. Copy your production credentials

The credentials are the "key" that lets Lueira take payments on your behalf. Mercado Pago has one set for testing and another for real payments. To start selling you need the production one.

  1. Inside your application you will see a menu on the left with several sections (TESTING, NOTIFICATIONS, PRODUCTION, EVALUATION). In the PRODUCTION section, click Production credentials.

  2. If Mercado Pago asks you to activate them, complete the form that appears (for example, your business's industry and its website) and click the button to activate the production credentials.

  3. You will see four items: Public Key, Access Token, Client ID and Client Secret. Lueira only needs the Public Key and the Access Token.

  4. Copy each one with the copy icon to its right. The Access Token appears hidden behind dots: click the eye icon to see it.

💡 At the bottom of that screen, Mercado Pago offers "Share credentials" with a developer. If someone else is going to make the connection for you, use that option instead of sending them the keys by email or chat.

⚠️ Important: don't use the Client ID or the Client Secret, Lueira doesn't need them. And don't share the Access Token with anyone: whoever has it can operate on your account.


3. Connect Mercado Pago in Lueira

  1. In Lueira, go to Settings > Payments and find the MercadoPago card. Click the button to connect it.

  2. The MercadoPago credentials window will open. Paste the Public key and the Access token you copied in step 2.

  3. Leave the Webhook secret key field empty: it is optional and we will add it in step 4.

  4. Make sure the Test mode switch is off. With test mode on, real payments are not accepted.

  5. Click Save.

Lueira will check your credentials with Mercado Pago. If they are correct, the card will show:

  • Account: your country, the currency and the identifier of your Mercado Pago account (Lueira fills these in automatically).

  • Public key and the end of the Access token (for security, the token is never shown in full again).

  • Last verification: the date and time when Lueira checked your credentials.

  • Notification URL: the address you will use in step 4.

4. Add the webhook secret key (optional, recommended)

What it is for: when a customer pays, they do so on the Mercado Pago page, outside Lueira. Mercado Pago then sends a notification to Lueira. With this step, Lueira checks on each notification a signature that only Mercado Pago knows and discards the ones that don't have it. It is an extra layer of security.

Your store can take payments without this step, but we recommend doing it. The Notification URL is the Lueira address that has to be registered in Mercado Pago, and the secret key is what Mercado Pago gives you in return.

  1. In Lueira, on the MercadoPago card, copy the Notification URL with the copy icon next to it.

  2. In Mercado Pago, open your application and, in the menu on the left, NOTIFICATIONS section, click Webhooks. If you haven't configured anything yet, you will see the message "You haven't configured notifications yet".

  3. Click Configure notifications.

  4. When it opens, Mercado Pago shows two tabs: Test mode and Production mode. The test one opens first: switch to Production mode.

  5. Paste the Lueira notification URL into the URL field.

  6. Under "Recommended events for Checkout Pro integrations", tick Payments (in the panel it may appear as Payments (legacy)). You don't need to tick any other event.

  7. Click Save, at the bottom of the form.

  8. When you save, Mercado Pago generates the Secret key and shows it in the "Secret key" field, at the bottom of the form. Copy it.

  9. Go back to Lueira, click Edit credentials and paste the key into Webhook secret key. Leave the Access token field empty (Lueira keeps the one it already had saved) and click Save.

5. Activate MercadoPago in your online store

If Mercado Pago is your only online payment processor, it will be used automatically. If you have more than one (for example, Lueira Pay), go to Settings > Online store > General and in Payment processor choose MercadoPago.

For more detail about this screen, see 👉 Online store settings.

Optional: test before taking real payments

If you want to simulate a payment without using real money:

  1. In Mercado Pago, inside your application, TESTING section, open Test credentials and copy the test Public Key and Access Token.

  2. In Lueira, click Edit credentials, paste those keys, turn on Test mode and click Save. The card will show the Test label.

  3. You need to pay with a buyer who is not you. In the same TESTING section, Test accounts lets you create test users (seller and buyer), and Test cards gives you cards to pay with.

  4. Make a purchase in your online store and pay in an incognito window with the test buyer user. When entering a new card, write APRO as the cardholder name and 12345678 as the ID number so that the payment is approved. With OTHE it will be rejected.

  5. When you finish, go back to Edit credentials, paste the production credentials, turn off Test mode and save.

⚠️ Don't pay with the same Mercado Pago account you take payments with: Mercado Pago doesn't let you pay yourself. And if the test user already has a saved card, the cardholder name can't be used to force the outcome: use a new card.

Related articles