> ## 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.

# Usage and configuration

> Add the Mercado Pago node to your Canvas flow and configure its inputs and outputs.

Once the integration is connected in Marketplace, the **Mercado Pago** node becomes available in your workspace for use inside your flows.

This guide shows you how to add it to the Canvas and how to configure its inputs and outputs.

<Tip>
  First time implementing a charge? Follow the [Tutorial: Implementing your first charge from WhatsApp](/guides/integraciones/pagos/implementando-tu-primer-cobro) guide first, which takes you step by step from zero to production.
</Tip>

***

## Add the node to the Canvas

<Steps>
  <Step title="Locate the integration in Marketplace">
    In the left sidebar of Brain Studio, open the **Marketplace** folder.

    If the integration is correctly connected, you will see **Mercado Pago** listed as an available provider.

    <Frame caption="Mercado Pago available in the Marketplace sidebar">
      <img src="https://mintcdn.com/jelouai/y5L6vahGrhMqbaUQ/assets/images/integraciones/pagos/mercado-pago-nodo-canvas.png?fit=max&auto=format&n=y5L6vahGrhMqbaUQ&q=85&s=525151f895b2b80de936349f1f6fb69e" alt="Mercado Pago visible in the Marketplace folder inside the Brain Studio sidebar" width="766" height="522" data-path="assets/images/integraciones/pagos/mercado-pago-nodo-canvas.png" />
    </Frame>
  </Step>

  <Step title="Drag the node to the Canvas">
    Drag **Mercado Pago** from the sidebar into your flow on the Canvas.

    When you drop it, the node block will be created with its available outputs.

    <Frame caption="Mercado Pago node deployed on the Canvas">
      <img src="https://mintcdn.com/jelouai/nCvuucLdA-_D8bXJ/assets/images/integraciones/pagos/mercado-pago-configuracion-nodo.png?fit=max&auto=format&n=nCvuucLdA-_D8bXJ&q=85&s=91263850a921fc15919900b63a9d0e32" alt="Mercado Pago node added to the Canvas showing its outputs" width="2048" height="956" data-path="assets/images/integraciones/pagos/mercado-pago-configuracion-nodo.png" />
    </Frame>
  </Step>

  <Step title="Open the configuration panel">
    Select the node on the Canvas to open its configuration panel on the right side.

    From there you can complete the **inputs** and review the available **outputs**.
  </Step>
</Steps>

***

## Configure the node in Canvas

<Tabs>
  <Tab title="Inputs">
    <AccordionGroup>
      <Accordion title="Save result as" icon="database">
        <ParamField body="Save result as" type="string">
          Defines the name of the variable where Brain Studio will store the **complete JSON** response from the node.

          <Tip>
            Useful if you want to use the response later (logs, validations, traceability, or flow decisions).
          </Tip>
        </ParamField>
      </Accordion>

      <Accordion title="Payment type (default: payment)" icon="credit-card">
        <ParamField body="Payment type" type="string" default="payment">
          Defines the type of charge.

          **Available values:** `payment` (one-time payment), `subscription` (subscription)

          <Info>
            If nothing is selected, `payment` will be used.
          </Info>
        </ParamField>
      </Accordion>

      <Accordion title="Environment" icon="flask">
        <ParamField body="Environment" type="string" required>
          Defines the execution environment for the payment.

          **Available values:** `Test`, `Production`

          <Warning>
            Must match the Access Token you connected in Marketplace (Test vs Production).
          </Warning>
        </ParamField>
      </Accordion>

      <Accordion title="Payment button expiration [minutes]" icon="clock">
        <ParamField body="Payment button expiration [minutes]" type="number">
          Defines how long the payment button is valid from the moment it is sent to the user.

          **Available values:** `10`, `20`, `30`, `60`
        </ParamField>
      </Accordion>

      <Accordion title="Currency" icon="coins">
        <ParamField body="Currency" type="string" required>
          Currency for the charge.

          <Info>
            The available currency depends on the country of the connected Mercado Pago account or credentials.
          </Info>
        </ParamField>
      </Accordion>

      <Accordion title="Payment reason" icon="file-lines">
        <ParamField body="Payment reason" type="string" required>
          Descriptive text for the charge (for example, order number or product/service description).

          <Tip>
            Ideally use it with flow variables so it aligns with the conversation context.
          </Tip>
        </ParamField>
      </Accordion>

      <Accordion title="Payment metadata" icon="tag">
        <ParamField body="Payment metadata" type="string">
          Additional information for traceability or internal reference.

          <Info>
            You can use it for correlation with your order, reconciliation, or payment audit.
          </Info>
        </ParamField>
      </Accordion>

      <Accordion title="Buyer email" icon="envelope">
        <ParamField body="Buyer email" type="string" required>
          The buyer's email. It must have been collected previously in the flow and passed here as a variable.
        </ParamField>
      </Accordion>

      <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 fully modify the message the user will see before opening the checkout.
        </Info>

        <Frame caption="Example 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 message with customized texts and Mercado Pago payment button in WhatsApp" className="max-w-sm mx-auto" width="1033" height="498" data-path="assets/images/integraciones/pagos/mercado-pago-boton-ejemplo.png" />
        </Frame>
      </Accordion>

      <Accordion title="Header" icon="heading">
        <ParamField body="Header" type="string">
          Title of the message that accompanies the payment button.
        </ParamField>
      </Accordion>

      <Accordion title="Body" icon="align-left">
        <ParamField body="Body" type="string">
          Main text of the message that accompanies the payment button.
        </ParamField>
      </Accordion>

      <Accordion title="Footer" icon="minus">
        <ParamField body="Footer" type="string">
          Closing text or disclaimer of the message that accompanies the payment button.
        </ParamField>
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Outputs">
    <AccordionGroup>
      <Accordion title="Successful payment" icon="circle-check">
        Activated when the provider confirms the transaction was processed successfully.

        This is the official payment confirmation point within the flow.

        Usage examples:

        * Issue invoice
        * Activate subscription
        * Release product or service
        * Update order status in external system
      </Accordion>

      <Accordion title="Pending payment" icon="clock">
        Activated when the provider reports that the transaction is in a pending state.

        This may depend on the payment method (transfers, additional validations, etc.).

        Currently, monitoring the state change from pending to approved requires additional logic (for example, a webhook or subsequent status verification).
      </Accordion>

      <Accordion title="Failed payment" icon="circle-xmark">
        Activated when the transaction was rejected or declined.

        Recommendations:

        * Inform the user
        * Allow retry
        * Reuse the same Mercado Pago node
      </Accordion>

      <Accordion title="HTTP Error" icon="triangle-exclamation">
        Activated when a communication error with the provider occurs (timeout, network, or invalid response).
      </Accordion>

      <Accordion title="Error Code" icon="bug">
        Activated when the provider returns an internal error code during payment creation or processing.
      </Accordion>

      <Accordion title="Successful CTA delivery" icon="paper-plane">
        Activated when the payment button was sent successfully in the conversation.

        Indicates that the message with the button was displayed successfully in WhatsApp.

        Can be connected to an AI Agent that assists the user while they decide to complete the payment.

        **Example prompt (reference):**

        ```txt theme={null}
        Act as a payment assistant.

        The user has just received a button to complete their payment.
        Do not send proactive messages.
        Only respond if the user asks a question.
        Help them understand how to complete the payment and resolve related questions.
        ```
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>
