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

# Use the gateway in Brain Studio

> Configure the Payment node in Brain Studio to charge with a custom gateway inside a conversational flow.

Once your custom gateway is created, connected, and **active**, it becomes available in the **Payment** node's selector in Brain Studio.

## Node configuration

| Field                 | Description                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **Payment gateway**   | Selector listing your active custom gateways. Disabled if your company has no JelouPayments credentials or if there's an authorization error. |
| **Timeout (seconds)** | How long the flow waits before continuing down the **Timeout** branch.                                                                        |
| **Customer data**     | Maps flow variables to the customer fields (reference, name, email, phone, ID document, address, country).                                    |
| **Amount**            | Maps flow variables to the amount fields (taxable/non-taxable amounts, tax, currency, description).                                           |
| **Save response**     | Optionally stores the gateway's response in a flow variable.                                                                                  |

<Note>
  This selector only lists custom gateways connected through **Payments**. It doesn't mix catalog providers or other company credentials.
</Note>

## Node outputs

The Payment node exposes six outputs you need to wire up in your flow:

| Output             | Meaning                                                             |
| ------------------ | ------------------------------------------------------------------- |
| General error      | Any unhandled error while running the node.                         |
| Message sent       | The paylink was sent to the customer.                               |
| Payment successful | The payment was confirmed successful (via webhook or status check). |
| Payment pending    | The payment is still pending confirmation.                          |
| Payment failed     | The payment was confirmed failed.                                   |
| Timeout            | The configured timeout elapsed with no resolution.                  |

<Tip>
  The **Success / Failed / None** mapping you defined when configuring your gateway's webhook and status check only determines the **Payment successful**, **Payment pending**, and **Payment failed** outputs — that's why getting it right matters when you [create the gateway](/en/guides/integraciones/pagos/personalizadas/crear-pasarela).
</Tip>

<Warning>
  Don't leave the **Payment failed** and **Timeout** branches unhandled — without them, the customer can be left without a response if the charge doesn't complete.
</Warning>

## Use cases

<AccordionGroup>
  <Accordion title="Local PSP not available in the provider catalog">
    A business operating with a regional PSP that isn't in Jelou's provider catalog: it defines its checkout endpoint as a custom gateway and maps webhook responses to the Payment node's outputs, without depending on Jelou building a dedicated integration.
  </Accordion>

  <Accordion title="Confirmation via active status check">
    A business whose PSP doesn't offer reliable webhooks: it enables **Check status with the PSP on return** when creating the gateway, and the flow uses the **Payment pending** output while Jelou checks the transaction's status.
  </Accordion>

  <Accordion title="Gradual migration from a catalog provider">
    A business already using a catalog provider that needs to add another PSP for a different country or payment method: it sets up the custom gateway in parallel and selects one or the other in the Payment node depending on the flow or customer segment.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="How it works" href="/en/guides/integraciones/pagos/personalizadas/como-funciona" icon="diagram-project">
    Review the overview and compatibility requirements.
  </Card>

  <Card title="Provider catalog" href="/en/guides/integraciones/pagos/proveedores" icon="credit-card">
    Check whether your PSP already has a ready-to-use integration.
  </Card>
</CardGroup>
