@for-the-people-initiative/payments
v0.1.0
Published
> Generic payment module for For the People apps.
Readme
Payments
Generic payment module for For the People apps.
A lightweight, adapter-based payment processing library with Stripe support, fee calculation, and a ready-to-use Hono REST API.
Packages
| Package | Description |
|---------|-------------|
| @for-the-people/payments-core | TypeScript types, Stripe adapter, payment orchestration, fee calculation |
| @for-the-people/payments-api | Hono-based REST API with payment and webhook routes |
Development
pnpm install
pnpm buildArchitecture
- Adapter pattern — swap payment providers (Stripe, Mollie, etc.) without changing business logic
- Fee calculation — processor + platform fee estimation per payment method and tier
- Hono API — lightweight REST API with rate limiting, CORS, and webhook handling
Usage
import { StripeAdapter, PaymentService } from '@for-the-people/payments-core';
import { createApp } from '@for-the-people/payments-api';License
MIT
