REST · Webhooks · SDKs

Build with the Trailing Paper API.

One Bearer token, every endpoint. Push invoices, sync customers, automate payments. No OAuth dance, no client secrets to manage, no Premium tier.

~/projects/store · curl
$ curl -X POST "https://api.trailingpaper.com/v1/invoices" \
    -H "Authorization: Bearer tp_..." \
    -d '{ "customer_id": "cus_riverside",
          "line_items": [{ "sku": "ipa-case", "qty": 6 }] }'

{
  "id": "inv_2090",
  "total": 840.00,
  "status": "open",
  "payment_link": "https://pay.tp.com/i/2090"
}
Quickstart

Send your first invoice in 30 seconds.

Generate an API key from your dashboard, drop it into the header, and POST. That's it.

curl
# 1. Create an invoice
curl -X POST "https://trailingpaper.com/api/invoices" \
  -H "Authorization: Bearer tp_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": 42,
    "items": [{
      "name": "Q2 Retainer",
      "quantity": 1,
      "unit_price": 4250.00
    }],
    "send_email": true
  }'
node.js
// 1. Create an invoice (Node + fetch)
const res = await fetch(
  'https://trailingpaper.com/api/invoices',
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.TP_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      customer_id: 42,
      items: [{ name: 'Q2 Retainer', quantity: 1, unit_price: 4250 }],
      send_email: true,
    }),
  }
);
API Coverage

Every entity. Both directions.

If you can do it in the dashboard, you can do it via API. Push, pull, list, search, update, delete — across every meaningful object in TP.

GET / POST / PATCH / DELETE
Customers
Create, update, list, search by name, email, phone, address
GET / POST / PATCH / DELETE
Vendors
Manage payee records with avatars, bank details, payment preferences
GET / POST / PATCH / DELETE
Items
Products, services, with pricing, SKU, taxable flag, image_path
GET / POST / PATCH
Invoices
Create with line items, mark sent, track payments, set recurring
GET / POST / PATCH
Bills
Vendor bills (purchase_order or bill type) with line items
GET / POST
Payments
Record customer payments with allocations to specific invoices
GET / POST
Vendor Payments
Pay bills, allocate amounts to specific bill rows
GET / POST / DELETE
Expenses
Cash expenses with category, vendor, attachment
GET / POST
Ledger Entries
Direct journal entries when you need fine-grained control
GET / POST / PATCH
Estimates
Send, approve, decline, convert to invoice
GET / POST
Packing Slips
Ship-out documents tied to invoices, with carrier + tracking
GET
Reports
Pull P&L, Balance Sheet, Cash Flow, AR/AP aging as JSON
Production-Grade

Built for real workloads.

The TP API isn't a toy. It's the same API our own dashboard uses — battle-tested, idempotent, observable.

🔐

Bearer auth, scoped per company

Each API key is scoped to a single company you own. Keys can be rotated, revoked, and labeled. We log last_used_at for visibility.

🔁

Idempotency on POST

Pass external_source + external_id and we'll dedupe automatically — no double-billing on retries.

Real-time webhooks

Subscribe to invoice.paid, payment.received, refund.processed. HMAC-signed, retried with exponential backoff.

📈

Pagination, filtering, sorting

Cursor-based pagination, query parameters for date range / status / customer / amount. Stable ordering.

🛡️

Error responses, fully typed

Every 4xx/5xx returns a JSON body with error, error_code, and a human-readable message.

🌐

CORS-friendly

Use the API from your own browser-side code with proper CORS headers. Or proxy from your server — both supported.

Common Patterns

What people build with this.

E-commerce sync

  • Push every Shopify/Woo order as an invoice
  • Push customers on first purchase
  • Sync product catalog both directions
  • Auto-mark invoice paid when Stripe webhook fires

Marketplace billing

  • Bill seller commissions monthly via recurring invoices
  • Generate buyer receipts on each transaction
  • Pull P&L per seller via reports endpoint
  • Push refunds back through the API

SaaS billing companion

  • Use TP for invoicing while your app handles auth + product
  • One-click "Issue invoice" button in your admin
  • Stripe handoff: charge in Stripe, post to TP via webhook

Internal tools / agency back-office

  • Export invoices nightly to data warehouse
  • Sync time-tracking entries → invoice line items
  • Auto-create estimates from project planning tool
Use Any Language

REST is universal. TP is too.

No language lock-in. The TP API is plain HTTPS + JSON, so use whatever you write your code in. Official SDKs coming for the most common stacks.

🟨 JavaScript / Node.js 🐍 Python 🐘 PHP 💎 Ruby 🔷 Go ♨️ Java 🦀 Rust 📦 Anything that speaks HTTP
Documentation

Everything you need to ship.

Full reference docs with example payloads in 4 languages, webhook signature verification guide, error code reference, and a complete entity model.

Open the Developer Docs →

Get an API key. Build something.

Sign up for the trial, generate a key, hit the docs. No tier upgrade required for API access — it's included in the base plan.

Start 7-Day Free Trial →
$29.99/month after trial • API access included