> ## 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 Deuna node to your flow in Canvas and configure its inputs and outputs.

Once the integration is connected in Marketplace with the **Punto de Venta**, **Api Key**, **Api Secret**, **IVA** and **Moneda**, the **Deuna** node is available in your workspace to use within your flows in Canvas.

The node processes the payment through Deuna and exposes the final transaction status so your flow can continue based on the result.

***

## Add the node to 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 **Deuna** listed as an available provider.

    <Frame caption="Deuna available in the Marketplace sidebar">
      <img src="https://mintcdn.com/jelouai/N-faBULcr0WC2nPA/assets/images/integraciones/pagos/deuna-marketplace-panel-lateral.png?fit=max&auto=format&n=N-faBULcr0WC2nPA&q=85&s=69a6b4af65fb2cf21417f4b697ab225d" alt="Deuna visible in the Marketplace section of the Brain Studio sidebar alongside other integrations" style={{ maxWidth: '320px', margin: '0 auto' }} width="648" height="698" data-path="assets/images/integraciones/pagos/deuna-marketplace-panel-lateral.png" />
    </Frame>
  </Step>

  <Step title="Drag the node to Canvas">
    Drag **Deuna** from the sidebar into your flow in the Canvas.

    When dropped, the node block will be created with its available outputs.
  </Step>

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

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

***

## Configure the node

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

          <Tip>
            Useful for logs, validations, traceability, or downstream decisions in the flow.
          </Tip>
        </ParamField>
      </Accordion>

      <Accordion title="Modalidad de cobro [cobro único por default]" icon="credit-card">
        <ParamField body="Modalidad de cobro [cobro único por default]" type="string" default="payment">
          Defines the payment modality.

          Currently only the `payment` value (single charge) is supported.
        </ParamField>
      </Accordion>

      <Accordion title="Ambiente" icon="server">
        <ParamField body="Ambiente" type="string" required>
          Defines the environment in which the charge will be executed.

          **Available values:** `DEV`, `PROD`
        </ParamField>

        <Warning>
          The environment must match the credentials used when connecting Deuna in Marketplace.

          If you use development credentials with `PROD`, or vice versa, the payment will not be processed correctly.
        </Warning>
      </Accordion>

      <Accordion title="Expiración del botón de pagos [minutos]" icon="clock">
        <ParamField body="Expiración del botón de pagos [minutos]" type="number">
          Defines how long the payment button remains valid from the moment it is sent to the user.

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

      <Accordion title="Motivo de pago" icon="file-lines">
        <ParamField body="Motivo de pago" type="string" required>
          Descriptive text for the charge.

          Examples:

          * order number
          * product or service name
          * internal payment reference
        </ParamField>
      </Accordion>

      <Accordion title="Monto sujeto a impuestos" icon="receipt">
        <ParamField body="Monto sujeto a impuestos" type="number" required>
          Amount of the charge that is subject to taxes.

          <Info>
            This value is added to the tax-free amount to calculate the total payment.
            You can use `0` if it does not apply.
          </Info>
        </ParamField>
      </Accordion>

      <Accordion title="Monto libre de impuestos" icon="dollar-sign">
        <ParamField body="Monto libre de impuestos" type="number" required>
          Amount of the charge that is not subject to taxes.

          <Info>
            This value is added to the taxable amount to calculate the total payment.
            You can use `0` if it does not apply.
          </Info>
        </ParamField>
      </Accordion>

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

          <Info>
            You can use this field to correlate the payment with an order, reconciliation, or audit.
          </Info>
        </ParamField>
      </Accordion>

      <Accordion title="Personalizar textos botón de pago" icon="message">
        <ParamField body="Personalizar textos botón de pago" type="boolean" default="false">
          If you select **Yes**, additional fields are enabled to customize the message that accompanies the payment button.

          **Available fields:**

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

        <Info>
          Allows you to fully customize the message shown to the user before paying in the Deuna wallet.
        </Info>
      </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 or clarification text of the message that accompanies the payment button.
        </ParamField>
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Outputs">
    <AccordionGroup>
      <Accordion title="Pago Exitoso" icon="circle-check">
        Triggered when Deuna confirms the transaction was processed correctly.

        This is the official payment confirmation point within the flow.

        Usage examples:

        * issue an invoice
        * activate a subscription
        * release a product or service
        * update the order status in an external system
      </Accordion>

      <Accordion title="Pago Fallido" icon="circle-xmark">
        Triggered when the transaction was rejected or declined.

        Recommendations:

        * inform the user
        * allow a retry
        * redirect to another payment method
      </Accordion>

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

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

      <Accordion title="Envío correcto de CTA" icon="paper-plane">
        Triggered when the payment button was sent correctly in the conversation.

        This output does not confirm the payment. It only indicates that the user has received the CTA and can continue the process in the Deuna wallet.

        **Implementation recommendation:**
        Connect this output to an **AI Agent** or a conversational support block. This way, if the user has questions or needs help while completing the payment, the conversation does not lose continuity.

        Usage examples:

        * answer questions about the payment
        * indicate that the user must complete the transaction in the Deuna wallet
        * accompany the user while waiting for the provider confirmation

        <Tip>
          This output is useful for keeping the conversational thread active between the button being sent and the final payment confirmation.
        </Tip>

        **Sample prompt for post-CTA support AI Agent:**

        ```txt theme={null}
        You are a payment support assistant.

        Your role is to accompany the user after they received the payment button, resolve brief questions, and keep the conversation active while Deuna confirms the result.

        Rules:
        - Do not recalculate amounts
        - Do not generate new links
        - Do not promise approvals
        - If the user says they already paid, tell them to wait for confirmation
        - If the user has questions, respond briefly and clearly
        - If you detect a problem, offer help or escalate to support
        ```
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

***

## Important considerations

<AccordionGroup>
  <Accordion title="The node environment must match the credentials">
    The environment configured in the node (`DEV` or `PROD`) must match the credentials used when connecting Deuna.

    If they do not match, the payment will not be processed correctly.
  </Accordion>

  <Accordion title="Payment status handling">
    In payments with Deuna, the user completes the transaction in the provider's wallet.

    In some cases, the payment may momentarily remain in a pending state. In that case:

    * the user receives a notification in the conversation
    * the flow waits for the confirmation

    When Deuna confirms the final result, the flow continues automatically through:

    * **Pago Exitoso**
    * **Pago Fallido**

    <Info>
      The pending state is not exposed as an independent node output.
    </Info>
  </Accordion>
</AccordionGroup>
