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

# Tutorial: Implementing your first charge from WhatsApp

> Implement your first charge from WhatsApp step by step with Mercado Pago.

In this guide you will implement [real payments](/guides/integraciones/pagos/introduccion) within a conversational app deployed on WhatsApp, using **Mercado Pago**.

<Info>
  **Prerequisites:**

  * Have a flow in Brain Studio ready (for example, an AI Agent that handles a sales process).
  * Have a Mercado Pago account (to obtain test and production credentials).
</Info>

We will use as an example an app that sells tour tickets: the user chooses the tour, date, number of tickets, and provides their email. Now we are going to enable charges with Mercado Pago within the same flow.

This tutorial is divided into three parts:

1. **Implementation in test mode (DEV)**
2. **Testing on WhatsApp**
3. **Going to production (PROD)**

***

# 1. Implementation in test mode (DEV)

## Video 1: Installation and configuration in Brain Studio

<Frame caption="Video 1 – Mercado Pago installation + node setup in test mode (DEV)">
  <iframe className="mx-auto w-full max-w-3xl aspect-video rounded-xl" src="https://www.youtube.com/embed/UsZsRWtk55c" title="Video 1 – Mercado Pago installation + node setup in test mode (DEV)" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />
</Frame>

***

## Initial setup

<Steps>
  <Step title="Copy your test Access Token">
    <Note>
      First time? Check the step-by-step guide: [Obtaining Mercado Pago credentials](/guides/integraciones/pagos/proveedores/mercado-pago/obtener-credenciales).
    </Note>

    Open your Mercado Pago account and go to **Your integrations**.

    <Frame caption="Your integrations in Mercado Pago: choose your application and access Production Credentials or Test Credentials">
      <img src="https://mintcdn.com/jelouai/nCvuucLdA-_D8bXJ/assets/images/integraciones/pagos/dashboard-mercado-pago-tus-integraciones.png?fit=max&auto=format&n=nCvuucLdA-_D8bXJ&q=85&s=1d04d517b6a5ed72cce8485281e83501" alt="Mercado Pago Dashboard showing Your integrations, Jelou application selector, and the Production credentials and Test credentials cards" width="2048" height="951" data-path="assets/images/integraciones/pagos/dashboard-mercado-pago-tus-integraciones.png" />
    </Frame>

    * Go to **Test credentials**
    * Copy the **Access Token**

    You will use this token to install Mercado Pago in Brain Studio.

    <Check>
      Token ready to paste into Brain Studio.
    </Check>
  </Step>

  <Step title="Install Mercado Pago from Marketplace">
    In Brain Studio:

    * Go to **Marketplace**
    * Search for **Mercado Pago**
    * Click **Connect**
    * Paste your **test Access Token**
    * Click **Install**

    <Frame caption="Installation modal: paste your Mercado Pago Access Token and confirm">
      <img src="https://mintcdn.com/jelouai/nCvuucLdA-_D8bXJ/assets/images/integraciones/pagos/mercado-pago-instalar-access-token.png?fit=max&auto=format&n=nCvuucLdA-_D8bXJ&q=85&s=891469de6fdbe9d646ea89d18ee71d86" alt="API Credentials modal in Brain Studio requesting the Access Token to install Mercado Pago" className="w-full max-w-2xl mx-auto rounded-xl shadow-sm" width="2048" height="913" data-path="assets/images/integraciones/pagos/mercado-pago-instalar-access-token.png" />
    </Frame>

    Once installed, you will see Mercado Pago available in the **Marketplace** folder in the Canvas side panel.

    <Check>
      Mercado Pago visible in Marketplace.
    </Check>
  </Step>

  <Step title="Drag and connect the node to the Canvas">
    Connect the payment flow right after the user confirms their purchase or reservation.

    * Inside Brain, find Mercado Pago in the **Marketplace** folder in the side panel, and drag it to the canvas
    * Connect it after the step where the user confirms their purchase or reservation.

    <Note>
      Next, configure the node inputs. The three required fields are:
      payment reason, taxable amount, and buyer email.
    </Note>
  </Step>
</Steps>

***

## Configure Inputs: What is each field?

Define three fundamental things at the time of the charge:

1. **What you are charging for** (reason + amount + currency)
2. **Who you are charging** (buyer email)
3. **Under what rules** (environment, taxes, expiration, metadata)

