master-zapier-plan-draft/packages/zappier-customer-service/README.md
George Lambert a1a5b957fd
Some checks are pending
offline / test (push) Waiting to run
Wire zappier-edge into the live stack and add billing department APIs
Fleet now spawns the real zappier and middleware processes. Metered
timestamp/receipt/hash calls proxy to middleware when ZAPPIER_UPSTREAM
is set. CS credits, sales per-customer pricing, and QuickBooks export
are separate repos plugged into zappier-edge admin.
2026-09-11 15:15:55 -04:00

21 lines
940 B
Markdown

# zappier-customer-service
Department API for **customer-service credit additions** (goodwill, make-goods). Prepaid balances stay on **zappier-edge**; this service is the CS front door and audit copy.
**Forgejo:** https://git.georgelambert.org/marchon/zappier-customer-service
**Catalog:** https://zapier.georgelambert.org/packages/zappier-customer-service/README.pdf
**Plugs into:** zappier-edge admin (`x-admin-key`) at `ZAPPIER_ADMIN_URL` (default `http://127.0.0.1:3000`).
```bash
PORT=3011 ZAPPIER_ADMIN_URL=http://127.0.0.1:3000 node src/server.js
curl -X POST http://127.0.0.1:3011/credits -H 'content-type: application/json' \
-d '{"customerId":"cust_1","cents":500,"reason":"goodwill","agent":"cs-anna"}'
```
| Route | Job |
|-------|-----|
| `GET /health` | `{ ok, role }` |
| `POST /credits` | Add/subtract prepaid cents on the customer |
| `GET /credits?customerId=` | Ledger |
Does not talk to NATS or Zapier cloud.