GitHub

Cookbook

Cookbook

Complete, working flows — each one end to end, with the failure cases that actually occur.

Recipes rather than reference. Each is a whole flow, including the parts that go wrong.

Assumed setup

import { PathClient } from '@pathprotocol/sdk';

export const path = new PathClient({
  baseUrl: process.env.PATH_API_URL!,
  apiVersion: '2026-09-09.genesis',
  credential: {
    kid: process.env.PATH_MEMBER_KID!,
    privateKeyHex: process.env.PATH_MEMBER_KEY!,
    memberSlug: process.env.PATH_MEMBER_SLUG!,
  },
});

Server-side. A credential inside a browser or a mobile app is public the moment someone opens the sources.

Recipes that need no credential say so — several of them do, which is the point of the open ring.

On this page