Think of this section as the structural definition of the payment: what Mercado Pago needs to create the transaction correctly.

<Frame caption="Input configuration panel">
  <img src="https://mintcdn.com/jelouai/nCvuucLdA-_D8bXJ/assets/images/integraciones/pagos/configuracion-inputs-jelou-pay.png?fit=max&auto=format&n=nCvuucLdA-_D8bXJ&q=85&s=8aa4fcd953abaf729237f120dc80d6e9" alt="Input configuration panel" className="mx-auto rounded-xl shadow-sm" style={{ maxWidth: '280px' }} width="590" height="1284" data-path="assets/images/integraciones/pagos/configuracion-inputs-jelou-pay.png" />
</Frame>

<Note>
  The exact names may vary slightly depending on your template, but the pattern is always the same:
  **amount + currency + taxes (if applicable) + buyer email + optional metadata.**
</Note>

***

## What you must complete

Before going into detail, make sure you have these three elements clear:

* A readable **payment reason** (e.g., "Valpo Walk Tour - 2 ticket(s)")
* A **correct amount** (net if you work with taxes)
* A **valid buyer email** (in DEV it must be a test user)

<Check>
  If these three are well defined, the rest is configuration.
</Check>

***

## Summary of node inputs

Before going into detail, there are two key ideas:

1. **This node creates the charge** (with amount, currency, taxes, reason, and email).
2. **This node returns a response (JSON)** that you can reuse later (for example, to display a receipt or save payment IDs).

### Save result as

At the top of the node you will see **Save result as**.

There you define the name with which Brain Studio will save **the complete tool response** as a JSON in **Memory**.

* In this tutorial we use: `checkout_response`
* You can then read it from a **Code** node with something like:
  * `const r = $memory.getJson('checkout_response')`

<Note>
  **Memory vs Context:**

  * **Memory** persists between conversations (useful for querying the payment status later).
  * **Context** is only available during the current conversation.

  For more details, see the [full guide](/guides/variables/memory-vs-context).
</Note>

***

## Detail of each input

Below is a practical guide on what to put in each field (in the same order you will see in the node).

| Field                         | What to put                 | What it is for                                                                          |
| ----------------------------- | --------------------------- | --------------------------------------------------------------------------------------- |
| Save result as                | `checkout_response`         | Saves the tool response (JSON) in Memory with that name                                 |
| Payment type                  | `payment`                   | Operation type (in most cases, leave as default)                                        |
| Environment                   | `DEV` / `PROD`              | Defines whether you are testing or charging real                                        |
| Button expiration (min)       | `20` (example)              | Maximum time to pay before the link/button expires                                      |
| Currency                      | `CLP`, `MXN`, `COP`, etc.   | Charge currency                                                                         |
| Payment reason                | text or variable            | Readable description of the charge (seen by the user / dashboard)                       |
| Taxable amount                | net (e.g., `mp_net_amount`) | Tax base (if VAT/taxes apply)                                                           |
| Tax-free amount               | `0` or amount               | The part of the charge exempt/not subject to taxes                                      |
| VAT percentage                | `19` (example)              | Tax percentage (if applicable)                                                          |
| Payment metadata              | optional                    | Context for traceability (only what is essential)                                       |
| Buyer email                   | required                    | Buyer's email. In DEV it must be a test user                                            |
| Customize payment button text | `No` / `Yes`                | Allows customizing the message that accompanies the payment button (Header/Body/Footer) |

***

### Payment type (default: `payment`)

Leave it as `payment` unless your implementation has another type enabled/defined. In a generic tutorial, `payment` is correct.

***

### Environment (`DEV` / `PROD`)

* **DEV**: controlled testing with test credentials.
* **PROD**: real charges with production credentials.

<Warning>
  When you move to **PROD**, verify that your flow already handles the outputs well (success, pending, failed, errors) to avoid leaving the user "hanging".
</Warning>

***

### Button expiration (minutes)

Typical example: `20`.

This avoids out-of-context payments ("I opened it 3 hours later") and helps the conversational flow remain coherent.

***

### Currency

Select the actual charge currency according to country/operation.
Examples: `CLP`, `MXN`, `COP`, `PEN`, etc.

***

### Payment reason

This is the text that lets you easily identify the charge.

Practical recommendation:

