Official SDK

Use the official @paymavo/sdk package to call the Paymavo API from Node.js or server-side frameworks.

Installation

pnpm add @paymavo/sdk

Quickstart

Create a client with your API key and use resource namespaces like invoices or customers.

TYPESCRIPT
import { PaymavoClient } from "@paymavo/sdk";

const client = new PaymavoClient({
  apiKey: process.env.PAYMAVO_API_KEY!,
});

async function example() {
  const invoices = await client.invoices.list({ limit: 10 });
  const { data: invoice } = await client.invoices.create({
    customerId: "clx_customer_id",
    title: "Web development — March",
    items: [
      { description: "UI design", quantity: 1, unitPrice: 300000 },
      { description: "Development", quantity: 8, unitPrice: 25000 },
    ],
  });

  await client.invoices.send(invoice.id);
}