admin-projects

Create Payment On Behalf

Create a payment record for a project that has none.

The Payment-panel escape hatch for force-advanced projects: the force-status override only mutates Project.status — it never creates a payments row, so the panel is stuck in a dead "pending" state and every payment action 404s. This attaches a payment so the normal panel (attach PO / issue invoice / mark paid) lights up.

Reconciliation override: no approved-quote requirement. The admin records the out-of-band settlement amount directly (the editable field defaults to the latest quote total client-side); the payment is linked to the project's latest quote of any status to satisfy the non-null quote_id FK. A project with no quote at all returns a structured 400detail={"code": "no_quote", "message": ...} — so the UI can guide the admin to create/submit a quote first.

Creates a manual (out-of-band — wire/check/ACH) record supporting issue-invoice + mark-invoice-paid; no PO doc, no confirm-PO. The entered amount is stamped verbatim as the settlement total (both amount and total_with_tax, no tax breakout). Purchase-order records are created via the separate upload-po-on-behalf flow; method only accepts "manual" here (the schema 422s anything else).

Idempotent: a project that already has a payment returns 409. Audit-logged as payment_created_on_behalf with a reconciliation marker + the entered amount. Requires payments:create.

post/api/v1/admin/projects/{project_id}/payment

Path parameters

project_idstring uuid required

Request body

method'manual' required
order_placed_atstring date nullable

Response

Successful Response

idstring uuid required
project_idstring uuid required
quote_idstring uuid required
user_idstring uuid required
methodstring required
statusstring required
amountstring required
total_with_taxstring nullable
deposit_amountstring nullable
currencystring required
stripe_payment_intent_idstring nullable
po_numberstring nullable
po_document_r2_keystring nullable
po_document_download_urlstring nullable
shipping_addressstring nullable
notesstring nullable
paid_atstring date-time nullable
created_atstring date-time required
updated_atstring date-time required
project_namestring required
customer_namestring required
customer_emailstring required
customer_billing_addressstring nullable
submitted_by_admin_idstring uuid nullable
submitted_by_labelstring nullable
payment_terms_net_daysinteger nullable
order_placed_at_overridestring date-time nullable
order_placed_atstring date-time nullable

Changes

No recorded changes to this endpoint across all 1 revision of this API.