* Use a **readable variable** (e.g., `mp_payment_description`)
* Or clear text such as: `Valpo Walk Tour - 2 ticket(s)`

<Note>
  The more "human" the reason, the less friction for support: the user and the merchant understand each other faster when something goes wrong.
</Note>

***

### Taxable amount + Tax-free amount + VAT

Here you define the structure of the amount.

* **Taxable amount**: the part that does pay VAT (normally the net).
* **Tax-free amount**: the exempt part (if it does not exist in your case, leave it as `0`).
* **VAT percentage**: for example `19`.

**Typical example (sale with VAT):**

* Taxable amount = net (e.g., `20168`)
* Tax-free amount = `0`
* VAT = `19`

**If your case does NOT use taxes:**

* Use `0` as appropriate in your implementation and maintain consistency with your calculation (the important thing is not to "invent" VAT if it does not apply).

***

### Payment metadata

This field is optional but useful; it lets you attach context for traceability.

Recommendation: **minimalist and intentional**. Only save what you would actually use for:

* payment reconciliation
* debugging
* or user support

Useful examples:

* `order_id`
* `order_reference_id` (if your backend uses it)
* `tour_slug`
* `user_id`

***

### Buyer email (very important in DEV)

In **DEV** mode it is extremely important that the buyer is a **test user**, as required by Mercado Pago.

In this tutorial we assume:

* **buyer email = payer email** (they are the same)

In **DEV** use the test user email for the corresponding country (the list is below). In **PROD**, use the user's real email.

<Check>
  If you are in DEV and you put a real email (not a test user), the payment will most likely fail or you will not be able to complete it.
</Check>

***

### Customize payment button text (optional)

By default it comes as **No**. If you change it to **Yes**, the node enables extra fields to customize the message the user will see *before* opening the checkout.

This is useful when you want the CTA to feel **more contextual** (and less generic), without changing the flow or the checkout itself.

<Accordion title="Customize payment button text" icon="message">
  <ParamField body="Customize payment button text" type="boolean" default="false">
    If you select **Yes**, additional fields are enabled to customize the message that accompanies the payment button.

    **Fields enabled when activated:**

    * `Header` (required)
    * `Body` (required)
    * `Footer` (required)
  </ParamField>

  <Info>
    When this option is active, you can completely modify the message the user will see before opening the checkout.
  </Info>

  <Frame caption="Example of message with customized payment button in WhatsApp">
    <img src="https://mintcdn.com/jelouai/nCvuucLdA-_D8bXJ/assets/images/integraciones/pagos/mercado-pago-boton-ejemplo.png?fit=max&auto=format&n=nCvuucLdA-_D8bXJ&q=85&s=adc316c21bd770d28a50e948abff86ef" alt="Example of a message with customized text and Mercado Pago payment button in WhatsApp" className="max-w-sm mx-auto rounded-xl shadow-sm" width="1033" height="498" data-path="assets/images/integraciones/pagos/mercado-pago-boton-ejemplo.png" />
  </Frame>
</Accordion>

***

## Test emails by country (test mode / DEV)

In **DEV**, Mercado Pago only processes payments if the **Buyer email** belongs to a *test user* from the corresponding country.
Copy the one you need and paste it directly into the **Buyer email** field of the node.

<Note>
  Always use the test user from the same country as the credentials you are testing.
</Note>

<AccordionGroup>
  <Accordion title="🇨🇱 Chile">
    ```txt theme={null}
    test_user_230383680042455079@testuser.com
    ```
  </Accordion>

  <Accordion title="🇵🇪 Peru">
    ```txt theme={null}
    test_user_6344464757279593247@testuser.com
    ```
  </Accordion>

  <Accordion title="🇨🇴 Colombia">
    ```txt theme={null}
    test_user_7600640374023229585@testuser.com
    ```
  </Accordion>

  <Accordion title="🇲🇽 Mexico">
    ```txt theme={null}
    test_user_538195043292703001@testuser.com
    ```
  </Accordion>

  <Accordion title="🇧🇷 Brazil">
    ```txt theme={null}
    test_user_6254528388464257378@testuser.com
    ```
  </Accordion>

  <Accordion title="🇦🇷 Argentina">
    ```txt theme={null}
    test_user_1511189314898568640@testuser.com
    ```
  </Accordion>

  <Accordion title="🇺🇾 Uruguay">
    ```txt theme={null}
    test_user_1178397850300963040@testuser.com
    ```
  </Accordion>
