> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appreval.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrations: Mercado Pago, Klaviyo / Shopify Flow and Google Tag Manager

> Connect Mercado Pago (credentials and webhook), turn on the Klaviyo events and the Shopify Flow trigger, and load your Google Tag Manager container. All from Reval → Integraciones.

Go to **Reval → Integraciones** (Integrations) in your Shopify admin. The screen has five blocks, in this order: **Mercado Pago**, **Klaviyo** (with the renewal reminder and Shopify Flow), **Google Tag Manager**, **Pixels** and **Attribution**, and one save for all five: as soon as you change something the **save bar** appears at the top, with "Save" and "Discard". The developer integrations —API keys, webhooks and AI assistants— live in **Reval → API & MCP**, see [API](https://docs.appreval.com/en/developers/api.md).

> [!WARNING]
>
> Reval always works with Mercado Pago **production credentials**. There's no sandbox mode and no environment selector: testing is done with a real card and a small amount, which you then refund from Reval, in the subscription detail. Mercado Pago's test cards don't work with production credentials.

***

## Mercado Pago

This is the first thing to fill in: without credentials, the subscription checkout doesn't work.

> [!NOTE]
>
> **There is no OAuth connection.** Credentials are copied from your Mercado Pago panel and pasted here. They're stored encrypted in your store's configuration, and neither the access token nor the webhook secret is shown back to you once saved.

The three values you need, all from your production application in the MP developer panel:

| Field | Where to get it |
| - | - |
| **Public key** | Production credentials |
| **Access token** | Production credentials |
| **Webhook secret** | The *secret key* MP shows when you configure the webhook |

After saving, use **Test connection**. If everything is fine you'll see your Mercado Pago account name. If a name that isn't yours appears, the token is wrong: stop and check it before going any further.

> [!TIP]
>
> The account name the test returns is the best verification you have. A token from another account doesn't throw an error — it would simply charge into the wrong account.

***

## Klaviyo

Reval can emit the subscription lifecycle events so you can build welcome, recovery or winback flows. The seventeen that are sent:

**Subscription created** · **Subscription charge** · **Failed charge** · **Upcoming renewal** · **Product out of stock in subscription** · **Product available again** · **Product deleted in subscription** · **Subscription paused** · **Subscription resumed** · **Subscription cancelled** · **Subscription ended** · **Payment method updated** · **Surprise applied** · **Cycle skipped** · **Combined order** · **Order refunded** · **Chargeback received**

With **Abandoned checkouts and carts** on, three more events are added that have no subscription yet: **Checkout started**, **Cart started** and **Cart emptied** (emitted as «Checkout iniciado», «Carrito iniciado» and «Carrito vaciado» in Spanish stores). How to build the recovery flow with them: [Abandoned checkouts](https://docs.appreval.com/en/merchant/abandoned-checkouts.md).

> [!NOTE]
>
> Inside Klaviyo the metric names and the human-readable properties of each event (the frequency label, the next charge date, the reason behind a failed charge, a pause or a cancellation) follow the **store's configured language**: Spanish («Suscripción creada», «Cobro de suscripción», «Cobro fallido», «Renovación próxima», «Producto sin stock en suscripción», «Producto disponible nuevamente», «Producto eliminado en suscripción», «Suscripción pausada», «Suscripción reanudada», «Suscripción cancelada», «Suscripción finalizada», «Medio de pago actualizado», «Sorpresa aplicada», «Ciclo saltado», «Pedido combinado») for stores in Argentine or neutral Spanish, and Portuguese («Assinatura criada», «Cobrança de assinatura», «Cobrança falhada», «Renovação próxima», «Produto sem estoque na assinatura», «Produto disponível novamente», «Produto excluído na assinatura», «Assinatura pausada», «Assinatura retomada», «Assinatura cancelada», «Assinatura finalizada», «Meio de pagamento atualizado», «Surpresa aplicada», «Ciclo pulado», «Pedido combinado») for stores in Portuguese. That is what you pick in the flow builder. In Klaviyo the metric name is the event's identity: if you change the store language, events start arriving under the new name and the flows bound to the old one stop firing until you rebind them. The raw properties used in conditions (`status`, `frequency_type`, amounts, ISO dates, `reason_key`) do not change with the language.

It needs a Klaviyo **private API key**. Emission requires the integration to be enabled and the key to be loaded, and it's always best-effort: if Klaviyo fails, neither the charge nor the order creation is interrupted.

### Renewal reminder

The **"Renewal reminder (days before the charge)"** field makes Reval emit the **"Upcoming renewal"** event that many days before the next charge, once per cycle, through a daily process. It's the raw material for the "we'll charge you in N days" email — which reduces declines and disputes. At 0 it's disabled. It goes to Klaviyo, Shopify Flow, your webhooks and the "Upcoming renewal" email in [Notifications](https://docs.appreval.com/en/merchant/notifications.md), whichever you have enabled.

### Shopify Flow

You can also enable the **Subscription event** trigger for Shopify Flow, and build your automations there: a workflow with that trigger and a condition on the event (for example, `event = cancelled`) can send an email with Shopify Email or tag the customer. It's off by default, so no extra call is made until you enable it.

> [!WARNING]
>
> Reval can also send these notices by email on its own, from [Notifications](https://docs.appreval.com/en/merchant/notifications.md). If you already send one from Klaviyo or Shopify Flow, keep that notice off in Reval or your customer gets it twice.

***

## Google Tag Manager

The third block is the **GTM Container ID** of the container you want running in the checkout. Which events it publishes, how to map them to GA4, Meta or TikTok and what to watch out for: [Analytics](https://docs.appreval.com/en/merchant/analytics.md).

***

## Pixels

The fourth block holds the **Google Analytics 4**, **Meta Pixel**, **TikTok Pixel** and **Google Ads** (conversion ID + label) ids that Reval fires itself on the checkout and the thank-you page, without going through GTM. It is the recommended way to measure the checkout. Where to find each id, which events are sent and how to avoid counting twice: [Analytics](https://docs.appreval.com/en/merchant/analytics.md).

***

## Attribution

If an attribution or affiliate tool (Elykia, a referral program, etc.) matches your Shopify orders against a **cookie** it leaves on your store, list that cookie's name here, one per line (for example `_elykia_cid`). When a customer completes the Reval checkout, the cookie is read from their browser and travels to the Shopify order as an **order attribute** (note attribute), just like the tax ID. The tool finds it there as on any native-checkout order.

* To name the attribute differently from the cookie, write `cookie = attribute name`. Up to 10 cookies.
* The cookie must be readable from your store's domain (not HttpOnly). If the customer's browser does not have it, the order simply comes out without that attribute.
* **Also copy on renewal orders**: off, the attribute goes only on the first order of each subscription; on, on every cycle. Decided when the subscription is created.
* Reval loads no script from the tool in the checkout: it only copies the cookie's value. Shopify's and Reval's own cookies cannot be copied.

***

## Saving

As soon as you touch a field, the Shopify admin's **save bar** appears at the top: **Save** applies the changes of the five blocks, **Discard** returns everything to the last saved state, and Shopify warns you if you try to leave with pending changes. A GTM Container ID or a pixel id with an invalid format rejects the whole save (the error shows as a notification at the top and names the field) until you fix it. The Mercado Pago credentials have a short cache that invalidates itself on save, so a token change takes effect immediately.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.