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

# Introduction

> Implement charges within your conversational flows using external providers connected to Brain Studio.

Payments in Brain Studio lets you **initiate, execute, and confirm charges** within a conversation (for example on WhatsApp), and continue the flow based on the **actual result of the transaction**.

The platform supports different [payment experiences](https://docs.jelou.ai/guides/integraciones/pagos/experiencias/tipos-de-experiencia.md), depending on the provider and payment method used:

* **WebView embedded in WhatsApp**, where the customer completes the checkout within the conversation.
* **Native in-chat experience**, when the payment method supports it.
* **Conversational flows for wallets or transfers**, when confirmation occurs outside the traditional checkout.

> [!NOTE]
>
> Jelou does not hold funds. Each implementing user uses their own account and credentials from the corresponding payment provider.

***

## How it works

A payment in Brain Studio always involves three clearly separated roles:

* 🧠 **Brain Studio** → Builds the request and exposes the status
* 💳 **Payment provider** → Executes the transaction and settles funds
* 🎯 **Your implementation** → Decides the next action based on the status received

### Responsibilities of each party

> [tab] Brain Studio
>
> * Builds the request (amount, currency, metadata).
> * Triggers the operation toward the provider.
> * Receives the status and exposes it as a result.
> * Does not authorize or settle payments.

> [tab] Provider
>
> * Executes checkout or authorization according to the payment method.
> * Applies validations and anti-fraud rules.
> * Determines the final status.
> * Settles the funds in the merchant's account.

### Statuses you must handle

The provider will always return a **transaction status**.
Your implementation must handle it explicitly.

> [accordion] Approved
>
> The payment was confirmed successfully.
>
> Your flow should normally:
>
> * Continue the main process.
> * Confirm to the user.
> * Record the event (if applicable).

> [accordion] Rejected
>
> The operation was denied or failed.
>
> Your flow should:
>
> * Report the error.
> * Allow retry or an alternative method.
> * Record the reason if the provider exposes it.

> [accordion] Pending (when applicable)
>
> The payment does not yet have a final confirmation
> (common for cash or transfers).
>
> Your flow should:
>
> * Define a follow-up strategy.
> * Query the status later (polling or webhook).
> * Avoid continuing as if it were approved.

> [!NOTE]
>
> Model the payment node as a deterministic transition:
> `request → external execution → status → next action`.

***

## Integration model

You can start in [**test mode**](https://docs.jelou.ai/guides/integraciones/pagos/modo-prueba.md): install a gateway and validate the charge without your own account or credentials. To charge for real, connect your account on the same installation.

Marketplace payment integrations work, for real charges, with **BYOK (Bring Your Own Keys)**:

* You connect the provider with **your credentials** (API keys, Access Token, or OAuth).
* The payment is processed and settled in the **merchant's account** within the provider.
* Brain Studio **orchestrates** the flow and works with the **returned status**.

> [!TIP]
>
> BYOK = you bring the provider account and keys. Brain Studio does not replace the provider: it integrates it.

***

## Before implementing

> [tab] Coverage and method
>
> Define the scope of your use case:
>
> * **Country(ies)** where you will operate.
> * **Payment methods** required (cards, transfers, cash, local methods).
> * If the merchant already uses a specific provider, start with that provider.

> [tab] Experience
>
> The experience depends on the provider and the type of integration available:
>
> * **WebView embedded in WhatsApp**
>
> * **Native in-chat experience** (WhatsApp Flows, when applicable)
>
> * **Conversational flows** for wallets/transfers (when confirmation occurs outside the checkout)
>
> > [card] [View payment experiences](https://docs.jelou.ai/guides/integraciones/pagos/experiencias/tipos-de-experiencia.md)
> >
> > Limits, differences, and when to use each one.

> [tab] Technical requirements
>
> Minimum checklist:
>
> * **Active account** with the chosen provider, unless you start in [test mode](https://docs.jelou.ai/guides/integraciones/pagos/modo-prueba.md).
> * **Credentials** ready (API keys / Access Token / OAuth), or a test-mode installation.
> * **Verified WhatsApp Business** if you will use:
>   * Embedded WebView
>
>   * Native experience with WhatsApp Flows
>
> > [!WARNING]
> >
> > If the WhatsApp Business account is not verified, the WebView may open in an external browser and the native experience may not be available.

***

## Typical implementation flow

**1. Choose provider and experience**

Define the country(ies), payment method(s), and the experience (WebView / native / conversational).

**2. Try or connect**

Install in [test mode](https://docs.jelou.ai/guides/integraciones/pagos/modo-prueba.md) to validate the flow without an account, or generate credentials in the provider dashboard and install with **Connect my account**.

**3. Use in Brain and handle statuses**

Implement the payment in your flow and explicitly handle **Approved / Rejected / Pending (when applicable)**.

> [!TIP]
>
> The recommended practice is to treat the payment as a "status-based decision": the provider returns a status and your flow continues on the correct branch.

***

## Next steps

> [card] [Test mode](https://docs.jelou.ai/guides/integraciones/pagos/modo-prueba.md)
>
> Install a gateway and test charges without your own account or credentials.

> [card] [Tutorial: your first Mercado Pago payment](https://docs.jelou.ai/guides/integraciones/pagos/proveedores/mercado-pago/implementando-tu-primer-cobro.md)
>
> Step-by-step walkthrough with Mercado Pago: from credentials to your first production payment.

> [card] [Payment experiences](https://docs.jelou.ai/guides/integraciones/pagos/experiencias/tipos-de-experiencia.md)
>
> When to use embedded WebView, native in-chat experience, or conversational flows.

> [card] [Available providers](https://docs.jelou.ai/guides/integraciones/pagos/proveedores.md)
>
> Providers by country, integration scope, and specific guides.

> [card] [Custom gateway](https://docs.jelou.ai/guides/integraciones/pagos/personalizadas/como-funciona.md)
>
> Connect a PSP that isn't in the catalog by describing its integration declaratively.


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