</AccordionGroup>

<Check>
  If you are in DEV and the payment fails for no apparent reason, first check that the email is a valid test user.
</Check>

***

## Node configuration: Outputs

The node exposes different outputs depending on the payment status.

<Frame caption="Node output configuration: Correct CTA delivery, Successful Payment, Pending, Failed, Error Code, Error Http">
  <img src="https://mintcdn.com/jelouai/y5L6vahGrhMqbaUQ/assets/images/integraciones/pagos/seteo-outputs-nodo.png?fit=max&auto=format&n=y5L6vahGrhMqbaUQ&q=85&s=b5671bc9cc5c6ef11188eb91d38d81a8" alt="Jelou Pay node flow showing outputs: Successful Payment, Pending Payment, Failed Payment, Error Code, Error Http, and Correct CTA delivery connected to Text, Button, and support nodes" className="w-full max-w-3xl mx-auto rounded-xl shadow-sm" width="2048" height="929" data-path="assets/images/integraciones/pagos/seteo-outputs-nodo.png" />
</Frame>

***

## Quick output map

* **Correct CTA delivery** → The button was sent to the user (no payment result yet).
* **Successful Payment** → The payment was approved.
* **Pending Payment** → The payment was initiated but not yet credited.
* **Failed Payment** → The payment was rejected or not completed.
* **Error Code / Error Http** → Technical error from the flow or from the request.

<Note>
  **CTA** means the payment button was sent successfully.
  The other outputs represent the **actual result** of the transaction.
</Note>

***

## Outputs and what to connect

| Output               | What it means                    | What to connect                       |
| -------------------- | -------------------------------- | ------------------------------------- |
| Correct CTA delivery | The button was sent successfully | Post-CTA support AI Agent             |
| Successful Payment   | The payment was approved         | Code (normalization) → Text (receipt) |
| Pending Payment      | The payment is in process        | Informational text + follow-up        |
| Failed Payment       | The payment was rejected         | Text + retry option                   |
| Error Code           | Error in your flow               | Error handling block                  |
| Error Http           | Error in request                 | Error handling block                  |

***

### Correct CTA delivery (Success)

This means the **payment button was sent** to the user, but they have not yet taken an action inside the Webview that determines the transaction status (Approved, Rejected, Pending, Error).

Recommendation: connect a **post-CTA support AI Agent**. This way, when the user receives the payment button, they will have someone on the other side: an agent with the appropriate context who can answer frequent questions, reassure them, and help complete the payment without restarting the sale.

<Frame caption="Payment button, proactive support message, and response to a question (credit card)">
  <img src="https://mintcdn.com/jelouai/y5L6vahGrhMqbaUQ/assets/images/integraciones/pagos/soporte-post-cta-ejemplo-whatsapp.png?fit=max&auto=format&n=y5L6vahGrhMqbaUQ&q=85&s=7c82515588c84e1859c9f6ceb0f305c1" alt="WhatsApp conversation: agent offers to proceed with payment, user accepts, agent sends Mercado Pago button and support message; user asks if they accept credit cards and agent responds kindly" className="mx-auto rounded-xl shadow-sm" style={{ maxWidth: '320px' }} width="1290" height="1134" data-path="assets/images/integraciones/pagos/soporte-post-cta-ejemplo-whatsapp.png" />
</Frame>

#### Example prompt

The prompt is designed for an **AI Agent** on the **Correct CTA delivery** output, with the **Gmail** tool (Marketplace) connected to send support tickets by email when the user requests it. You can copy it and adjust the tone or rules to your brand.

