Skip to main content
Pocketsflow provides official SDKs to help you integrate with the API quickly and easily.

Available SDKs

Node.js / TypeScript

Full-featured SDK for Node.js and TypeScript applications

API Reference

Interactive API documentation with all endpoints

Why Use an SDK?

  • Type Safety: Full TypeScript support with complete type definitions
  • Error Handling: Built-in error handling with detailed error messages
  • Authentication: Automatic API key authentication
  • Convenience: Simple, intuitive methods for all API operations

Quick Example

import { Pocketsflow } from 'pocketsflow';

const pf = new Pocketsflow({
  apiKey: 'pk_live_your_api_key_here',
});

// List all products
const products = await pf.products.list();

// Create a new product
const product = await pf.products.create({
  name: 'My Digital Product',
  price: 29.99,
  currency: 'USD',
});

// Get orders with pagination
const { orders, pagination } = await pf.orders.list({
  page: 1,
  pageSize: 20,
});

Getting Your API Key

  1. Log in to your Pocketsflow dashboard
  2. Go to SettingsDevelopersAPI Keys
  3. Click Create API Key
  4. Copy your key and store it securely
Never expose your API key in client-side code. Always use it server-side only.

Test Mode vs Live Mode

Pocketsflow provides two types of API keys:
Key TypeFormatPurpose
Livepk_live_...Production data and real transactions
Testpk_test_...Test data for development and testing
Use test mode keys during development to avoid affecting real customer data.