Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Guidance for AI assistants working in this repository.

## Project

`sumit-api` — pure TypeScript helpers for SUMIT / OfficeGuy / Upay recurring billing and trigger webhooks. **Zero runtime dependencies.** Single-file source: [`src/index.ts`](src/index.ts).
`sumit-api` — pure TypeScript helpers for SUMIT (formerly OfficeGuy) recurring billing and trigger webhooks. **Zero runtime dependencies.** Single-file source: [`src/index.ts`](src/index.ts).

SUMIT delegates card clearing to partner processors (Upay is one; SUMIT can route through others). Processor-level identifiers and error codes — most commonly `Upay_*` — appear unredacted inside SUMIT response bodies, which is why `redactSensitiveText` masks them.

Companion package: [`sumit-react`](https://github.com/Digitizers/sumit-react).

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![license](https://img.shields.io/npm/l/sumit-api.svg)](LICENSE)
[![zero deps](https://img.shields.io/badge/runtime%20deps-0-success)](package.json)

> Pure TypeScript helpers for [SUMIT / OfficeGuy / Upay](https://sumit.co.il) recurring billing and trigger webhooks. **Zero runtime dependencies.**
> Pure TypeScript helpers for [SUMIT](https://sumit.co.il) (formerly **OfficeGuy**) recurring billing and trigger webhooks. SUMIT routes card clearing through partner processors such as **Upay**, and their error codes surface in SUMIT responses — this package handles SUMIT's request/response shapes and redacts those upstream codes before they hit your logs. **Zero runtime dependencies.**

Companion package: [`sumit-react`](https://github.com/Digitizers/sumit-react) — `<SumitCheckout />` plus Next.js charge and webhook route helpers.

Expand All @@ -26,7 +26,7 @@ Companion package: [`sumit-react`](https://github.com/Digitizers/sumit-react)

## Why this package

SUMIT (also branded **OfficeGuy** and **Upay**) does not publish a typed SDK for their billing APIs, and their trigger webhooks ship in three different content shapes. This package gives you a small, opinionated surface that is safe to drop into any backend:
SUMIT (formerly **OfficeGuy**) does not publish a typed SDK for their billing APIs, and their trigger webhooks ship in three different content shapes. SUMIT also delegates the actual card clearing to partner processors (**Upay** is one — others exist), so processor-level error codes (e.g. `Upay_30001419`) appear unredacted inside SUMIT's response bodies. This package gives you a small, opinionated surface that is safe to drop into any backend:

- **Build** `/billing/recurring/charge/` request payloads with strict types.
- **Normalize** successful and failed charge responses into a single discriminated union.
Expand Down
2 changes: 1 addition & 1 deletion docs/API_REFERENCE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SUMIT API Reference

This package wraps a small slice of the SUMIT / OfficeGuy / Upay billing API. It does **not** ship a transport client — `fetch` is the integrator's responsibility. The helpers here build request bodies, normalize responses, and redact sensitive fields before logging or persistence.
This package wraps a small slice of the SUMIT (formerly OfficeGuy) billing API. SUMIT routes card clearing through partner processors — Upay is one of them — and their error codes (e.g. `Upay_30001419`) surface inside SUMIT response bodies, which is why this package redacts them by default. It does **not** ship a transport client — `fetch` is the integrator's responsibility. The helpers here build request bodies, normalize responses, and redact sensitive fields before logging or persistence.

## Official sources

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sumit-api",
"version": "0.1.0",
"description": "TypeScript helpers for SUMIT/OfficeGuy/Upay recurring charges and trigger webhooks.",
"description": "TypeScript helpers for SUMIT (formerly OfficeGuy) recurring charges and trigger webhooks. Includes redaction for upstream Upay clearer error codes.",
"license": "MIT",
"type": "module",
"main": "./dist/index.js",
Expand Down
Loading