<Accordion title="View post-CTA support prompt">
  ```txt theme={null}
  You are "Payment Support", a help assistant for completing payments within WhatsApp.

  Context: the user has just received a button (CTA) to pay. Your role is NOT to sell or recalculate amounts: only to help complete the payment or resolve button issues.

  ────────────────────
  KEY BEHAVIOR
  ────────────────────
  - This agent can run without the user having written anything.
  - If there is NO explicit question or problem from the user in the last message, send ONLY this proactive message (once) and then stay in reactive mode:

  "If you have any questions about your payment, write to me here and I will help you."

  - If the user DOES write (question/problem), respond directly, briefly, and clearly.
  - Do not restart the sale. Do not recalculate amounts. Do not generate new links. Do not make up information.
  - Maximum 1 emoji per message.

  ────────────────────
  WHAT YOU SUPPORT
  ────────────────────
  - How to pay from the button.
  - Button does not open / loading error.
  - Pending payment.
  - Rejected payment.
  - Issues with card / payment method.

  If the user reports a problem:
  1) Ask for a short description.
  2) If helpful, ask for a screenshot (they can send images).
  3) Offer to generate a support ticket by email. DO NOT generate a ticket without an explicit "yes".

  ────────────────────
  EMAIL TICKET (GMAIL TOOL)
  ────────────────────
  If the user confirms they want a ticket, use the Gmail tool to send an email to: support@yourdomain.com

  Subject:
  [Payment Ticket] Operation {operation_id if exists} | Ref {order_reference_id if exists}

  Body:
  - Buyer/payer email
  - What happened (user's text)
  - Mentioned status (pending/rejected/error)
  - Current date and time
  - Useful IDs if they exist: operation_id / order_id / order_reference_id
  - Attach evidence if the user sent images

  Then confirm:
  "Done. I generated the ticket and we will contact you by email."

  ────────────────────
  CLOSING / END OF TASK
  ────────────────────
  If the user says they already paid and does not need more help (e.g., "done", "thank you", "that was it"), respond briefly and close:
  "Perfect. If you need anything else, I will be here."
  ```
</Accordion>

***

### Successful Payment

The payment was approved.

Recommendation:

1. Connect a **Code** node to normalize and save the minimum in **Context**.
2. Then a **Text** node that displays the short receipt (receipt line).

#### Example: Normalization code

This node reads `checkout_response` from memory and saves to context only what is reusable.

<Accordion title="Normalization code example">
  ```javascript normalize-payment.js theme={null}
  // Reads checkout_response (saved in Memory) and maps the minimum to Context
  const r = $memory.getJson('checkout_response')
  if (!r) throw new Error('checkout_response does not exist in memory.')

  const pl = r?.paymentLinkResponse
  if (!pl) throw new Error('checkout_response.paymentLinkResponse does not exist (check memory).')

  const gw = pl.gateway_response || {}
  const md = pl.metadata || gw.metadata || {}

  // buyer email = payer email (in the demo they match)
  const email = String(gw?.payer?.email || md.email || '')

  // Identifiers and reusable data
  $context.set('pay_operation_id', String(gw.id || '')) // "Operation number" in Mercado Pago
  $context.set('pay_amount', Number(pl.amount || 0))
  $context.set('pay_currency', String(pl.currency || 'CLP'))
  $context.set('pay_email', email)
  $context.set('pay_concept', String(gw.description || md.concept || ''))
  $context.set('pay_status', String(gw.status || 'approved'))

  // Receipt line (post-payment message)
  $context.set(
    'pay_receipt',
    `Done ✅ Payment approved.\n\nMercado Pago operation number: ${String(gw.id || '')}`
  )
  ```
</Accordion>

If you use this code, you can print the message to the user in a **Text** output node by pasting this expression:

```txt theme={null}
{{$context.pay_receipt}}
```

<Frame caption="Successful Payment flow → Code (normalization) → Text (pay_receipt)">
  <img src="https://mintcdn.com/jelouai/y5L6vahGrhMqbaUQ/assets/images/integraciones/pagos/pago-exitoso-codigo-texto-flujo.png?fit=max&auto=format&n=y5L6vahGrhMqbaUQ&q=85&s=4b616727705b1f014efec707101f090e" alt="Diagram: Successful Payment output of the Jelou Pay node connected to the Code node, and that to the Text node with pay_receipt" className="w-full max-w-3xl mx-auto rounded-xl shadow-sm" width="1640" height="608" data-path="assets/images/integraciones/pagos/pago-exitoso-codigo-texto-flujo.png" />
</Frame>

***

### Pending Payment

The payment is pending.

Recommendation:

* Connect a **Text** node with a brief explanation.
* Then route to whatever flow comes next (wait, follow-up, support, etc.).

Keep the message simple: the goal is **not to confuse** and **not to push a second payment** without context.

***

### Failed Payment

The payment failed (rejection / not credited).

Recommendation:

* Connect a clear and brief **Text** node.
* Offer a **retry** or method change.
* If the user continues to have issues, route to support.

