Lu71

Documentation

Everything you need to integrate Lu71 into your agent platform.

MCP Setup (Recommended)

The fastest way to add Lu71. One command auto-configures in Claude, Cursor, Kiro, Windsurf, Codex, ChatGPT, VS Code, Amazon Q, Cline, and Roo Code.

shellnpx @lu71/install --key=lu71_live_YOUR_KEY

Once installed, your AI agent gets these tools:

lu71_capture_intent

Call BEFORE every purchase. Records what the agent intends to buy. Returns a signed receipt (intentId + signature) needed for disputes.

lu71_file_dispute

File a chargeback when a purchase goes wrong. Requires the intentId + signature from capture_intent, plus the transaction ID from the card platform.

lu71_check_dispute

Check dispute status: submitted, under_review, won, or lost.

lu71_list_disputes

List all disputes with full details.

lu71_connect_status

Check which payment platforms (Stripe, Lithic) are connected.

lu71_account_status

Diagnose account issues: 2FA status, API keys, connected platforms.

Manual config (Claude Desktop example):

json{
  "mcpServers": {
    "lu71": {
      "command": "npx",
      "args": ["-y", "@lu71/mcp", "--key=lu71_live_YOUR_KEY"]
    }
  }
}

TypeScript SDK

Use any package manager:

shellnpm install @lu71/sdk
# or
pnpm add @lu71/sdk
# or
bun add @lu71/sdk

Quick start:

typescriptimport { Lu71 } from "@lu71/sdk"

const lu71 = new Lu71({ apiKey: "lu71_live_..." })

// 1. Capture intent before purchase
const { intentId, signature } = await lu71.captureIntent({
  description: "Buy 100 blue widgets",
  merchant: "WidgetCo",
  maxAmount: 5000,
})

// 2. Agent makes purchase with its card...

// 3. File dispute when something goes wrong
const dispute = await lu71.fileDispute({
  intentId,
  intentSignature: signature,
  transactionId: "ipi_xxx",
  reason: "not_as_described",
  description: "Received red widgets instead of blue",
})

API Reference

All requests require x-api-key header (except signup and webhooks). Click any endpoint to see request/response.

Request Body

json{
  "name": "Acme Corp",
  "email": "dev@acme.com",
  "password": "min6chars"
}

Response

json{
  "message": "Account created. Log in and enable 2FA to generate API keys.",
  "customerId": "cus_abc123",
  "apiKey": "lu71_live_..."
}

Store both intentId and signature. Required when filing a dispute.

Request Body

json{
  "description": "Buy 100 blue widgets from WidgetCo",
  "merchant": "WidgetCo",
  "maxAmount": 5000,
  "currency": "gbp",
  "constraints": { "color": "blue", "quantity": "100" }
}

Response

json{
  "message": "Intent captured.",
  "intentId": "int_abc123",
  "signature": "hmac_sha256_...",
  "createdAt": "2026-06-05T10:00:00Z"
}

Reason options: not_received, not_as_described, duplicate, unauthorized, cancelled, service_not_rendered, other

Request Body

json{
  "intentId": "int_abc123",
  "intentSignature": "hmac_sha256_...",
  "transactionId": "ipi_xxx",
  "reason": "not_as_described",
  "description": "Received red widgets instead of blue",
  "evidence": {
    "whatWasReceived": "100 red widgets",
    "productType": "merchandise",
    "receivedAt": "2026-06-06T14:00:00Z",
    "returnStatus": "merchant_rejected"
  }
}

Response

json{
  "message": "Dispute filed.",
  "disputeId": "dsp_abc123",
  "status": "submitted",
  "platformDisputeId": "idp_xxx"
}

Response

json{
  "id": "dsp_abc123",
  "status": "won",
  "amount": 5000,
  "currency": "gbp",
  "reason": "not_as_described",
  "platform": "stripe",
  "transactionId": "ipi_xxx",
  "platformDisputeId": "idp_xxx",
  "description": "Received red widgets instead of blue",
  "filedAt": "2026-06-05T10:30:00Z",
  "resolvedAt": "2026-06-20T09:00:00Z"
}

Response

json[
  { "id": "dsp_abc123", "status": "won", "amount": 5000, ... },
  { "id": "dsp_def456", "status": "submitted", "amount": 2000, ... }
]

Response

json{
  "url": "https://connect.stripe.com/oauth/authorize?...",
  "message": "Redirect customer to this URL"
}

Request Body

json{ "apiKey": "li_restricted_..." }

Response

json{ "message": "Lithic connected. Using restricted API key." }

Request Body

json{ "url": "https://your-app.com/webhooks/lu71" }

Response

json{
  "message": "Webhook configured.",
  "webhookUrl": "https://your-app.com/webhooks/lu71",
  "webhookSecret": "whsec_...",
  "events": ["dispute.submitted", "dispute.under_review", "dispute.won", "dispute.lost"]
}

Webhook Events

Register a URL via POST /v1/connect/webhooks. We push signed updates when disputes resolve.

json{
  "id": "evt_1717578600000",
  "type": "dispute.won",
  "created": "2026-07-02T09:30:00Z",
  "data": {
    "disputeId": "dsp_abc123",
    "status": "won",
    "amount": 5000,
    "currency": "gbp",
    "resolvedAt": "2026-07-02T09:30:00Z"
  }
}

Events:

dispute.submittedDispute filed with card network
dispute.under_reviewCard network is reviewing evidence
dispute.wonDispute won. Funds returned. Success fee charged.
dispute.lostDispute lost. No charge.