askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
danq9
signup: the person chooses the password and name on the confirm page
83c7aa6
2 weeks, 5 days ago
History
dbbasic-package.json · 2.9 KB · 87 lines
| 1 | { |
| 2 | "id": "app-payments", |
| 3 | "name": "Payments", |
| 4 | "version": "0.2.0", |
| 5 | "description": "Payments and refunds against invoices: append-only money movements, hook-enforced invariants (overpayment gate per app_settings policy; refund <= payment minus prior refunds; invoice_id stamped from the payment), and rollup/formula-derived paid and balance amounts on invoices. First module of the ERP tail; the stress test of the primitive stack (plan/payments-spec.md). 0.2.0 wires Stripe as a PAYMENT METHOD, never the system of record: action_stripe_checkout turns a portal token into a Checkout Session (amount computed server-side from the open balance -- a payer who could name their own price is not paying an invoice), and webhook_stripe verifies the signature over the raw bytes and writes ONE payments row, deduped on the Stripe event id because Stripe redelivers for days. Everything after that is the reaction chain any payment already triggers: the invoice flips, the books compose, the receipt sends. The predecessor's Stripe silo happened because webhook code did bespoke things; here the webhook is just another door into the one pipeline. Storage-level writes bypass the synchronous dispatcher, so a Stripe deployment must enable DBBASIC_ENABLE_CHANGE_DISPATCH -- the third instance of logic-decisions #9 buying the real fix instead of a third workaround.", |
| 6 | "compatibility": { |
| 7 | "dbbasic_object_server": ">=0.1.0" |
| 8 | }, |
| 9 | "dependencies": [ |
| 10 | "app-invoices" |
| 11 | ], |
| 12 | "objects": [ |
| 13 | { |
| 14 | "id": "site_payments", |
| 15 | "path": "objects/site/payments.py" |
| 16 | }, |
| 17 | { |
| 18 | "id": "hook_payments", |
| 19 | "path": "objects/hook/payments.py" |
| 20 | }, |
| 21 | { |
| 22 | "id": "hook_refunds", |
| 23 | "path": "objects/hook/refunds.py" |
| 24 | }, |
| 25 | { |
| 26 | "id": "system_books", |
| 27 | "path": "objects/system/books.py" |
| 28 | }, |
| 29 | { |
| 30 | "id": "system_invoice_status", |
| 31 | "path": "objects/system/invoice_status.py" |
| 32 | }, |
| 33 | { |
| 34 | "id": "webhook_stripe", |
| 35 | "path": "objects/webhook/stripe.py" |
| 36 | }, |
| 37 | { |
| 38 | "id": "action_stripe_checkout", |
| 39 | "path": "objects/action/stripe_checkout.py" |
| 40 | } |
| 41 | ], |
| 42 | "schemas": [ |
| 43 | { |
| 44 | "collection": "payments", |
| 45 | "path": "schemas/payments.json" |
| 46 | }, |
| 47 | { |
| 48 | "collection": "refunds", |
| 49 | "path": "schemas/refunds.json" |
| 50 | } |
| 51 | ], |
| 52 | "permissions": [ |
| 53 | { |
| 54 | "path": "permissions/rules.json" |
| 55 | } |
| 56 | ], |
| 57 | "seed": [ |
| 58 | { |
| 59 | "collection": "payments", |
| 60 | "path": "seed/payments.tsv" |
| 61 | }, |
| 62 | { |
| 63 | "collection": "refunds", |
| 64 | "path": "seed/refunds.tsv" |
| 65 | }, |
| 66 | { |
| 67 | "collection": "views", |
| 68 | "path": "seed/views.tsv" |
| 69 | }, |
| 70 | { |
| 71 | "collection": "site_routes", |
| 72 | "path": "seed/site_routes.tsv" |
| 73 | } |
| 74 | ], |
| 75 | "migrations": [], |
| 76 | "nav": [ |
| 77 | { |
| 78 | "id": "payments", |
| 79 | "label": "Payments", |
| 80 | "path": "/payments", |
| 81 | "blurb": "Money received against invoices, and refunds of it", |
| 82 | "surface": "member", |
| 83 | "group": "Money", |
| 84 | "order": 310 |
| 85 | } |
| 86 | ] |
| 87 | } |