***

### Error Code / Error Http

Technical errors from your flow (code) or from the HTTP request.

Recommendation:

* Connect an **error handling** block.
* Show a brief message + retry option + support.
* Avoid exposing technical details to the end user.

***

# 2. Testing on WhatsApp

Once you have the node configured (inputs + connected outputs), it is time to **test the complete flow from WhatsApp**.

<Info>
  **Important:** The payment experience opens in a **WebView inside WhatsApp**. Therefore, to validate the payment end-to-end, the test must be done from WhatsApp (not from the Canvas message preview).
</Info>

## Video 2: Testing from WhatsApp (DEV)

<Frame caption="Video 2 – Testing from a mobile phone with test cards (DEV)">
  <video controls className="mx-auto w-full max-w-sm aspect-[9/16] rounded-xl" src="https://mintcdn.com/jelouai/Hhs56n83OOsOa4Lx/assets/videos/integraciones/pagos/paso-2-prueba-whatsapp.mp4?fit=max&auto=format&n=Hhs56n83OOsOa4Lx&q=85&s=5ee89f78ebe8400b4bd5d6dccea6a664" data-path="assets/videos/integraciones/pagos/paso-2-prueba-whatsapp.mp4">
    Your browser does not support video playback.
  </video>
</Frame>

***

## How to start the test from WhatsApp

In Brain Studio you can start a real WhatsApp test in seconds.

<Steps>
  <Step title="Open the Test panel">
    In the upper right corner of the Canvas, click **Test**.

    <Frame caption="Test project panel: start a test from WhatsApp by entering your number">
      <img src="https://mintcdn.com/jelouai/y5L6vahGrhMqbaUQ/assets/images/integraciones/pagos/probar-proyecto-whatsapp.png?fit=max&auto=format&n=y5L6vahGrhMqbaUQ&q=85&s=51e4b7d84aa11f0169c1ce83cf448097" alt="Test project panel in Brain Studio with the Test from WhatsApp option and phone number entry" className="mx-auto rounded-xl shadow-sm" style={{ maxWidth: '280px' }} width="708" height="1338" data-path="assets/images/integraciones/pagos/probar-proyecto-whatsapp.png" />
    </Frame>

    <Note>
      If you do not yet have a connected/enabled WhatsApp channel, this is the fastest way to validate the payment flow.
    </Note>
  </Step>

  <Step title="Enter your number and send the first message">
    * Select your prefix (e.g., **CL +56**)
    * Enter your number
    * Send the first message to begin the test conversation

    From that point, the flow runs as if it were a real user.
  </Step>

  <Step title="Complete the payment in the WebView">
    When the bot sends you the **Proceed to payment** button, open it from WhatsApp.

    There you will see the checkout WebView and you can test test cards, statuses (approved/rejected), and all output handling.
  </Step>
</Steps>

<Note>
  In some countries, if the user has the Mercado Pago app installed on their device, the checkout webview will attempt to open it automatically as the first payment option. However, for DEV payments this option is not enabled, so you must close it and return to WhatsApp to enter the test card.
</Note>

***

## Test cards by country

To test different scenarios (approved payment, rejected payment, etc.), Mercado Pago publishes test cards by country.

<Note>
  In **DEV**, remember two things:

  * Use **test** credentials.
  * Use a valid **test user** in the **Buyer email** field (from the same country as your credentials).
</Note>

Each link contains card numbers, CVV, and approval/rejection cases:

