> ## 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](/guides/integraciones/pagos/experiencias/tipos-de-experiencia), 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.

<Info>
  Jelou does not hold funds. Each implementing user uses their own account and credentials from the corresponding payment provider.
</Info>

***

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

<Tabs>
  <Tab title="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>

  <Tab title="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.
  </Tab>
</Tabs>

### Statuses you must handle

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

<Accordion title="Approved">
  The payment was confirmed successfully.

  Your flow should normally:

  * Continue the main process.
  * Confirm to the user.
  * Record the event (if applicable).
</Accordion>

<Accordion title="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>

<Accordion title="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.
</Accordion>

<Info>
  Model the payment node as a deterministic transition:
  <code>request → external execution → status → next action</code>.
</Info>

***

## Integration model (BYOK)

The Marketplace payment integrations work, for the most part, 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.
</Tip>

***

## Before implementing

<Tabs>
  <Tab title="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>

  <Tab title="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 title="View payment experiences" icon={<span style={{ fontSize: '1.15rem', lineHeight: 1 }}>🧩</span>} href="/guides/integraciones/pagos/experiencias/tipos-de-experiencia">
      Limits, differences, and when to use each one.
    </Card>
  </Tab>

  <Tab title="Technical requirements">
    Minimum checklist:

    * **Active account** with the chosen provider.
    * **Credentials** ready (API keys / Access Token / OAuth).
    * **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.
    </Warning>
  </Tab>
</Tabs>

***

## Typical implementation flow

<Steps>
  <Step title="Choose provider and experience">
    Define the country(ies), payment method(s), and the experience (WebView / native / conversational).
  </Step>

  <Step title="Obtain credentials">
    Generate credentials in the provider's dashboard (test and/or production depending on your case).
  </Step>

  <Step title="Install from Marketplace (BYOK)">
    Install the integration and enter your credentials. The provider becomes available as a tool in Brain.
  </Step>

  <Step title="Use in Brain and handle statuses">
    Implement the payment in your flow and explicitly handle **Approved / Rejected / Pending (when applicable)**.
  </Step>
</Steps>

<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.
</Tip>

***

## Next steps

<CardGroup cols={3}>
  <Card title="Tutorial: Implementing your first charge from WhatsApp" href="/guides/integraciones/pagos/implementando-tu-primer-cobro" icon="rocket">
    Step-by-step tutorial: from credentials to your first charge in production.
  </Card>

  <Card title="Payment experiences" href="/guides/integraciones/pagos/experiencias/tipos-de-experiencia" icon="puzzle">
    When to use embedded WebView, native in-chat experience, or conversational flows.
  </Card>

  <Card title="Available providers" href="/guides/integraciones/pagos/proveedores" icon="credit-card">
    Providers by country, integration scope, and specific guides.
  </Card>
</CardGroup>
