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

# Prava Pay Overview

> Give an AI agent the ability to pay at real merchants — safely, from the command line.

*Not sure this is the right path? See [Choosing Your Integration](https://docs.prava.space/choosing-your-integration.md).*

**Prava Pay** lets an AI agent (Claude Code, Cursor, Codex, or any coding agent) make real
purchases on a person's behalf. This section covers the **CLI**: a single command-line tool,
`@prava-sdk/cli`, that the agent runs directly. No servers to stand up, no card data to handle.

> [!NOTE]
>
> Agent platform supports MCP? MCP is the standard protocol for giving an agent tools. You may not
> need the CLI at all: connect via the [Prava MCP](https://docs.prava.space/mcp/overview.md) instead (one URL, same account
> and guardrails).

> [card] Who Prava Pay is for
>
> Builders of autonomous or human-in-the-loop agents that need to **buy something** (order a
> product, pay a merchant, complete a checkout) without ever touching a raw card number.

## How it fits together

Prava Pay sits between the agent and the merchant. The agent describes *what* it wants to buy;
Prava handles the sensitive parts: collecting the card, issuing **one-time, merchant-scoped
credentials**, and completing the payment.

```mermaid theme={null}
flowchart LR
    A["Agent (CLI)"]
    P["Prava<br/>secure card entry<br/>owner's limits enforced"]
    M["Merchant<br/>checkout completes"]
    A -->|buy this| P -->|one-time token| M
```

The person who owns the account (the **agent owner**) stays in control the whole time:

* They **link and approve** an agent once, from their browser. An unapproved agent can do nothing.
* They **enter card details themselves** in Prava's secure page. The agent never sees the real card.
* They set the **guardrails** (spending limits, saved addresses) that Prava enforces on every purchase.

The owner does all of this from the **Prava Pay dashboard** at [pay.prava.space](https://pay.prava.space):

> [!NOTE]
>
> **Two portals, two audiences.** [dashboard.prava.space](https://dashboard.prava.space) is the
> [**developer console**](https://docs.prava.space/dashboard.md): sign up, create API keys, switch to
> production. [pay.prava.space](https://pay.prava.space) is the
> [**Prava Pay dashboard**](https://docs.prava.space/prava-pay/your-wallet.md) for agent *owners*: approve agent links, enroll
> cards, set spending controls. A developer integrating the API only needs the console; an agent
> owner only needs the Prava Pay dashboard.

> [!NOTE]
>
> The agent only ever receives a **one-time payment credential** scoped to a single, already-priced
> purchase. It cannot reuse it, change the amount, or pay a different merchant.

## The two ways to pay

Prava Pay supports two flows, depending on how much the agent needs to do:

> [card] [Direct payment](https://docs.prava.space/prava-pay/sessions.md)
>
> You already know the merchant, items, and total. Create a **payment session**, the owner enters
> the card, and you receive credentials to complete checkout. See [Payment sessions](https://docs.prava.space/prava-pay/sessions.md).

> [card] [Agentic shopping](https://docs.prava.space/prava-pay/shopping.md)
>
> The agent **discovers** the product too: search across merchants, compare offers, get a live
> quote, then pay. See [Agentic shopping](https://docs.prava.space/prava-pay/shopping.md).

## Install

Prava Pay is a global CLI. The **owner** installs it once on the machine the agent runs on:

```bash theme={null}
npm install -g @prava-sdk/cli
```

Verify the install:

```bash theme={null}
prava --version
# 3.0.3
```

> [!WARNING]
>
> Always install the CLI **yourself** as the owner. Don't have the agent install or update it
> silently: installation is a trust action, and keeping it explicit keeps you in the loop.

Alongside the CLI, install the matching **skill** so the agent knows which command to run when:

```bash theme={null}
npx --yes skills add https://github.com/Prava-Payments/prava-skills \
  --skill prava-shopping --global --yes --full-depth
```

## Guided by Skills

The CLI does the work; **Skills guide the agent on *which* command to call and *when*.** A skill encodes
the correct flow, paces the agent (one decision per turn), and forces a confirmation before any
spend, keeping the human in control. The CLI runs without a skill, but will nudge you to install one
if it's missing.

* **`prava-pay`** pays for a known item: `setup` → `sessions create` → `poll` → checkout.
* **`prava-shopping`** finds *and* buys: `search` → `product` → `quote` → `checkout`.

See **[Skills](https://docs.prava.space/prava-pay/skills.md)** for the full list, install commands, and how they keep the agent
safe.

## What you'll do next

**1. Link the agent**

Run `prava setup`, approve the agent in your browser, and confirm the link. See
[Linking an agent](https://docs.prava.space/prava-pay/linking.md).

**2. Make a purchase**

Create a payment session (or shop for a product), enter your card, and let the agent complete
the checkout. See the [Quickstart](https://docs.prava.space/prava-pay/quickstart.md).

**3. Handle the unexpected**

Know what each message means and how to recover. See [Troubleshooting](https://docs.prava.space/prava-pay/troubleshooting.md).

## Prava Pay vs. the Prava SDK

Prava Pay (CLI) and the [Prava SDK](https://docs.prava.space/sdk/overview.md) solve different problems:

| | **Prava Pay (CLI)** | **Prava SDK** |
| - | - | - |
| Runs where | On the agent's machine | In a merchant's web app |
| Audience | AI agents & their owners | Merchants embedding Prava at checkout |
| Card entry | Owner enters it in Prava's page | Shopper enters it in an embedded iframe |
| You get | A tool the agent calls | A JS library ([`collectPAN`](https://docs.prava.space/sdk/cards/collect-pan)) |

They share the same secure backbone. Pick Prava Pay when the **interface is owned by an AI agent**.


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