<AccordionGroup>
  <Accordion title="🇨🇱 Chile">
    [Test cards (Chile)](https://www.mercadopago.cl/developers/es/docs/checkout-bricks/integration-test/test-cards)
  </Accordion>

  <Accordion title="🇵🇪 Peru">
    [Test cards (Peru)](https://www.mercadopago.com.pe/developers/es/docs/your-integrations/test/cards)
  </Accordion>

  <Accordion title="🇨🇴 Colombia">
    [Test cards (Colombia)](https://www.mercadopago.com.co/developers/es/docs/your-integrations/test/cards)
  </Accordion>

  <Accordion title="🇲🇽 Mexico">
    [Test cards (Mexico)](https://www.mercadopago.com.mx/developers/es/docs/shopify/additional-content/your-integrations/test/cards)
  </Accordion>

  <Accordion title="🇧🇷 Brazil">
    [Test cards (Brazil)](https://www.mercadopago.com.br/developers/es/docs/checkout-api-payments/additional-content/your-integrations/test/cards)
  </Accordion>

  <Accordion title="🇦🇷 Argentina">
    [Test cards (Argentina)](https://www.mercadopago.com.ar/developers/es/docs/subscriptions/additional-content/your-integrations/test/cards)
  </Accordion>

  <Accordion title="🇺🇾 Uruguay">
    [Test cards (Uruguay)](https://www.mercadopago.com.uy/developers/es/docs/subscriptions/additional-content/your-integrations/test/cards)
  </Accordion>
</AccordionGroup>

<Check>
  If you want to test your flow properly, try at least 2 cases: **one approved** and **one rejected**. This validates that your outputs (Successful Payment / Failed) are connected correctly.
</Check>

***

# 3. Going to production (PROD)

Going to **PROD** is basically changing two things: **credentials** and **real data**.
The WhatsApp experience remains the same, but now the payment affects your production account.

## Video 3: Production configuration + real payment

<Frame caption="Video 3 – Going to production (PROD) and real payment">
  <iframe className="mx-auto w-full max-w-3xl aspect-video rounded-xl" src="https://www.youtube.com/embed/1sSVuPfs4rI" title="Video 3 – Going to production (PROD) and real payment" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />
</Frame>

<Steps>
  <Step title="Obtain production credentials">
    In Mercado Pago, go to **Production credentials** and copy your production **Access Token**.

    <Note>
      This token is associated with your production account. Only use it when you are ready to charge real.
    </Note>
  </Step>

  <Step title="Update credentials in Marketplace">
    To avoid confusion (and make it explicit), we will reinstall the integration with the correct token:

    * Go to **Marketplace**
    * Open **Mercado Pago**
    * Press **Delete integration**
    * Press **Install again**
    * Paste your **production Access Token**
    * Press **Install**
  </Step>

  <Step title="Change the node environment to PROD">
    In the **Jelou Pay: Send payment link** node:

    * Change **Environment** from `DEV` to `PROD`

    <Check>
      From this point on, the flow will attempt to generate real charges.
    </Check>
  </Step>

  <Step title="Replace the Buyer email with the real email from the flow">
    In **DEV**, we used a **test user** for the **Buyer email** field.
    In **PROD**, that same field must come from your flow (the user's real email).

    If during the test stage you left a hardcoded test user in the input, now replace it with your variable.

    <Note>
      In this tutorial, the email is captured during the conversation (AI Agent) and normalized as a variable before reaching the payment node.
      The important thing is that in **PROD** the **Buyer email** field is connected to that real data.
    </Note>
  </Step>

  <Step title="(Optional) Customize payment button text">
    If you want the CTA to feel more contextual (without changing the checkout), activate **Customize payment button text**.

    * Change the selector to **Yes**
    * Complete **Header**, **Body**, and **Footer** (required)

    <Info>
      This only customizes the pre-checkout message within WhatsApp.
      The payment logic and the WebView do not change.
    </Info>
  </Step>

  <Step title="Test real payment">
    Make a real payment (wallet or card) and verify:

    * **Approved** status
    * **Operation number** (operation ID)
    * Record visible in your **Mercado Pago dashboard**
  </Step>
</Steps>

<Warning>
  Production transactions consume Brain Studio credits per attempt, in addition to provider commissions.
  If you are validating for the first time, make a small charge and review the dashboard before scaling.
</Warning>

***

# Next steps

<CardGroup cols={3}>
  <Card title="Payment experiences" href="/guides/integraciones/pagos/experiencias/tipos-de-experiencia" icon="puzzle">
    When to use WebView, native experience, or conversational flows.
  </Card>

  <Card title="Payment providers" href="/guides/integraciones/pagos/proveedores" icon="credit-card">
    Other providers by country and specific guides.
  </Card>

  <Card title="Mercado Pago - Usage and configuration" href="/guides/integraciones/pagos/proveedores/mercado-pago/uso-y-configuracion" icon="gear">
    Complete reference for inputs, outputs, and node options.
  </Card>
</CardGroup>

***

With these steps you have the flow working in test and production.
From here you can record operations, issue receipts, send automatic email tickets, or integrate more providers depending on your use case.
