The Pica Unified SDK library for TypeScript provides convenient access to the Pica Unified API from applications written in TypeScript.

NPM Package

npm install @picahq/unified

Quick Start

import { Pica } from "@picahq/unified";

const pica = new Pica("sk_live_1234");

const response = await pica
  .customers("live::xero::acme-inc")
  .get("cus_OT3CLnirqcpjvw");

console.log(response);

Configuration

The SDK can be configured with the following options:

apiKey
string
required

Your Pica API key

serverUrl
string

Override the default Pica API server URL when using a self-hosted deployment of Pica