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

# Create a custom gateway

> Configure the 6-step wizard, step by step, to set up a custom payment provider in Payments.

From **Payments → Integrations**, the **Add gateway** button opens the setup wizard. When creating a new gateway, steps are **linear**: you must complete each one before moving on. Once the gateway exists, you can move freely between steps to edit it.

<Tip>
  Before filling the wizard, use the [compatibility prompt](/en/guides/integraciones/pagos/personalizadas/prompt-compatibilidad) with your LLM and your PSP's documentation. You leave with the mapping ready for each step.
</Tip>

## Setup wizard

<Steps>
  <Step title="General">
    Set the **Name**, **Slug**, **Description** (optional), **Icon URL** (optional), and **Environment** (**Sandbox** or **Production**).

    * **Name** and **Slug** are required.

    <Frame caption="Wizard step 1: the gateway's general information">
      <img src="https://mintcdn.com/jelouai/5kQz7Vl-QmvhNoPW/assets/images/integraciones/pagos/personalizadas/wizard-paso-1-general.png?fit=max&auto=format&n=5kQz7Vl-QmvhNoPW&q=85&s=4d436c2f904e4cb4dcfee817e90964e5" alt="General step of the custom gateway wizard, with the Name, Slug, Environment, and Description fields" width="832" height="1027" data-path="assets/images/integraciones/pagos/personalizadas/wizard-paso-1-general.png" />
    </Frame>

    <Tip>
      Start in **Sandbox**. Environment can't be changed later: for production you'll create another gateway (or a separate setup) with real keys.
    </Tip>

    <Warning>
      **Slug** and **Environment** can't be edited after the gateway is created.
    </Warning>
  </Step>

  <Step title="Credentials">
    Declare each secret or API key your PSP needs. For each row you define:

    * **Key** — internal placeholder name (for example `apiKey`)
    * **Label** — text shown in the UI
    * **Type** — **Text** or **Secret**

    You must declare at least one credential. Use **Secret** for API keys and tokens: the value stays masked.

    <Frame caption="Wizard step 2: credentials your PSP needs">
      <img src="https://mintcdn.com/jelouai/5kQz7Vl-QmvhNoPW/assets/images/integraciones/pagos/personalizadas/wizard-paso-2-credenciales.png?fit=max&auto=format&n=5kQz7Vl-QmvhNoPW&q=85&s=98b7d8fdfc0e23943df0fcdf024f46cf" alt="Credentials step of the custom gateway wizard, with a Secret-type credential row" width="802" height="481" data-path="assets/images/integraciones/pagos/personalizadas/wizard-paso-2-credenciales.png" />
    </Frame>

    <Tip>
      Here you only **declare** which keys exist (like the fields in a BYOK form). You paste the real values later, in **Connect**.
    </Tip>

    <Note>
      You can't mark a credential as required from this screen. If you need that behavior, coordinate with your technical team.
    </Note>
  </Step>

  <Step title="Request (includes Return)">
    Here you define how Jelou calls the PSP to create a charge and, optionally, how to handle the customer's return.

    **Request**

    * **Method** (GET, POST, PUT, or PATCH) and **URL** of the charge-creation endpoint
    * **Headers** — for example `Authorization: Bearer {{myCredential}}`
    * **Body template** — request JSON with `{{...}}` placeholders (see [Variables and placeholders](/en/guides/integraciones/pagos/personalizadas/variables-y-placeholders))
    * **Payment link path** and **Transaction id path** — path in the response JSON where the checkout URL and transaction id live (for example `data.checkout_url`)

    <Frame caption="Wizard step 3: endpoint, headers, and body template for the request">
      <img src="https://mintcdn.com/jelouai/5kQz7Vl-QmvhNoPW/assets/images/integraciones/pagos/personalizadas/wizard-paso-3-peticion.png?fit=max&auto=format&n=5kQz7Vl-QmvhNoPW&q=85&s=f123887b84eb0f2df55a878e41014011" alt="Request step of the custom gateway wizard, with the endpoint, headers, and sample body template" width="807" height="1007" data-path="assets/images/integraciones/pagos/personalizadas/wizard-paso-3-peticion.png" />
    </Frame>

    **URL** and **Body template** are required. Every `{{...}}` must match a declared credential or a recognized placeholder.

    **Return (optional)**

    * **Transaction id parameter** — query param the PSP adds when redirecting after checkout
    * **Check status with the PSP on return** — active status lookup (method, URL, headers, paths, and mapping to **Success / Failed / None**)

    <Frame caption="Return block: enable browser return and status check with the PSP">
      <img src="https://mintcdn.com/jelouai/5kQz7Vl-QmvhNoPW/assets/images/integraciones/pagos/personalizadas/wizard-paso-3-retorno-navegador.png?fit=max&auto=format&n=5kQz7Vl-QmvhNoPW&q=85&s=09a9d2b44c7f34ee489bc0d4145edf86" alt="Return block of the wizard, with browser return and PSP status check toggles enabled" width="770" height="772" data-path="assets/images/integraciones/pagos/personalizadas/wizard-paso-3-retorno-navegador.png" />
    </Frame>

    <Frame caption="Mapping each PSP status value to Success, Failed, or None">
      <img src="https://mintcdn.com/jelouai/5kQz7Vl-QmvhNoPW/assets/images/integraciones/pagos/personalizadas/wizard-paso-3-mapeo-estados.png?fit=max&auto=format&n=5kQz7Vl-QmvhNoPW&q=85&s=f3195235153242f23ed1c95b907a62b6" alt="Status mapping table from PSP values to Success or Failed inside the return block" width="790" height="527" data-path="assets/images/integraciones/pagos/personalizadas/wizard-paso-3-mapeo-estados.png" />
    </Frame>

    <Warning>
      Confirming this step creates or updates the gateway. **Slug** and **Environment** are locked in. If creation fails, the wizard blocks progress.
    </Warning>

    <Accordion title="Notes on the HTTP method">
      The selector may show **DELETE**, but only GET, POST, PUT, or PATCH are accepted. Choosing DELETE causes the save to fail.
    </Accordion>
  </Step>

  <Step title="Connect">
    Available after the previous step is saved. Enter the **real values** for each declared credential—your PSP's secrets, not their names.

    <Frame caption="Wizard step 4: real values for the declared credentials">
      <img src="https://mintcdn.com/jelouai/5kQz7Vl-QmvhNoPW/assets/images/integraciones/pagos/personalizadas/wizard-paso-4-conectar.png?fit=max&auto=format&n=5kQz7Vl-QmvhNoPW&q=85&s=495d74f7e37fdd577e7cc1417b4f0c6a" alt="Connect step of the custom gateway wizard, with the Api key field and Update keys button" width="811" height="547" data-path="assets/images/integraciones/pagos/personalizadas/wizard-paso-4-conectar.png" />
    </Frame>

    <Tip>
      In **Sandbox**, paste the PSP's test keys. In **Production**, the real keys. Without this step, the gateway can't authenticate with the provider.
    </Tip>
  </Step>

  <Step title="Webhook">
    Configure how to interpret inbound notifications from the PSP:

    * Enable or disable the webhook with **Enabled**. If you disable it, the wizard skips to Finish.
    * **Signature header** (optional) — header where the PSP sends its HMAC signature
    * **Event name path** and **Transaction id path** — paths inside the payload
    * **Events table** — map each PSP event to **Success**, **Failed**, or **None**

    <Frame caption="Wizard step 5: confirmation webhook configuration">
      <img src="https://mintcdn.com/jelouai/5kQz7Vl-QmvhNoPW/assets/images/integraciones/pagos/personalizadas/wizard-paso-5-webhook.png?fit=max&auto=format&n=5kQz7Vl-QmvhNoPW&q=85&s=6793f9bf50949476ed728f2b3e515ea1" alt="Webhook step of the custom gateway wizard, with the signature header, payload paths, and expected JSON format" width="772" height="922" data-path="assets/images/integraciones/pagos/personalizadas/wizard-paso-5-webhook.png" />
    </Frame>

    <Note>
      The **Expected JSON format** field is only a visual reference—it isn't sent to the backend.
    </Note>
  </Step>

  <Step title="Webhook secret">
    Only appears if the webhook is enabled. Copy the **Webhook URL** the wizard generates, configure it in your PSP's dashboard, and generate or rotate the **HMAC secret**.

    * Available algorithms: **SHA256**, **SHA384**, or **SHA512**
    * A custom secret must be at least **16 characters**

    <Frame caption="Wizard step 6: webhook URL and signing secret">
      <img src="https://mintcdn.com/jelouai/5kQz7Vl-QmvhNoPW/assets/images/integraciones/pagos/personalizadas/wizard-paso-6-webhook-secret.png?fit=max&auto=format&n=5kQz7Vl-QmvhNoPW&q=85&s=89e48c2d2f66e7aa0a2b5494551cacda" alt="Webhook secret step of the custom gateway wizard, with the webhook URL, active secret, and signature algorithm selector" width="810" height="762" data-path="assets/images/integraciones/pagos/personalizadas/wizard-paso-6-webhook-secret.png" />
    </Frame>

    Finishing this step closes the wizard.
  </Step>
</Steps>

<Tip>
  Before using the gateway in production, use **Test** from the Integrations list. See [Test the gateway](/en/guides/integraciones/pagos/personalizadas/probar-pasarela).
</Tip>

## Next steps

<CardGroup cols={2}>
  <Card title="Variables and placeholders" href="/en/guides/integraciones/pagos/personalizadas/variables-y-placeholders" icon="brackets-curly">
    Placeholders available for the body, headers, and status check.
  </Card>

  <Card title="Test the gateway" href="/en/guides/integraciones/pagos/personalizadas/probar-pasarela" icon="vial">
    Generate a test paylink before going to production.
  </Card>
</CardGroup>
