# Loyverse — Pipedream Connect

> Point of Sale and Inventory Management Platform for Small & Medium Businesses.

- API slug: `loyverse` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Business Management
- Website: https://loyverse.com/
- Managed OAuth scopes: `CUSTOMERS_READ` · `CUSTOMERS_WRITE` · `EMPLOYEES_READ` · `ITEMS_READ` · `INVENTORY_WRITE` · `PAYMENT_TYPES_READ` · `RECEIPTS_READ` · `RECEIPTS_WRITE` · `STORES_READ` · `MERCHANT_READ`
- This page (HTML): https://pipedream.com/apps/loyverse
- Tools: 4 actions · 3 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: loyverse`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "loyverse",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Create Receipt:
const result = await mcp.callTool({
  name: "loyverse-create-receipt",
  arguments: {
    storeId: "Store ID",
    lineItems: ["Line Items"],
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Loyverse endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.loyverse.com/v1.0/merchant/

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkubG95dmVyc2UuY29tL3YxLjAvbWVyY2hhbnQv?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "loyverse-create-receipt",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    loyverse: { authProvisionId: "apn_xxxxxxx" },
    storeId: "Store ID",
    lineItems: ["Line Items"],
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (4)

### `loyverse-create-receipt` — Create Receipt (Write)

Creates a new receipt for a specific store. See the documentation

Full schema: https://pipedream.com/apps/loyverse/actions/create-receipt.md

### `loyverse-generate-receipt-items` — Generate Receipt Items (Write)

Generates the data for items to use in a receipt. See the documentation

Full schema: https://pipedream.com/apps/loyverse/actions/generate-receipt-items.md

### `loyverse-get-customer` — Get Customer(s) (Read-only)

Retrieves details of one or more customers. See the documentation

Full schema: https://pipedream.com/apps/loyverse/actions/get-customer.md

### `loyverse-update-inventory-levels` — Update Inventory Levels (Write)

Batch updates the inventory levels for specific item variants. See the documentation

Full schema: https://pipedream.com/apps/loyverse/actions/update-inventory-levels.md

## Triggers (3)

### `loyverse-customer-updated-instant` — Customer Updated (Instant) (Instant)

Emit new event when a customer is updated.

Full schema: https://pipedream.com/apps/loyverse/triggers/customer-updated-instant.md

### `loyverse-item-updated-instant` — Item Updated (Instant) (Instant)

Emit new event when an item is updated.

Full schema: https://pipedream.com/apps/loyverse/triggers/item-updated-instant.md

### `loyverse-receipt-updated-instant` — Receipt Updated (Instant) (Instant)

Emit new event when a receipt is updated.

Full schema: https://pipedream.com/apps/loyverse/triggers/receipt-updated-instant.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
