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

# UPG Project Slots

> Understand the Workspace capacity requirement that authorizes a project to start new UPG checkouts.

A UPG slot is a Workspace allocation assigned to one project. It is the permission boundary that lets the project use the Workspace's Universal Payment Gateway entitlement.

## Why slots exist

A project can keep historic Gateway Vault configuration after it leaves a Workspace or after its slot is released. That configuration alone must not be enough to start new payments. The SDK availability check requires an active slot before it exposes a usable payment method or creates a new checkout.

<Steps>
  <Step title="Workspace UPG plan">
    Supplies capacity to the Workspace.
  </Step>

  <Step title="UPG slot">
    Explicitly attached to a specific project.
  </Step>

  <Step title="Project">
    May use eligible Vault configurations.
  </Step>

  <Step title="Checkout session">
    Started successfully by the project.
  </Step>
</Steps>

## What happens when a slot changes

| Project state | New checkout | Existing signed completion context |
| - | - | - |
| Active slot | Allowed when a valid gateway configuration is available | Can be completed normally |
| Released, detached, or Workspace deactivated | Blocked | May finish verification when it was issued before release |
| Project paused | Blocked | Treat according to the returned completion result and your fulfilment policy |

The last rule prevents a buyer from being left with an unverified payment simply because an administrator changed capacity while the buyer was at the provider.

## Check before rendering checkout

Call `availability()` on your backend whenever you prepare a checkout page. It returns `ready`, a safe reason when it is not ready, and public method metadata.

<Tabs>
  <Tab title="PHP">
    ```php theme={null}
    $availability = $apix->payment()->availability('shop.example.com');

    if (! $availability->isReady()) {
        // Render a safe checkout-unavailable state using only this public message.
        $message = $availability->message;
    }
    ```
  </Tab>

  <Tab title="Laravel">
    ```php theme={null}
    $availability = AvraAPI::payment()->availability('shop.example.com');

    if (! $availability->isReady()) {
        return view('checkout.unavailable', ['message' => $availability->message]);
    }
    ```
  </Tab>

  <Tab title="Node.js">
    ```ts theme={null}
    const availability = await client.payment().availability('shop.example.com');

    if (!availability.ready) {
      return renderCheckoutUnavailable(availability.message);
    }
    ```
  </Tab>
</Tabs>

<Tip>
  The matching PHP, Laravel, and Node.js tabs throughout this UPG section stay synchronized. Choose your SDK once and follow the same flow page-wide.
</Tip>

For buyer-facing recovery, see [UPG Errors](/universal-payment-gateway/errors).


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