> ## Documentation Index
> Fetch the complete documentation index at: https://devs.tapipay.la/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment link

> Structure of the payment portal URLs: identify your company by slug (/s/) or by companyCode (/c/).

The **payment portal** is the screen where your debtor sees what they owe and pays it. You reach it through a public URL that combines your company identifier with the end user identifier.

<Note>
  If you create debts or links through the API, you **do not need to build this URL yourself**: the `paymentUrl` field in the response already resolves to the portal (for [debts](/en/resources/debts) it is also a deep link to that specific debt). This page is for when you want to build the link on your own, for example to send the user to their full portal instead of to a single debt.
</Note>

## The two formats

The portal accepts **two equivalent formats**. Both resolve to the same place; what changes is the prefix and the company identifier you use.

<CodeGroup>
  ```text By slug theme={null}
  https://app.tapipay.la/s/{slug}/portal/{identifierValue}
  ```

  ```text By companyCode theme={null}
  https://app.tapipay.la/c/{companyCode}/portal/{identifierValue}
  ```
</CodeGroup>

<Tabs>
  <Tab title="When to use the slug">
    The `slug` is your company's short name (for example, `acme-corp`). It matches the **Alias** field under **Settings → Organization** in the dashboard.

    Use it when you manage **a single company** and want readable, branded URLs.
  </Tab>

  <Tab title="When to use the companyCode">
    The `companyCode` is the company code configured for your organization in TapiPay (for example, `MX-S-12345`).

    Use it when you manage **many companies or sub-billers**: you build the link with each company's `companyCode`, with no need to know or maintain its `slug`.

    <Note>
      The exact value is whatever your organization has configured, and the format varies between integrations. If you are not sure which one is yours, confirm it with your TapiPay contact before building links in bulk.
    </Note>
  </Tab>
</Tabs>

## URL components

| Part               | Example                                                    | Type     | Description                                                                                |
| ------------------ | ---------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------ |
| Domain and prefix  | `https://app.tapipay.la/s/` or `https://app.tapipay.la/c/` | Fixed    | The prefix defines how the company is identified: `/s/` by `slug`, `/c/` by `companyCode`. |
| Company identifier | `acme-corp` or `MX-S-12345`                                | Variable | Your company in TapiPay. With `/s/` use the `slug`; with `/c/` use the `companyCode`.      |
| Portal path        | `/portal/`                                                 | Fixed    | Segment that routes to the payment portal module.                                          |
| `identifierValue`  | `CLI-00042`                                                | Variable | The end user identifier, the same one you send when creating the debt.                     |

## Rules

<Warning>
  **Do not mix identifiers and prefixes.** `/s/` always takes the `slug` and `/c/` always takes the `companyCode`. A `companyCode` behind `/s/` will not resolve.
</Warning>

* **Case:** the `slug` is lowercase. The `companyCode` is used **exactly** as assigned to you. The `identifierValue` may be case sensitive depending on how it was generated.
* **Separators:** always use a forward slash (`/`) between components.
* **Domain:** use `app.tapipay.la`. The `www.tapipay.la` and `tapipay.la` domains redirect there, so they work, but they add an unnecessary redirect hop (worth avoiding if you are going to [embed the portal](/en/payment-portal/embed-portal) in an iframe).

## Example

Both rows point to the same portal for the same end user:

| Identification              | `identifierValue` | Link                                                   |
| --------------------------- | ----------------- | ------------------------------------------------------ |
| `slug`: `acme-corp`         | `CLI-00042`       | `https://app.tapipay.la/s/acme-corp/portal/CLI-00042`  |
| `companyCode`: `MX-S-12345` | `CLI-00042`       | `https://app.tapipay.la/c/MX-S-12345/portal/CLI-00042` |

## Where the user lands

The portal base URL leads to the user's **list of debts**. From there they choose what to pay and with which payment method.

| Path                                | Screen                                                     |
| ----------------------------------- | ---------------------------------------------------------- |
| `/portal/{identifierValue}`         | Pending debts (this is the landing screen).                |
| `/portal/{identifierValue}/autopay` | Autopay management: view, add and remove a payment method. |

<Tip>
  If instead of the full portal you want to show only the payment methods or only autopay management **inside your own site**, use the SDK: [Payment methods](/en/payment-portal/payment-methods-sdk) or [Autopay management](/en/payment-portal/autopay-sdk).
</Tip>
