> ## 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. It also sets how long the [Jelou payment page](https://docs.jelou.ai/en/guides/integrations/payments/custom/how-it-works.md#jelou-payment-page) link stays valid, up to 30 minutes. |
| **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.

## 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](https://docs.jelou.ai/en/guides/integrations/payments/custom/create-gateway.md).

> [!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.

## Use cases

> [accordion] 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] 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] 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.

## Next steps

> [card] [How it works](https://docs.jelou.ai/en/guides/integrations/payments/custom/how-it-works.md)
>
> Review the overview and compatibility requirements.

> [card] [Provider catalog](https://docs.jelou.ai/en/guides/integrations/payments/providers.md)
>
> Check whether your PSP already has a ready-to-use integration.


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