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

# Getting credentials

> Get Conekta's public key, private key, and configure the webhook from the admin panel to connect Conekta in Brain Studio.

This guide walks you through preparing credentials and webhooks for test and production in the [Conekta panel](https://panel.conekta.com/).

<Check>
  When you finish this guide, you will have the **public key**, **private key**, and **webhook** configured to connect Conekta in Brain Studio.
</Check>

***

## Before you begin

You need:

* An **active Conekta account**
* Access to the **[Conekta panel](https://panel.conekta.com/)** with administrator permissions
* A decision on whether you will connect **test** or **production** credentials

***

## Environments in Conekta

Conekta separates credentials by environment:

* **Test:** test environment. Lets you simulate payments without moving real money.
* **Production:** live environment. Processes transactions with real money.

Each environment has its own key pair and its own webhook. Do not mix test credentials or webhooks with production ones.

| Environment | Public key                         | Private key                                        | Webhook                                  |
| ----------- | ---------------------------------- | -------------------------------------------------- | ---------------------------------------- |
| Test        | Visible in **Test API Keys**       | You must create it with **Create new private key** | Configure it with **Test Mode** enabled  |
| Production  | Visible in **Production API Keys** | You must create it with **Create new private key** | Configure it with **Test Mode** disabled |

<Warning>
  Do not mix credentials or webhooks across environments. If even one key or webhook belongs to the wrong environment, installation may fail or payment statuses may not sync correctly.
</Warning>

<Note>
  Conekta only lets you **copy or view the private key at the moment it is created**. If you lose it, you must generate a new one.
</Note>

***

## Webhook URL and events

In both environments you must use the same notification URL:

```text theme={null}
https://chat-payments.jelou.ai/link-webhook?provider=CONEKTA
```

Select these **5 events** within the **orders** category:

| Event                   | Description                  |
| ----------------------- | ---------------------------- |
| `order.expired`         | The order expired            |
| `order.paid`            | The order was paid           |
| `order.pending_payment` | The order is pending payment |
| `order.refunded`        | The order was refunded       |
| `order.declined`        | The order was declined       |

<Note>
  Brain Studio uses these events to update the payment status and continue the flow through the corresponding output.
</Note>

***

## Part 1 — Prepare test credentials and webhook

<Steps>
  <Step title="Sign in to the Conekta panel">
    Log in at [https://panel.conekta.com/](https://panel.conekta.com/) with the merchant account.
  </Step>

  <Step title="Enable test mode">
    In the **bottom-left corner** of the panel, turn on the **Test Mode** switch.

    You should see the **Test mode is enabled** notice at the top of the panel.
  </Step>

  <Step title="Open Developers">
    In the sidebar menu, open **Developer**.

    <Frame caption="Conekta panel with test mode enabled, Developers section, and Webhooks card">
      <img src="https://mintcdn.com/jelouai/BJIoathnR7ANCT6N/assets/images/integraciones/pagos/conekta-dashboard-desarrolladores-prueba.png?fit=max&auto=format&n=BJIoathnR7ANCT6N&q=85&s=3a6b590a96a09ed46afe2b94d9b31bfe" alt="Conekta panel with test mode enabled, Developers section visible, and Webhooks card at the bottom" width="1024" height="468" data-path="assets/images/integraciones/pagos/conekta-dashboard-desarrolladores-prueba.png" />
    </Frame>
  </Step>

  <Step title="View test API Keys">
    In the **View API Keys** card, click **View test API Keys**.
  </Step>

  <Step title="Copy the public key">
    In the **Public key** section, copy the active key using **Copy key**.

    <Frame caption="Test API Keys: public key and private key creation">
      <img src="https://mintcdn.com/jelouai/BJIoathnR7ANCT6N/assets/images/integraciones/pagos/conekta-dashboard-api-keys-prueba.png?fit=max&auto=format&n=BJIoathnR7ANCT6N&q=85&s=6a290957ed3d4e7956dbbb4b3eeb726a" alt="Conekta test API Keys screen showing the public key and the Create new private key button" width="1024" height="468" data-path="assets/images/integraciones/pagos/conekta-dashboard-api-keys-prueba.png" />
    </Frame>
  </Step>

  <Step title="Create and copy the private key">
    In the **Private keys** section, click **Create new private key**.

    Assign a descriptive name, confirm creation, and **copy the private key immediately**. Conekta will not show the full key again after you close that step.
  </Step>

  <Step title="Open test Webhooks">
    Return to **Developer**. In the **Webhooks** card, click **Review webhooks**.
  </Step>

  <Step title="Create the test webhook">
    Click **Create Webhook** and complete:

    * **Webhook URL:** `https://chat-payments.jelou.ai/link-webhook?provider=CONEKTA`
    * **Name or description:** a descriptive name, for example `Jelou Brain`
    * **Events to notify:** select the 5 **orders** events listed above

    <Frame caption="Create Webhook modal in Conekta">
      <img src="https://mintcdn.com/jelouai/BJIoathnR7ANCT6N/assets/images/integraciones/pagos/conekta-webhook-crear-modal.png?fit=max&auto=format&n=BJIoathnR7ANCT6N&q=85&s=891f0fb0204d4cc3ca7eb79a17bda733" alt="Conekta modal to create webhook with URL, name, and event selector" width="858" height="896" data-path="assets/images/integraciones/pagos/conekta-webhook-crear-modal.png" />
    </Frame>

    <Frame caption="Orders events to select in the webhook">
      <img src="https://mintcdn.com/jelouai/BJIoathnR7ANCT6N/assets/images/integraciones/pagos/conekta-webhook-eventos-orders.png?fit=max&auto=format&n=BJIoathnR7ANCT6N&q=85&s=0895597bf3b36248025c52d5edea391a" alt="Conekta webhook event selector with order.expired, order.paid, order.pending_payment, order.refunded, and order.declined selected" width="848" height="922" data-path="assets/images/integraciones/pagos/conekta-webhook-eventos-orders.png" />
    </Frame>
  </Step>

  <Step title="Confirm active test webhook">
    Save the webhook and verify it is **Active** with the Jelou URL.

    <Frame caption="Active test webhook in Conekta">
      <img src="https://mintcdn.com/jelouai/BJIoathnR7ANCT6N/assets/images/integraciones/pagos/conekta-webhooks-lista-prueba.png?fit=max&auto=format&n=BJIoathnR7ANCT6N&q=85&s=4423c60de3d62a02b8569d917c4beb02" alt="Conekta test webhooks list showing an active webhook with the Jelou URL" width="1024" height="467" data-path="assets/images/integraciones/pagos/conekta-webhooks-lista-prueba.png" />
    </Frame>
  </Step>
</Steps>

***

## Part 2 — Prepare production credentials and webhook

<Steps>
  <Step title="Disable test mode">
    In the **bottom-left corner** of the panel, turn off the **Test Mode** switch.

    Confirm that the test mode notice no longer appears.
  </Step>

  <Step title="Open Developers">
    In the sidebar menu, open **Developer**.

    <Frame caption="Conekta panel with test mode disabled and Developers section">
      <img src="https://mintcdn.com/jelouai/BJIoathnR7ANCT6N/assets/images/integraciones/pagos/conekta-dashboard-desarrolladores-produccion.png?fit=max&auto=format&n=BJIoathnR7ANCT6N&q=85&s=edf5a7fc94ddbdb1b5038314b11895c0" alt="Conekta panel with test mode disabled and the Developers section visible" width="1024" height="465" data-path="assets/images/integraciones/pagos/conekta-dashboard-desarrolladores-produccion.png" />
    </Frame>
  </Step>

  <Step title="View production API Keys">
    In the **View API Keys** card, click **View production API Keys**.
  </Step>

  <Step title="Copy the public key">
    In the **Public key** section, copy the active key using **Copy key**.

    <Frame caption="Production API Keys: public key and private key creation">
      <img src="https://mintcdn.com/jelouai/BJIoathnR7ANCT6N/assets/images/integraciones/pagos/conekta-dashboard-api-keys-produccion.png?fit=max&auto=format&n=BJIoathnR7ANCT6N&q=85&s=ca36faf4a1abfb3bd6616e49b60fda71" alt="Conekta production API Keys screen showing the public key and the Create new private key button" width="1024" height="468" data-path="assets/images/integraciones/pagos/conekta-dashboard-api-keys-produccion.png" />
    </Frame>
  </Step>

  <Step title="Create and copy the private key">
    In the **Private keys** section, click **Create new private key**.

    Assign a descriptive name, confirm creation, and **copy the private key immediately**.

    When you move Conekta to production in Brain Studio, use this production pair. Do not reuse test credentials.
  </Step>

  <Step title="Open production Webhooks">
    Return to **Developer**. In the **Webhooks** card, click **Review webhooks**.
  </Step>

  <Step title="Create the production webhook">
    Click **Create Webhook** and complete the same configuration as in test:

    * **Webhook URL:** `https://chat-payments.jelou.ai/link-webhook?provider=CONEKTA`
    * **Name or description:** a descriptive name, for example `Jelou Brain`
    * **Events to notify:** select the 5 **orders** events listed above

    Confirm the webhook is **Active** in the production environment.
  </Step>
</Steps>

***

## What Brain Studio asks for

When installing Conekta, Brain Studio requests:

| Field           | Description                                               |
| --------------- | --------------------------------------------------------- |
| **Public key**  | Active public key from the environment you are connecting |
| **Private key** | Private key you just created in Conekta                   |
| **VAT rate**    | VAT percentage the integration will use during collection |

<Note>
  VAT is configured during connection in Brain Studio, not in the Conekta panel. The webhook is configured directly in Conekta and is not entered in Brain Studio.
</Note>

***

## Next step

<Card title="Connect in Brain Studio" href="/en/guides/integraciones/pagos/proveedores/conekta/conectar-en-brain-studio" icon="plug">
  Install Conekta using the credentials for the environment you will use and define the VAT rate for the integration.
</Card>
